Accepting request 769954 from multimedia:libs

- Do not pull in the python2 as a dependency since we can build
  fine with python3

- Skip two tests that fail to pass on 32bit machines

- Fix the test execution
- Run fdupes during install

OBS-URL: https://build.opensuse.org/request/show/769954
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/aubio?expand=0&rev=27
This commit is contained in:
Dominique Leuenberger 2020-02-04 18:51:47 +00:00 committed by Git OBS Bridge
commit 8c77b5c0e5
4 changed files with 34 additions and 16 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jan 30 13:15:23 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Do not pull in the python2 as a dependency since we can build
fine with python3
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Feb 12 15:55:52 UTC 2019 - bjorn.lie@gmail.com Tue Feb 12 15:55:52 UTC 2019 - bjorn.lie@gmail.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package aubio # spec file for package aubio
# #
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2020 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -35,8 +35,8 @@ BuildRequires: libjack-devel
BuildRequires: libsamplerate-devel BuildRequires: libsamplerate-devel
BuildRequires: libsndfile-devel BuildRequires: libsndfile-devel
BuildRequires: pkg-config BuildRequires: pkg-config
BuildRequires: python-devel BuildRequires: python3-base
%if 0%{?suse_version} > 1320 || (0%{?suse_version} == 1315 && 0%{?is_opensuse}) %if 0%{?suse_version} > 1315
BuildRequires: txt2man BuildRequires: txt2man
BuildRequires: pkgconfig(libavcodec) BuildRequires: pkgconfig(libavcodec)
BuildRequires: pkgconfig(libavdevice) BuildRequires: pkgconfig(libavdevice)
@ -82,16 +82,17 @@ This package includes the example programs for aubio library.
%prep %prep
%setup -q %setup -q
sed -e "s,/lib,/%{_lib}," src/wscript_build > src/wscript_build.new # set proper library dir
diff -u src/wscript_build src/wscript_build.new || : sed -i -e "s#/lib#/%{_lib}#" src/wscript_build
mv src/wscript_build.new src/wscript_build # set python3 as testrunner
sed -i -e 's#python\ ${SRC}#python3 ${SRC}#g' tests/wscript_build
%build %build
./waf configure --prefix=%{_prefix} --libdir=%{_libdir} python3 ./waf configure --prefix=%{_prefix} --libdir=%{_libdir}
./waf build python3 ./waf build -v %{?_smp_mflags}
%install %install
./waf install --destdir=%{buildroot} python3 ./waf install --destdir=%{buildroot}
mkdir -p %{buildroot}%{_docdir}/%{name} mkdir -p %{buildroot}%{_docdir}/%{name}
cp -pR %{buildroot}%{_datadir}/doc/libaubio-doc/api %{buildroot}%{_docdir}/%{name} cp -pR %{buildroot}%{_datadir}/doc/libaubio-doc/api %{buildroot}%{_docdir}/%{name}
rm -rf %{buildroot}%{_datadir}/doc/libaubio-doc rm -rf %{buildroot}%{_datadir}/doc/libaubio-doc
@ -112,7 +113,7 @@ rm -f %{buildroot}%{_libdir}/libaubio.a
%files tools %files tools
%doc %{_docdir}/%{name} %doc %{_docdir}/%{name}
%if 0%{?suse_version} > 1320 || (0%{?suse_version} == 1315 && 0%{?is_opensuse}) %if 0%{?suse_version} > 1315
%{_mandir}/man1/* %{_mandir}/man1/*
%endif %endif
%{_bindir}/* %{_bindir}/*

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Tue Feb 4 11:55:13 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Skip two tests that fail to pass on 32bit machines
-------------------------------------------------------------------
Thu Jan 30 13:08:20 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
- Fix the test execution
- Run fdupes during install
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Feb 12 15:55:52 UTC 2019 - bjorn.lie@gmail.com Tue Feb 12 15:55:52 UTC 2019 - bjorn.lie@gmail.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-aubio # spec file for package python-aubio
# #
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2020 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -27,9 +27,10 @@ URL: http://aubio.org/
Source: http://aubio.org/pub/aubio-%{version}.tar.bz2 Source: http://aubio.org/pub/aubio-%{version}.tar.bz2
Source1: http://aubio.org/pub/aubio-%{version}.tar.bz2.asc Source1: http://aubio.org/pub/aubio-%{version}.tar.bz2.asc
BuildRequires: %{python_module devel} BuildRequires: %{python_module devel}
BuildRequires: %{python_module nose2}
BuildRequires: %{python_module numpy-devel} BuildRequires: %{python_module numpy-devel}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-numpy Requires: python-numpy
Requires(post): update-alternatives Requires(post): update-alternatives
@ -51,14 +52,13 @@ Its features include segmenting a sound file before each of its attacks, perform
%install %install
%python_install %python_install
%python_expand fdupes %{buildroot}/%{python_sitearch}
%python_clone -a %{buildroot}/%{_bindir}/aubio %python_clone -a %{buildroot}/%{_bindir}/aubio
%python_clone -a %{buildroot}/%{_bindir}/aubiocut %python_clone -a %{buildroot}/%{_bindir}/aubiocut
%check %check
%ifpython3 # the two tests fail on 32bit due to precision issue
export PYTHONPATH=%{buildroot}/%{python_sitearch} %pytest_arch -k 'not (test_meltohz or test_hztomel)'
%python_exec setup.py test
%endif
%post %post
%python_install_alternative aubio %python_install_alternative aubio