diff --git a/pyelftools.spec b/pyelftools.spec index 3f97019..9f0345d 100644 --- a/pyelftools.spec +++ b/pyelftools.spec @@ -18,6 +18,9 @@ %global with_python3 1 %endif +# main package is archful to run tests everywhere but produces noarch packages +%global debug_package %{nil} + Summary: Pure-Python library for parsing and analyzing ELF files Name: pyelftools Version: 0.26 @@ -27,15 +30,6 @@ URL: https://github.com/eliben/pyelftools # https://github.com/eliben/pyelftools/issues/260 #Source0: https://files.pythonhosted.org/packages/source/p/pyelftools/pyelftools-%{version}.tar.gz Source0: https://github.com/eliben/pyelftools/archive/v%{version}/%{name}-%{version}.tar.gz -%if 0%{?with_python2} -BuildRequires: python2-devel -BuildRequires: python2-setuptools -%endif -%if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -%endif -BuildArch: noarch %global _description \ Pure-Python library for parsing and analyzing ELF files\ and DWARF debugging information. @@ -45,6 +39,9 @@ and DWARF debugging information. %package -n python2-%{name} Summary: %{summary} Requires: python2-construct +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildArch: noarch %{?python_provide:%python_provide python2-%{name}} # Remove before F30 %description -n python2-%{name} %_description @@ -54,6 +51,9 @@ Requires: python2-construct %package -n python3-%{name} Summary: %{summary} Requires: python3-construct +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildArch: noarch %{?python_provide:%python_provide python3-%{name}} %description -n python3-%{name} %_description %endif @@ -83,17 +83,21 @@ mv %{buildroot}/usr/bin/readelf.py %{buildroot}/usr/bin/%{py3readelf} %if 0%{?with_python2} %{__python2} test/run_all_unittests.py %{__python2} test/run_examples_test.py +%ifarch x86_64 # tests may fail because of differences in output-formatting # from binutils' readelf. See: # https://github.com/eliben/pyelftools/wiki/Hacking-guide#tests %{__python2} test/run_readelf_tests.py || : %endif +%endif %if 0%{?with_python3} %{__python3} test/run_all_unittests.py %{__python3} test/run_examples_test.py +%ifarch x86_64 # ditto %{__python3} test/run_readelf_tests.py || : %endif +%endif %if 0%{?with_python2} %files -n python2-%{name} @@ -116,6 +120,9 @@ mv %{buildroot}/usr/bin/readelf.py %{buildroot}/usr/bin/%{py3readelf} %changelog * Tue Dec 17 2019 Dominik Mierzejewski - 0.26-1 - update to 0.26 (#1780153) +- make main package archful to run tests on all arches + (pythonN-pyelftools subpackages are still noarch) +- run readelf tests on x86_64 only for now * Thu Oct 03 2019 Miro HronĨok - 0.25-5 - Rebuilt for Python 3.8.0rc1 (#1748018)