|
| 1 | +# Copyright 1999-2024 Gentoo Authors |
| 2 | +# Distributed under the terms of the GNU General Public License v2 |
| 3 | + |
| 4 | +EAPI=8 |
| 5 | + |
| 6 | +DISTUTILS_USE_PEP517=setuptools |
| 7 | +PYTHON_COMPAT=( python3_{10..12} ) |
| 8 | + |
| 9 | +inherit distutils-r1 git-r3 |
| 10 | + |
| 11 | +DESCRIPTION="Python library for audio and music analysis" |
| 12 | +HOMEPAGE="https://github.com/librosa/librosa" |
| 13 | +EGIT_REPO_URI="$HOMEPAGE" |
| 14 | + |
| 15 | +LICENSE="Apache-2.0" |
| 16 | +SLOT="0" |
| 17 | +KEYWORDS="~amd64" |
| 18 | + |
| 19 | +RDEPEND=" |
| 20 | + >=dev-python/numpy-1.22.2[${PYTHON_USEDEP}] |
| 21 | + >=dev-python/audioread-2.1.9[${PYTHON_USEDEP}] |
| 22 | + >=dev-python/scipy-1.2.0[${PYTHON_USEDEP}] |
| 23 | + >=dev-python/scikit-learn-0.20.0[${PYTHON_USEDEP}] |
| 24 | + >=dev-python/joblib-0.14[${PYTHON_USEDEP}] |
| 25 | + >=dev-python/decorator-4.3.0[${PYTHON_USEDEP}] |
| 26 | + >=dev-python/numba-0.51.0[${PYTHON_USEDEP}] |
| 27 | + >=dev-python/soundfile-0.12.1[${PYTHON_USEDEP}] |
| 28 | + >=dev-python/pooch-1.1.0[${PYTHON_USEDEP}] |
| 29 | + >=dev-python/soxr-0.3.2[${PYTHON_USEDEP}] |
| 30 | + >=dev-python/typing-extensions-4.1.1[${PYTHON_USEDEP}] |
| 31 | + >=dev-python/lazy-loader-0.1[${PYTHON_USEDEP}] |
| 32 | + >=dev-python/msgpack-1.0[${PYTHON_USEDEP}] |
| 33 | +" |
| 34 | +BDEPEND=" |
| 35 | + test? ( |
| 36 | + dev-python/pytest-mpl[${PYTHON_USEDEP}] |
| 37 | + ) |
| 38 | +" |
| 39 | + |
| 40 | +distutils_enable_tests pytest |
| 41 | + |
| 42 | +src_prepare() { |
| 43 | + sed -i -e 's:--cov[a-z-]*\(=\| \)[a-z-]*::g' setup.cfg || die |
| 44 | + distutils-r1_src_prepare |
| 45 | +} |
| 46 | + |
| 47 | +python_test() { |
| 48 | + local EPYTEST_DESELECT=( |
| 49 | + #Network |
| 50 | + 'tests/test_util.py::test_example' |
| 51 | + 'tests/test_util.py::test_cite_badversion' |
| 52 | + 'tests/test_util.py::test_cite_unreleased' |
| 53 | + 'tests/test_util.py::test_cite_released' |
| 54 | + 'tests/test_core.py::test_load' |
| 55 | + |
| 56 | + #Missing test dependencies(resampy, samplerate) |
| 57 | + 'tests/test_core.py::test_resample_mono' |
| 58 | + 'tests/test_core.py::test_resample_scale' |
| 59 | + 'tests/test_core.py::test_resample_stereo' |
| 60 | + 'tests/test_multichannel.py::test_resample_multichannel' |
| 61 | + 'tests/test_multichannel.py::test_resample_highdim_axis' |
| 62 | + 'tests/test_multichannel.py::test_resample_highdim' |
| 63 | + ) |
| 64 | + |
| 65 | + epytest -p pytest_mpl |
| 66 | +} |
0 commit comments