- Don't use %python3_only command, but properly use alternatives.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tempora?expand=0&rev=19
This commit is contained in:
Matej Cepl 2020-04-14 09:13:04 +00:00 committed by Git OBS Bridge
parent c1c01433da
commit 158c3d144b
2 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Apr 14 09:12:12 UTC 2020 - Matej Cepl <mcepl@suse.com>
- Don't use %python3_only command, but properly use alternatives.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 26 11:21:36 UTC 2020 - pgajdos@suse.com Thu Mar 26 11:21:36 UTC 2020 - pgajdos@suse.com

View File

@ -40,6 +40,8 @@ Requires: python-pytz
Requires: python-setuptools Requires: python-setuptools
Requires: python-six Requires: python-six
BuildArch: noarch BuildArch: noarch
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages %python_subpackages
%description %description
@ -58,16 +60,23 @@ Modules include:
%install %install
%python_install %python_install
%python_clone -a %{buildroot}%{_bindir}/calc-prorate
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%check %check
sed -i -e 's:--black::' -e 's:--cov::' -e 's/--flake8//g' pytest.ini sed -i -e 's:--black::' -e 's:--cov::' -e 's/--flake8//g' pytest.ini
%pytest %pytest
%post
%python_install_alternative calc-prorate
%postun
%python_uninstall_alternative calc-prorate
%files %{python_files} %files %{python_files}
%license LICENSE %license LICENSE
%doc CHANGES.rst README.rst docs/*rst %doc CHANGES.rst README.rst docs/*rst
%python3_only %{_bindir}/calc-prorate %python_alternative %{_bindir}/calc-prorate
%{python_sitelib}/* %{python_sitelib}/*
%changelog %changelog