Accepting request 807612 from home:pgajdos:python

submit

OBS-URL: https://build.opensuse.org/request/show/807612
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyelftools?expand=0&rev=9
This commit is contained in:
Tomáš Chvátal 2020-05-20 11:29:10 +00:00 committed by Git OBS Bridge
parent 7f970f422a
commit 3b6492366b
2 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed May 20 07:26:24 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
- %python3_only -> %python_alternative
-------------------------------------------------------------------
Thu Mar 19 14:07:18 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>

View File

@ -28,6 +28,8 @@ Source: https://files.pythonhosted.org/packages/source/p/pyelftools/pyel
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
@ -45,6 +47,7 @@ rm test/test_pubtypes.py
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/readelf.py
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
@ -54,10 +57,16 @@ rm test/test_pubtypes.py
# https://github.com/eliben/pyelftools/wiki/Hacking-guide#tests
%python_exec test/run_readelf_tests.py || :
%post
%python_install_alternative readelf.py
%postun
%python_uninstall_alternative readelf.py
%files %{python_files}
%license LICENSE
%doc CHANGES
%python3_only %{_bindir}/readelf.py
%python_alternative %{_bindir}/readelf.py
%{python_sitelib}/*
%changelog