[packages/python-uncompyle6] - added python 3 package - rel 2
baggins
baggins at pld-linux.org
Wed Jul 13 10:42:01 CEST 2016
commit 41d7062e1fabe71d7299a382145f02dbab026b9d
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Wed Jul 13 10:41:40 2016 +0200
- added python 3 package
- rel 2
python-uncompyle6.spec | 62 ++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 57 insertions(+), 5 deletions(-)
---
diff --git a/python-uncompyle6.spec b/python-uncompyle6.spec
index 1c4cfc4..b3b80f4 100644
--- a/python-uncompyle6.spec
+++ b/python-uncompyle6.spec
@@ -1,19 +1,35 @@
#
# Conditional build:
%bcond_without tests # do not perform "make test"
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
-%define module uncompyle6
-%define egg_name uncompyle6
+%define module uncompyle6
+%define egg_name uncompyle6
%define pypi_name uncompyle6
Summary: A Python decompiler, disassembler and cross-version bytecode library
Name: python-%{pypi_name}
Version: 2.6.0
-Release: 1
+Release: 2
License: MIT
Group: Applications
Source0: https://github.com/rocky/python-uncompyle6/archive/release-%{version}/%{name}-%{version}.tar.gz
# Source0-md5: bfa928d524c800d4c61ff46e3c119e6e
URL: https://github.com/rocky/python-uncompyle6/
+%if %{with python2}
+BuildRequires: python-modules
+BuildRequires: python-pytest
+BuildRequires: python-setuptools
+BuildRequires: python-spark_parser
+BuildRequires: python-xdis
+%endif
+%if %{with python3}
+BuildRequires: python3-modules
+BuildRequires: python3-pytest
+BuildRequires: python3-setuptools
+BuildRequires: python3-spark_parser
+BuildRequires: python3-xdis
+%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.219
BuildArch: noarch
@@ -25,27 +41,63 @@ source code. It accepts bytecodes from Python version 2.5 to 3.4 or so
and has been tested on Python running versions 2.6, 2.7, 3.3, 3.4 and
3.5.
+%package -n python3-%{module}
+Summary: A Python decompiler, disassembler and cross-version bytecode library
+Group: Libraries/Python
+Requires: python3-modules
+
+%description -n python3-%{module}
+uncompyle6 translates Python bytecode back into equivalent Python
+source code. It accepts bytecodes from Python version 2.5 to 3.4 or so
+and has been tested on Python running versions 2.6, 2.7, 3.3, 3.4 and
+3.5.
+
%prep
%setup -qn %{name}-release-%{version}
%build
+%if %{with python2}
%py_build
+%endif
-%if %{with tests}
-%{__make} PYTHONPATH=$(pwd) check
+%if %{with python3}
+%py3_build
%endif
+%{?with_tests:%{__make} PYTHONPATH=$(pwd) check}
+
%install
rm -rf $RPM_BUILD_ROOT
+
+%if %{with python3}
+%py3_install
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/{pydisassemble,py3disassemble}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/{uncompyle6,py3uncompyle6}
+%endif
+
+%if %{with python2}
%py_install
%py_postclean
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/pydisassemble
%attr(755,root,root) %{_bindir}/uncompyle6
%{py_sitescriptdir}/%{module}
%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/py3disassemble
+%attr(755,root,root) %{_bindir}/py3uncompyle6
+%{py3_sitescriptdir}/%{module}
+%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-uncompyle6.git/commitdiff/41d7062e1fabe71d7299a382145f02dbab026b9d
More information about the pld-cvs-commit
mailing list