pyelftools/pyelftools.spec
2019-12-05 21:04:13 +08:00

66 lines
2.0 KiB
RPMSpec

Name: pyelftools
Version: 0.24
Release: 4
License: Public Domain
Summary: Parsing ELF and DWARF in Python
URL: https://github.com/eliben/pyelftools
Source0: https://files.pythonhosted.org/packages/source/p/pyelftools/pyelftools-%{version}.tar.gz
Patch0001: pyelftools-0.24-construct.patch
BuildRequires: python2-devel python2-setuptools python2-construct python3-devel python3-setuptools python3-construct
BuildArch: noarch
%description
This package provides a python library for parsing and
analyzing ELF files and DWARF debugging information.
%package -n python2-pyelftools
Summary: Parsing ELF and DWARF in Python
Requires: python2-construct
%{?python_provide:%python_provide python2-pyelftools}
%description -n python2-pyelftools
This package provides a python library for parsing and
analyzing ELF files and DWARF debugging information.
%package -n python3-pyelftools
Summary: Parsing ELF and DWARF in Python
Requires: python3-construct
%{?python_provide:%python_provide python3-pyelftools}
%description -n python3-pyelftools
This package provides a python library for parsing and
analyzing ELF files and DWARF debugging information.
%prep
%autosetup -p1
rm -rf elftools/construct
%build
%{py2_build}
%{py3_build}
%install
%{py2_install}
mv %{buildroot}/usr/bin/readelf.py %{buildroot}/usr/bin/py2readelf
%{py3_install}
mv %{buildroot}/usr/bin/readelf.py %{buildroot}/usr/bin/pyreadelf
%check
%{__python2} test/run_all_unittests.py
%{__python2} test/run_examples_test.py
%{__python2} test/run_readelf_tests.py || :
%{__python3} test/run_all_unittests.py
%{__python3} test/run_examples_test.py
%{__python3} test/run_readelf_tests.py || :
%files -n python2-pyelftools
%doc CHANGES LICENSE
%{_bindir}/py2readelf
%{python2_sitelib}/*
%files -n python3-pyelftools
%doc CHANGES LICENSE
%{_bindir}/pyreadelf
%{python3_sitelib}/*
%changelog
* Tue Dec 2 2019 likexin<likexin4@huawei.com> - 0.24-4
- Package init