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