]> git.pld-linux.org Git - packages/python-uncompyle6.git/blame - python-uncompyle6.spec
- added python 3 package
[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}
af3636b1 12Version: 2.6.0
41d7062e 13Release: 2
b65cedb5 14License: MIT
48d68929 15Group: Applications
8020bffe 16Source0: https://github.com/rocky/python-uncompyle6/archive/release-%{version}/%{name}-%{version}.tar.gz
af3636b1 17# Source0-md5: bfa928d524c800d4c61ff46e3c119e6e
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
b65cedb5 56%setup -qn %{name}-release-%{version}
48d68929
ER
57
58%build
41d7062e 59%if %{with python2}
48d68929 60%py_build
41d7062e 61%endif
48d68929 62
41d7062e
JR
63%if %{with python3}
64%py3_build
7dc1b643
ER
65%endif
66
41d7062e
JR
67%{?with_tests:%{__make} PYTHONPATH=$(pwd) check}
68
48d68929
ER
69%install
70rm -rf $RPM_BUILD_ROOT
41d7062e
JR
71
72%if %{with python3}
73%py3_install
74
75%{__mv} $RPM_BUILD_ROOT%{_bindir}/{pydisassemble,py3disassemble}
76%{__mv} $RPM_BUILD_ROOT%{_bindir}/{uncompyle6,py3uncompyle6}
77%endif
78
79%if %{with python2}
48d68929
ER
80%py_install
81%py_postclean
41d7062e 82%endif
48d68929
ER
83
84%clean
85rm -rf $RPM_BUILD_ROOT
86
41d7062e 87%if %{with python2}
48d68929
ER
88%files
89%defattr(644,root,root,755)
90%attr(755,root,root) %{_bindir}/pydisassemble
91%attr(755,root,root) %{_bindir}/uncompyle6
7dc1b643
ER
92%{py_sitescriptdir}/%{module}
93%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
41d7062e
JR
94%endif
95
96%if %{with python3}
97%files -n python3-%{module}
98%defattr(644,root,root,755)
99%attr(755,root,root) %{_bindir}/py3disassemble
100%attr(755,root,root) %{_bindir}/py3uncompyle6
101%{py3_sitescriptdir}/%{module}
102%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
103%endif
This page took 0.079196 seconds and 4 git commands to generate.