Package Details: python-librosa 0.10.2.post1-1

Git Clone URL: https://aur.archlinux.org/python-librosa.git (read-only, click to copy)
Package Base: python-librosa
Description: Python library for music and audio analysis
Upstream URL: https://librosa.org
Licenses: ISC
Submitter: petronny
Maintainer: petronny (AutoUpdateBot)
Last Packager: AutoUpdateBot
Votes: 11
Popularity: 0.043007
First Submitted: 2017-08-20 13:38 (UTC)
Last Updated: 2024-05-15 07:56 (UTC)

Pinned Comments

petronny commented on 2023-02-22 11:01 (UTC)

Prebuilt binaries of this package and its dependencies can be found in the arch4edu repository.

Latest Comments

1 2 Next › Last »

dreieck commented on 2024-04-28 11:46 (UTC)

Please move away from calling setup.py directly and instead use python -m build and python -m installer (together with the appropriate makedepends), as documented in the Arch Linux wiki for python packages:

==> Starting package()...
running install
/usr/lib/python3.12/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
running install_lib

Regards and thanks for maintaining!

dreieck commented on 2024-04-28 11:46 (UTC)

I get the following warning in build():

writing manifest file 'librosa.egg-info/SOURCES.txt'
/usr/lib/python3.12/site-packages/setuptools/command/build_py.py:207: _Warning: Package 'librosa.util.example_data' is absent from the `packages` configuration.
!!

        ********************************************************************************
        ############################
        # Package would be ignored #
        ############################
        Python recognizes 'librosa.util.example_data' as an importable package[^1],
        but it is absent from setuptools' `packages` configuration.

        This leads to an ambiguous overall configuration. If you want to distribute this
        package, please make sure that 'librosa.util.example_data' is explicitly added
        to the `packages` configuration field.

        Alternatively, you can also rely on setuptools' discovery methods
        (for example by using `find_namespace_packages(...)`/`find_namespace:`
        instead of `find_packages(...)`/`find:`).

        You can read more about "package discovery" on setuptools documentation page:

        - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

        If you don't want 'librosa.util.example_data' to be distributed and are
        already explicitly excluding 'librosa.util.example_data' via
        `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
        you can try to use `exclude_package_data`, or `include-package-data=False` in
        combination with a more fine grained `package-data` configuration.

        You can read more about "package data files" on setuptools documentation page:

        - https://setuptools.pypa.io/en/latest/userguide/datafiles.html


        [^1]: For Python, any directory (with suitable naming) can be imported,
              even if it does not contain any `.py` files.
              On the other hand, currently there is no concept of package data
              directory, all directories are treated like packages.
        ********************************************************************************

!!
  check.warn(importable)

Regards!

ISSOtm commented on 2023-12-23 23:41 (UTC)

@petronny python-lazy-loader and python-soxr are indeed required. The build doesn't fail if the packages are missing, but the module fails at runtime (e.g. if you use librosa.load()not if you only import librosa!)

Auerhuhn commented on 2023-06-02 22:35 (UTC)

@petronny Would you mind adding python-lazy-loader and python-soxr to depends? Those seem to be missing according to namcap.

Auerhuhn commented on 2023-03-02 08:52 (UTC) (edited on 2023-03-02 08:52 (UTC) by Auerhuhn)

PSA: python-librosa is currently failing at runtime. This is due to https://bugs.archlinux.org/task/77269.

The error message is:

SystemError: initialization of _internal failed without raising an exception

Once the issue is fixed in python-numba, reinstalling python-numba should fix the issue here as well.

In the meantime, python-numba-git, which already has the patch applied, should work as a drop-in replacement.

zoe commented on 2023-02-22 11:07 (UTC)

@petronny : Version 0.10.0 does build very well, if python-lazy-loader is installed. I suggest to add python-lazy-loader as a makedepends.

petronny commented on 2023-02-22 11:01 (UTC)

Prebuilt binaries of this package and its dependencies can be found in the arch4edu repository.

petronny commented on 2023-02-22 11:00 (UTC)

@zoe Version 0.10.0 could be built in clean chroot. Please check https://github.com/arch4edu/cactus/actions/runs/4232834202/jobs/7353047043

zoe commented on 2023-02-22 10:44 (UTC) (edited on 2023-02-22 11:04 (UTC) by zoe)

With version 0.10.0, does not build anymore, python-lazy-loader is needed as makedepends :

      ==> Lancement de build()…
      [… … …]
      ModuleNotFoundError: No module named 'lazy_loader'
      ==> ERREUR : Une erreur s’est produite dans build().
          Abandon…
       -> error making: python-librosa

SpotlightKid commented on 2022-05-19 13:08 (UTC) (edited on 2022-05-19 13:10 (UTC) by SpotlightKid)

Here's a diff for PKGBUILD (full file) to update the package to the latest release 0.9.1:

  • Updated pkgver.
  • Used sha256sum check sum.
  • Added python-packaging to depends.
  • Added --skip-build option to python setup install call in package function.
diff --git a/PKGBUILD b/PKGBUILD
index bc0c9d1..f379898 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,16 +3,20 @@

 pkgname=python-librosa
 _pkgname=librosa
-pkgver=0.8.1
+pkgver=0.9.1
 pkgrel=1
 pkgdesc="Python library for music and audio analysis"
 arch=('any')
 url="https://librosa.org"
 license=('ISC')
-depends=('python-numpy' 'python-scipy' 'python-six' 'python-numba' 'python-soundfile' 'python-joblib' 'python-matplotlib' 'python-audioread' 'python-decorator' 'python-pooch' 'python-scikit-learn' 'python-resampy')
+depends=('python-audioread' 'python-decorator' 'python-joblib'
+         'python-matplotlib' 'python-numba' 'python-numpy'
+         'python-packaging' 'python-pooch' 'python-resampy'
+         'python-scikit-learn' 'python-scipy' 'python-six'
+         'python-soundfile')
 makedepends=('python-setuptools')
 source=("https://github.com/librosa/librosa/archive/${pkgver}.tar.gz")
-md5sums=('1381e33b832b24ca255f2bc375fce934')
+sha256sums=('16b726ec4cda7a23d803c486dd4c99f3371d195a83fe2451c708f3ad05121035')

 build() {
   cd "$srcdir/${_pkgname}-${pkgver}"
@@ -21,8 +25,8 @@ build() {

 package() {
   cd "$srcdir/${_pkgname}-${pkgver}"
-  python setup.py install --root="$pkgdir"/ --optimize=1
-  install -Dm644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  python setup.py install --root="$pkgdir"/ --skip-build --optimize=1
+  install -Dm644 LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
 }

 # vim:set ts=2 sw=2 et: