Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-librosa for openSUSE:Factory checked in at 2021-03-30 20:55:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-librosa (Old) and /work/SRC/openSUSE:Factory/.python-librosa.new.2401 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-librosa" Tue Mar 30 20:55:54 2021 rev:8 rq:867960 version:0.8.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-librosa/python-librosa.changes 2021-01-08 17:40:37.353060087 +0100 +++ /work/SRC/openSUSE:Factory/.python-librosa.new.2401/python-librosa.changes 2021-03-30 20:56:15.000442472 +0200 @@ -1,0 +2,11 @@ +Thu Jan 28 23:09:45 UTC 2021 - Ben Greiner <[email protected]> + +- Disable python36 build because SciPy 1.6.0 dropped support for + Python 3.6. Other packages from the NumPy family do the same + (NEP29) +- Update requirements +- Enable tests. Use librosa-create-pooch-cache.py to provide the + test data in librosa-pooch-cache.tar.gz. These files are under + CC-BY-3.0 license. + +------------------------------------------------------------------- New: ---- librosa-create-pooch-cache.py librosa-pooch-cache.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-librosa.spec ++++++ --- /var/tmp/diff_new_pack.lfpaWR/_old 2021-03-30 20:56:15.680443233 +0200 +++ /var/tmp/diff_new_pack.lfpaWR/_new 2021-03-30 20:56:15.684443239 +0200 @@ -18,13 +18,29 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 +# SciPy 1.6.0 dropped support for Python 3.6, many packages from the NumPy family follow. (NEP 29) +%define skip_python36 1 Name: python-librosa Version: 0.8.0 Release: 0 Summary: Python module for audio and music processing -License: ISC +License: ISC AND CC-BY-3.0 URL: https://github.com/librosa/librosa +# The github archive has the tests Source0: https://github.com/librosa/librosa/archive/%{version}.tar.gz#/librosa-%{version}.tar.gz +Source1: librosa-create-pooch-cache.py +# Test data. Use create librosa-create-pooch-cache.py to create this file +Source2: librosa-pooch-cache.tar.gz +BuildRequires: %{python_module SoundFile >= 0.9.0} +BuildRequires: %{python_module audioread >= 2.0.0} +BuildRequires: %{python_module decorator >= 3.0.0} +BuildRequires: %{python_module joblib >= 0.12} +BuildRequires: %{python_module numba >= 0.43.0} +BuildRequires: %{python_module numpy >= 1.15.0} +BuildRequires: %{python_module pooch >= 1.0} +BuildRequires: %{python_module resampy >= 0.2.0} +BuildRequires: %{python_module scikit-learn >= 0.14.0} +BuildRequires: %{python_module scipy >= 1.0.0} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -32,27 +48,22 @@ Requires: python-audioread >= 2.0.0 Requires: python-decorator >= 3.0.0 Requires: python-joblib >= 0.12 -Requires: python-numba >= 0.38.0 +Requires: python-numba >= 0.43.0 Requires: python-numpy >= 1.15.0 +Requires: python-pooch >= 1.0 Requires: python-resampy >= 0.2.0 Requires: python-scikit-learn >= 0.14.0 Requires: python-scipy >= 1.0.0 -Requires: python-six >= 1.3 BuildArch: noarch # SECTION test requirements -BuildRequires: %{python_module SoundFile >= 0.9.0} -BuildRequires: %{python_module audioread >= 2.0.0} -BuildRequires: %{python_module decorator >= 3.0.0} -BuildRequires: %{python_module joblib >= 0.12} -BuildRequires: %{python_module numba >= 0.38.0} -BuildRequires: %{python_module numpy >= 1.15.0} -BuildRequires: %{python_module pytest-cov} +BuildRequires: %{python_module contextlib2} +BuildRequires: %{python_module matplotlib >= 2.0} BuildRequires: %{python_module pytest-mpl} +# xdist not specified upstream but it uses resources more efficiently +BuildRequires: %{python_module pytest-xdist} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module resampy >= 0.2.0} -BuildRequires: %{python_module scikit-learn >= 0.14.0} -BuildRequires: %{python_module scipy >= 1.0.0} -BuildRequires: %{python_module six >= 1.3} +BuildRequires: %{python_module samplerate} +BuildRequires: ffmpeg # /SECTION %python_subpackages @@ -62,9 +73,11 @@ systems. %prep -%setup -q -n librosa-%{version} +%setup -q -n librosa-%{version} -a 2 # Remove unneeded shebangs find librosa -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \; +# don't measure test coverage +sed -i '/tool:pytest/,/addopts/ s/--cov-report.*--cov librosa//' setup.cfg %build %python_build @@ -73,13 +86,20 @@ %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} -# Tests files are missing, even from github sources -# %%check -# %%pytest +%check +export LIBROSA_DATA_DIR=$PWD/librosa-pooch-cache +# test data files not packaged +donttest+=" or (test_core and test_iirt)" +donttest+=" or (test_features and test_cens)" +donttest+=" or (test_filters and test_semitone_filterbank)" +# image files do not match without exact mpl version +donttest+=" or test_display" +%pytest -n auto -k "not (${donttest:4})" %files %{python_files} %doc AUTHORS.md README.md %license LICENSE.md -%{python_sitelib}/* +%{python_sitelib}/librosa +%{python_sitelib}/librosa-%{version}*-info %changelog ++++++ librosa-create-pooch-cache.py ++++++ """ librosa-create-pooch-cache.py Create the pooch cache tarball for testing the package. Copyright (c) 2021 SUSE LLC Copyright (c) 2021 Ben Greiner <[email protected]> All modifications and additions to the file contributed by third parties remain the property of their copyright owners, unless otherwise agreed upon. The license for this file, and modifications and additions to the file, is the same license as for the pristine package itself (unless the license for the pristine package is not an Open Source License, in which case the license is the MIT License). An "Open Source License" is a license that conforms to the Open Source Definition (Version 1.9) published by the Open Source Initiative. Please submit bugfixes or comments via https://bugs.opensuse.org/ """ import os import subprocess import sys import pooch data_name = "librosa-pooch-cache" registry_file = "librosa/util/example_data/registry.txt" if len(sys.argv) != 2: print(f"Usage: python3 {sys.argv[0]} <librosa-srcdir>") print(f"Download test data into $PWD/{data_name} and compress the directory into $PWD/{data_name}.tar.gz") sys.exit(1) srcdir = os.path.abspath(sys.argv[1]) data_path = os.path.abspath(os.getcwd() + "/" + data_name) pc = pooch.create( data_path, base_url="https://librosa.org/data/audio/", registry=None ) pc.load_registry(srcdir + "/" + registry_file) with open(srcdir + "/" + registry_file) as fh: for line in fh: filename, hsum = line.split(" ") pc.fetch(filename) subprocess.run(["tar", "czf", f"{data_name}.tar.gz", data_name], check=True)
