]> git.pld-linux.org Git - packages/python-elftools.git/blame - python-elftools.spec
rebuild with python 3.10
[packages/python-elftools.git] / python-elftools.spec
CommitLineData
29e92779
JK
1#
2# TODO:
3# - check why the tests fail
4#
5# Conditional build:
6%bcond_with tests # run tests
7%bcond_without python2 # CPython 2.x module
8%bcond_without python3 # CPython 3.x module
9
10%define module elftools
11Summary: Pure-Python library for parsing and analyzing ELF files
f2dda54f 12Summary(pl.UTF-8): Czysto pythonowa biblioteka do analizy plików ELF
29e92779
JK
13Name: python-%{module}
14Version: 0.23
bff63d15 15Release: 10
29e92779
JK
16License: public domain
17Group: Libraries/Python
18Source0: https://pypi.python.org/packages/source/p/pyelftools/pyelftools-%{version}.tar.gz
19# Source0-md5: aa7cefa8bd2f63d7b017440c9084f310
20URL: https://github.com/eliben/pyelftools
21BuildRequires: rpm-pythonprov
d1869374 22BuildRequires: rpmbuild(macros) >= 1.710
29e92779
JK
23%if %{with python2}
24BuildRequires: python-devel
25BuildRequires: python-setuptools
26%endif
27%if %{with python3}
28BuildRequires: python3-devel
29BuildRequires: python3-setuptools
30%endif
31Requires: python-modules
32BuildArch: noarch
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36pyelftools is a pure-Python library for parsing and analyzing ELF
37files and DWARF debugging information.
38
f2dda54f
JB
39%description -l pl.UTF-8
40pyelftools to czysto pythonowa biblioteka do analizy plików ELF oraz
41informacji dla debuggera DWARF.
42
29e92779
JK
43%package -n python3-%{module}
44Summary: Pure-Python library for parsing and analyzing ELF files
f2dda54f 45Summary(pl.UTF-8): Czysto pythonowa biblioteka do analizy plików ELF
29e92779
JK
46Group: Libraries/Python
47Requires: python3-modules
48
49%description -n python3-%{module}
50pyelftools is a pure-Python library for parsing and analyzing ELF
51files and DWARF debugging information.
52
f2dda54f
JB
53%description -n python3-%{module} -l pl.UTF-8
54pyelftools to czysto pythonowa biblioteka do analizy plików ELF oraz
55informacji dla debuggera DWARF.
56
29e92779
JK
57%prep
58%setup -q -n pyelftools-%{version}
59
60%build
61%if %{with python2}
e31ddc23 62%py_build
29e92779
JK
63
64%if %{with tests}
65%{__python} ./test/all_tests.py
66%endif
67%endif
68
69%if %{with python3}
e31ddc23 70%py3_build %{?with_tests:test}
29e92779
JK
71
72%if %{with tests}
73%{__python3} ./test/all_tests.py
74%endif
75%endif
76
77%install
78rm -rf $RPM_BUILD_ROOT
79
80%if %{with python2}
e31ddc23 81%py_install
29e92779
JK
82
83%py_postclean
84%endif
85
86%if %{with python3}
e31ddc23 87%py3_install
29e92779
JK
88%endif
89
f2dda54f
JB
90# readelf clone example
91%{__rm} $RPM_BUILD_ROOT%{_bindir}/readelf.py
92
29e92779
JK
93%clean
94rm -rf $RPM_BUILD_ROOT
95
96%if %{with python2}
97%files
98%defattr(644,root,root,755)
99%doc LICENSE CHANGES
100%{py_sitescriptdir}/%{module}
101%{py_sitescriptdir}/pyelftools-%{version}-py*.egg-info
102%endif
103
104%if %{with python3}
105%files -n python3-%{module}
106%defattr(644,root,root,755)
107%doc LICENSE CHANGES
108%{py3_sitescriptdir}/%{module}
109%{py3_sitescriptdir}/pyelftools-%{version}-py*.egg-info
110%endif
This page took 0.145903 seconds and 4 git commands to generate.