]> git.pld-linux.org Git - packages/python-xdis.git/blame - python-xdis.spec
- release 2 (by relup.sh)
[packages/python-xdis.git] / python-xdis.spec
CommitLineData
a7f7dcb1
ER
1#
2# Conditional build:
3%bcond_without doc # don't build doc
5950e3a6 4%bcond_with tests # do not perform "make test"
a7f7dcb1
ER
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8bd6a7ca
JR
8%define module xdis
9%define egg_name xdis
a7f7dcb1
ER
10%define pypi_name xdis
11Summary: Python cross-version byte-code disassembler and marshal routines
12Name: python-%{module}
5950e3a6 13Version: 4.1.2
f4e9a286 14Release: 2
a7f7dcb1
ER
15License: MIT
16Group: Libraries/Python
17Source0: https://files.pythonhosted.org/packages/source/x/%{module}/%{module}-%{version}.tar.gz
5950e3a6 18# Source0-md5: 8aca98d1837df4b0073fe1cacd65d91d
a7f7dcb1
ER
19URL: https://github.com/rocky/python-xdis/
20BuildRequires: rpm-pythonprov
21BuildRequires: rpmbuild(macros) >= 1.714
22%if %{with python2}
23BuildRequires: python-nose >= 1.0
24BuildRequires: python-setuptools
25%endif
26%if %{with python3}
27BuildRequires: python3-nose >= 1.0
28BuildRequires: python3-setuptools
29%endif
30Requires: python-setuptools
31BuildArch: noarch
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35The Python dis module allows you to disassemble byte from the same
36version of Python that you are running on. But what about bytecode
37from different versions?
38
39That's what this package is for. It can marshal load Python bytecodes
40from different versions of Python. The command-line routine
41pydisssemble will show disassembly output using Python 3.5 disassembly
42conventions
43
44It accepts bytecodes from Python version 2.3 to 3.5 or so. The code
45requires Python 2.5 or later and has been tested on Python running
46versions 2.6, 2.7, pypy-5.0.1, 3.2, 3.3, 3.4 and 3.5.
47
48%package -n python3-%{pypi_name}
49Summary: Python cross-version byte-code disassembler and marshal routines
50Group: Libraries/Python
51Requires: python3-setuptools
52
53%description -n python3-%{pypi_name}
54The Python dis module allows you to disassemble byte from the same
55version of Python that you are running on. But what about bytecode
56from different versions?
57
58That's what this package is for. It can marshal load Python bytecodes
59from different versions of Python. The command-line routine
60pydisssemble will show disassembly output using Python 3.5 disassembly
61conventions
62
63It accepts bytecodes from Python version 2.3 to 3.5 or so. The code
64requires Python 2.5 or later and has been tested on Python running
65versions 2.6, 2.7, pypy-5.0.1, 3.2, 3.3, 3.4 and 3.5.
66
67%prep
68%setup -q -n %{module}-%{version}
69
70# Remove bundled egg-info
71%{__rm} -r %{module}.egg-info
72
73%build
74%if %{with python2}
5950e3a6
JR
75%py_build
76%{?with_tests:%{__make} PYTHON=python check}
a7f7dcb1
ER
77%endif
78
79%if %{with python3}
5950e3a6
JR
80%py3_build
81%{?with_tests:%{__make} PYTHON=python3 check}
a7f7dcb1
ER
82%endif
83
84%install
85rm -rf $RPM_BUILD_ROOT
86%if %{with python2}
87%py_install
88%py_postclean
5950e3a6 89%{__mv} $RPM_BUILD_ROOT%{_bindir}/pydisasm{,-2}
a7f7dcb1
ER
90%endif
91
92%if %{with python3}
93%py3_install
5950e3a6 94%{__mv} $RPM_BUILD_ROOT%{_bindir}/pydisasm{,-3}
a7f7dcb1
ER
95%endif
96
97%clean
98rm -rf $RPM_BUILD_ROOT
99
100%if %{with python2}
101%files
102%defattr(644,root,root,755)
103%doc README.rst
104%attr(755,root,root) %{_bindir}/pydisasm-2
105%{py_sitescriptdir}/%{module}
106%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
107%endif
108
109%if %{with python3}
110%files -n python3-%{pypi_name}
111%defattr(644,root,root,755)
112%doc README.rst
113%attr(755,root,root) %{_bindir}/pydisasm-3
114%{py3_sitescriptdir}/%{module}
115%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
116%endif
This page took 0.063991 seconds and 4 git commands to generate.