Accepting request 1149065 from multimedia:libs
OBS-URL: https://build.opensuse.org/request/show/1149065 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/aubio?expand=0&rev=36
This commit is contained in:
commit
88c095de44
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package aubio
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 20 18:19:12 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Add patch waflib_python312.patch to support python3.12
|
||||
gh#aubio/aubio#394, https://gitlab.com/ita1024/waf/-/commit/d2060dfd8af4edb5824153ff24e207b39ecd67a2
|
||||
- Fix fdupes call for all python flavors
|
||||
- Remove shebang from non executable scripts
|
||||
- More specific %python_sitearch in files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 21 03:03:19 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-aubio
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -16,7 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python36 1
|
||||
Name: python-aubio
|
||||
Version: 0.4.9
|
||||
@ -26,6 +25,9 @@ License: GPL-3.0-or-later
|
||||
URL: http://aubio.org/
|
||||
Source: http://aubio.org/pub/aubio-%{version}.tar.bz2
|
||||
Source1: http://aubio.org/pub/aubio-%{version}.tar.bz2.asc
|
||||
# PATCH-FIX-UPSTREAM waflib_python312.patch gh#aubio/aubio#394
|
||||
# https://gitlab.com/ita1024/waf/-/commit/d2060dfd8af4edb5824153ff24e207b39ecd67a2
|
||||
Patch1: waflib_python312.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module numpy-devel}
|
||||
BuildRequires: %{python_module pytest}
|
||||
@ -34,7 +36,7 @@ BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-numpy
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@ -45,17 +47,21 @@ aubio is a library to label music and sounds. It listens to audio signals and at
|
||||
Its features include segmenting a sound file before each of its attacks, performing pitch detection, tapping the beat and producing midi streams from live audio.
|
||||
|
||||
%prep
|
||||
%setup -q -n aubio-%{version}
|
||||
%autosetup -p 1 -n aubio-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}/%{python_sitearch}
|
||||
%python_expand %fdupes %{buildroot}/%{$python_sitearch}
|
||||
%python_clone -a %{buildroot}/%{_bindir}/aubio
|
||||
%python_clone -a %{buildroot}/%{_bindir}/aubiocut
|
||||
|
||||
%{python_expand # Remove shebang from non executable scripts
|
||||
find %{buildroot}/%{$python_sitearch} -type f -name "*.py" -exec sed -i "1{/#!.*python/d}" {} \;
|
||||
}
|
||||
|
||||
%check
|
||||
# the two tests fail on 32bit due to precision issue
|
||||
%pytest_arch -k 'not (test_meltohz or test_hztomel)'
|
||||
@ -71,6 +77,7 @@ Its features include segmenting a sound file before each of its attacks, perform
|
||||
%doc README.md ChangeLog AUTHORS
|
||||
%python_alternative %{_bindir}/aubio
|
||||
%python_alternative %{_bindir}/aubiocut
|
||||
%{python_sitearch}/*
|
||||
%{python_sitearch}/aubio
|
||||
%{python_sitearch}/aubio-%{version}*-info
|
||||
|
||||
%changelog
|
||||
|
36
waflib_python312.patch
Normal file
36
waflib_python312.patch
Normal file
@ -0,0 +1,36 @@
|
||||
Index: aubio-0.4.9/waflib/Context.py
|
||||
===================================================================
|
||||
--- aubio-0.4.9.orig/waflib/Context.py
|
||||
+++ aubio-0.4.9/waflib/Context.py
|
||||
@@ -2,9 +2,17 @@
|
||||
# encoding: utf-8
|
||||
# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
|
||||
|
||||
-import os,re,imp,sys
|
||||
+import os, re, sys
|
||||
from waflib import Utils,Errors,Logs
|
||||
import waflib.Node
|
||||
+
|
||||
+if sys.hexversion > 0x3040000:
|
||||
+ import types
|
||||
+ class imp(object):
|
||||
+ new_module = lambda x: types.ModuleType(x)
|
||||
+else:
|
||||
+ import imp
|
||||
+
|
||||
HEXVERSION=0x2000e00
|
||||
WAFVERSION="2.0.14"
|
||||
WAFREVISION="907519cab9c1c8c7e4f7d4e468ed6200b9250d58"
|
||||
Index: aubio-0.4.9/waflib/Tools/python.py
|
||||
===================================================================
|
||||
--- aubio-0.4.9.orig/waflib/Tools/python.py
|
||||
+++ aubio-0.4.9/waflib/Tools/python.py
|
||||
@@ -399,7 +399,7 @@ def configure(conf):
|
||||
v.PYC=getattr(Options.options,'pyc',1)
|
||||
v.PYO=getattr(Options.options,'pyo',1)
|
||||
try:
|
||||
- v.PYTAG=conf.cmd_and_log(conf.env.PYTHON+['-c',"import imp;print(imp.get_tag())"]).strip()
|
||||
+ v.PYTAG = conf.cmd_and_log(conf.env.PYTHON + ['-c', "import sys\ntry:\n print(sys.implementation.cache_tag)\nexcept AttributeError:\n import imp\n print(imp.get_tag())\n"]).strip()
|
||||
except Errors.WafError:
|
||||
pass
|
||||
def options(opt):
|
Loading…
Reference in New Issue
Block a user