From c21c3f1de5ac30221301b442e7a9d8c5095cd47cd37fef6f9a17c08a3728743c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 20 May 2020 11:28:16 +0000 Subject: [PATCH] Accepting request 807598 from home:pgajdos:python submit OBS-URL: https://build.opensuse.org/request/show/807598 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pastream?expand=0&rev=6 --- python-pastream.changes | 5 +++++ python-pastream.spec | 29 +++++++++++++++++++---------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/python-pastream.changes b/python-pastream.changes index 0a4d4f6..434d8c6 100644 --- a/python-pastream.changes +++ b/python-pastream.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 20 07:26:08 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + ------------------------------------------------------------------- Fri Dec 6 18:44:56 UTC 2019 - Todd R diff --git a/python-pastream.spec b/python-pastream.spec index 9f7ed48..d6ecb42 100644 --- a/python-pastream.spec +++ b/python-pastream.spec @@ -1,7 +1,7 @@ # # spec file for package python-pastream # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ Release: 0 Summary: GIL-less Portaudio Streams for Python License: MIT Group: Development/Languages/Python -Url: http://github.com/tgarc/pastream +URL: https://github.com/tgarc/pastream Source0: https://files.pythonhosted.org/packages/source/p/pastream/pastream-%{version}.tar.gz Source100: python-pastream-rpmlintrc BuildRequires: %{python_module cffi >= 1.4.0} @@ -32,22 +32,24 @@ BuildRequires: %{python_module devel} BuildRequires: %{python_module pa-ringbuffer >= 0.1.2} BuildRequires: %{python_module setuptools} BuildRequires: fdupes +BuildRequires: pkgconfig BuildRequires: python-rpm-macros BuildRequires: pkgconfig(portaudiocpp) -# SECTION test requirements -BuildRequires: %{python_module SoundFile >= 0.9.0} -BuildRequires: %{python_module numpy} -BuildRequires: %{python_module pytest >= 3.0} -BuildRequires: %{python_module sounddevice >= 0.3.9} -# /SECTION Requires: libsndfile Requires: portaudio Requires: python-SoundFile >= 0.9.0 Requires: python-cffi >= 1.0.0 Requires: python-pa-ringbuffer >= 0.1.2 Requires: python-sounddevice >= 0.3.9 +Requires(post): update-alternatives +Requires(postun): update-alternatives Recommends: python-numpy - +# SECTION test requirements +BuildRequires: %{python_module SoundFile >= 0.9.0} +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module pytest >= 3.0} +BuildRequires: %{python_module sounddevice >= 0.3.9} +# /SECTION %python_subpackages %description @@ -66,6 +68,7 @@ export CFLAGS="%{optflags}" %install %python_install +%python_clone -a %{buildroot}%{_bindir}/pastream %python_expand %fdupes %{buildroot}%{$python_sitearch} # Tests require an audio device @@ -76,10 +79,16 @@ export CFLAGS="%{optflags}" # } # popd +%post +%python_install_alternative pastream + +%postun +%python_uninstall_alternative pastream + %files %{python_files} %doc CHANGELOG.rst README.rst %license LICENSE -%python3_only %{_bindir}/pastream +%python_alternative %{_bindir}/pastream %{python_sitearch}/* %changelog