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

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ptr?expand=0&rev=6
This commit is contained in:
2020-05-18 20:14:38 +00:00
committed by Git OBS Bridge
parent 5cd7e03894
commit 9abd1d0df2
2 changed files with 14 additions and 0 deletions

View File

@@ -29,6 +29,8 @@ BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
# Conflicts on site-packages/ptr.py
Conflicts: python-pytest-runner
BuildArch: noarch
@@ -47,12 +49,19 @@ sed -i '1{/^#!/d}' *.py
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/ptr
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python %{buildroot}%{_bindir}/ptr --help
%python_exec setup.py test
%post
%python_install_alternative ptr
%postun
%python_uninstall_alternative ptr
%files %{python_files}
%doc CHANGES.md README.md
%python3_only %{_bindir}/ptr