forked from pool/python-pysaml2
- Don't use %python3_only command, but properly use alternatives.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pysaml2?expand=0&rev=34
This commit is contained in:
@@ -58,6 +58,8 @@ Requires: python-repoze.who
|
||||
Requires: python-requests >= 1.0.0
|
||||
Requires: python-six
|
||||
Requires: python-zope.interface
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
@@ -78,18 +80,27 @@ rm -f tests/test_30_mdstore*.py
|
||||
|
||||
%install
|
||||
%python_install
|
||||
for exec in make_metadata.py parse_xsd2.py mdexport.py merge_metadata.py ; do
|
||||
%python_clone -a %{buildroot}%{_bindir}/$exec
|
||||
done
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%pytest tests
|
||||
|
||||
%post
|
||||
%python_install_alternative make_metadata.py parse_xsd2.py mdexport.py merge_metadata.py
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative make_metadata.py parse_xsd2.py mdexport.py merge_metadata.py
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
%doc README.rst CHANGELOG.md
|
||||
%python3_only %{_bindir}/make_metadata.py
|
||||
%python3_only %{_bindir}/parse_xsd2.py
|
||||
%python3_only %{_bindir}/mdexport.py
|
||||
%python3_only %{_bindir}/merge_metadata.py
|
||||
%python3_alternative %{_bindir}/make_metadata.py
|
||||
%python3_alternative %{_bindir}/parse_xsd2.py
|
||||
%python3_alternative %{_bindir}/mdexport.py
|
||||
%python3_alternative %{_bindir}/merge_metadata.py
|
||||
%{python_sitelib}/*
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user