From be8cf0e39f658d4b477bbab6df70cd30b289f127d77c76fff13a755e337c788a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 29 Dec 2020 20:45:30 +0000 Subject: [PATCH] Accepting request 858994 from home:bnavigator:branches:devel:languages:python - Support for multiple python3 flavors * Put standalone command under update-alternatives control * test pyside2 only with primary python3 flavor * gh#openSUSE/python-rpm-macros#66 OBS-URL: https://build.opensuse.org/request/show/858994 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-QDarkStyle?expand=0&rev=11 --- python-QDarkStyle.changes | 8 ++++++++ python-QDarkStyle.spec | 19 ++++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/python-QDarkStyle.changes b/python-QDarkStyle.changes index 03275aa..04a6175 100644 --- a/python-QDarkStyle.changes +++ b/python-QDarkStyle.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Dec 23 22:53:30 UTC 2020 - Benjamin Greiner + +- Support for multiple python3 flavors + * Put standalone command under update-alternatives control + * test pyside2 only with primary python3 flavor + * gh#openSUSE/python-rpm-macros#66 + ------------------------------------------------------------------- Mon May 18 13:43:58 UTC 2020 - Antonio Larrosa diff --git a/python-QDarkStyle.spec b/python-QDarkStyle.spec index 4dab852..0a461e8 100644 --- a/python-QDarkStyle.spec +++ b/python-QDarkStyle.spec @@ -46,10 +46,11 @@ BuildArch: noarch BuildRequires: %{python_module QDarkStyle = %{version}} BuildRequires: %{python_module QtPy >= 1.9} BuildRequires: %{python_module helpdev >= 0.6.10} -BuildRequires: %{python_module pyside2} BuildRequires: %{python_module pytest-qt} BuildRequires: %{python_module pytest} BuildRequires: %{python_module qt5-devel} +# pyside2 is for primary python3 flavor only +BuildRequires: python3-pyside2 BuildRequires: xvfb-run %endif %python_subpackages @@ -73,23 +74,31 @@ export PYTHONDONTWRITEBYTECODE=1 %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} xvfb-run $python example/example.py --qt_from=pyqt5 --test %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} xvfb-run $python example/example.py --qt_from=pyqt5 --test --no_dark -%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} xvfb-run $python example/example.py --qt_from=pyside2 --test -%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} xvfb-run $python example/example.py --qt_from=pyside2 --test --no_dark +# pyside2 is for primary python3 flavor only +PYTHONPATH=%{buildroot}%{python3_sitelib} xvfb-run python3 example/example.py --qt_from=pyside2 --test +PYTHONPATH=%{buildroot}%{python3_sitelib} xvfb-run python3 example/example.py --qt_from=pyside2 --test --no_dark %endif %install %if !%{with test} %python_install +%python_clone -a %{buildroot}%{_bindir}/qdarkstyle %python_expand %fdupes %{buildroot}%{$python_sitelib} %endif +%post +%python_install_alternative qdarkstyle + +%postun +%python_uninstall_alternative qdarkstyle + %if !%{with test} %files %{python_files} %doc AUTHORS.rst CHANGES.rst README.rst %license LICENSE.rst -%{_bindir}/qdarkstyle +%python_alternative %{_bindir}/qdarkstyle %{python_sitelib}/qdarkstyle -%{python_sitelib}/QDarkStyle-*.egg-info +%{python_sitelib}/QDarkStyle-%{version}*-info %endif %changelog