]> git.pld-linux.org Git - packages/python-uncompyle6.git/blame - python-uncompyle6.spec
- up to 3.5.0
[packages/python-uncompyle6.git] / python-uncompyle6.spec
CommitLineData
7dc1b643
ER
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
41d7062e
JR
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
7dc1b643 6
41d7062e
JR
7%define module uncompyle6
8%define egg_name uncompyle6
7dc1b643 9%define pypi_name uncompyle6
48d68929 10Summary: A Python decompiler, disassembler and cross-version bytecode library
7dc1b643 11Name: python-%{pypi_name}
f97a680d
JR
12Version: 3.5.0
13Release: 1
b65cedb5 14License: MIT
48d68929 15Group: Applications
f97a680d
JR
16Source0: https://github.com/rocky/python-uncompyle6/archive/%{version}/%{name}-%{version}.tar.gz
17# Source0-md5: 2e7f32b662a565a843b1de3bfd54a5b6
48d68929 18URL: https://github.com/rocky/python-uncompyle6/
41d7062e
JR
19%if %{with python2}
20BuildRequires: python-modules
21BuildRequires: python-pytest
22BuildRequires: python-setuptools
23BuildRequires: python-spark_parser
24BuildRequires: python-xdis
25%endif
26%if %{with python3}
27BuildRequires: python3-modules
28BuildRequires: python3-pytest
29BuildRequires: python3-setuptools
30BuildRequires: python3-spark_parser
31BuildRequires: python3-xdis
32%endif
48d68929
ER
33BuildRequires: rpm-pythonprov
34BuildRequires: rpmbuild(macros) >= 1.219
35BuildArch: noarch
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39uncompyle6 translates Python bytecode back into equivalent Python
40source code. It accepts bytecodes from Python version 2.5 to 3.4 or so
41and has been tested on Python running versions 2.6, 2.7, 3.3, 3.4 and
423.5.
43
41d7062e
JR
44%package -n python3-%{module}
45Summary: A Python decompiler, disassembler and cross-version bytecode library
46Group: Libraries/Python
47Requires: python3-modules
48
49%description -n python3-%{module}
50uncompyle6 translates Python bytecode back into equivalent Python
51source code. It accepts bytecodes from Python version 2.5 to 3.4 or so
52and has been tested on Python running versions 2.6, 2.7, 3.3, 3.4 and
533.5.
54
48d68929 55%prep
f97a680d 56%setup -q
48d68929 57
2b1b691d
JR
58# There is something wrong with this file that breaks tests
59%{__rm} test/bytecode_2.4/02_complex.pyc
60
48d68929 61%build
41d7062e 62%if %{with python2}
48d68929 63%py_build
41d7062e 64%endif
48d68929 65
41d7062e
JR
66%if %{with python3}
67%py3_build
7dc1b643
ER
68%endif
69
41d7062e
JR
70%{?with_tests:%{__make} PYTHONPATH=$(pwd) check}
71
48d68929
ER
72%install
73rm -rf $RPM_BUILD_ROOT
41d7062e
JR
74
75%if %{with python3}
76%py3_install
77
78%{__mv} $RPM_BUILD_ROOT%{_bindir}/{pydisassemble,py3disassemble}
79%{__mv} $RPM_BUILD_ROOT%{_bindir}/{uncompyle6,py3uncompyle6}
80%endif
81
82%if %{with python2}
48d68929
ER
83%py_install
84%py_postclean
41d7062e 85%endif
48d68929
ER
86
87%clean
88rm -rf $RPM_BUILD_ROOT
89
41d7062e 90%if %{with python2}
48d68929
ER
91%files
92%defattr(644,root,root,755)
93%attr(755,root,root) %{_bindir}/pydisassemble
94%attr(755,root,root) %{_bindir}/uncompyle6
7dc1b643
ER
95%{py_sitescriptdir}/%{module}
96%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
41d7062e
JR
97%endif
98
99%if %{with python3}
100%files -n python3-%{module}
101%defattr(644,root,root,755)
102%attr(755,root,root) %{_bindir}/py3disassemble
103%attr(755,root,root) %{_bindir}/py3uncompyle6
104%{py3_sitescriptdir}/%{module}
105%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
106%endif
This page took 0.116557 seconds and 4 git commands to generate.