%global srcname pybeam %if 0%{?fedora} || 0%{?rhel} > 7 %global with_python3 1 %endif Name: python-%{srcname} Version: 0.3.2 Release: 11%{?dist} Summary: Python module to parse Erlang BEAM files License: MIT Group: Development/Languages URL: https://github.com/matwey/%{srcname} Source0: https://github.com/matwey/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz Patch1: python-pybeam-0001-Add-AtU8-beam-file-chunk-decoding-support.patch BuildArch: noarch %description Python module to parse Erlang BEAM files. %package -n python2-%{srcname} Summary: %{summary} BuildRequires: python2-construct BuildRequires: python2-devel BuildRequires: python2-setuptools Requires: python2-construct Requires: python2-six >= 1.4.0 %description -n python2-%{srcname} Python module to parse Erlang BEAM files. %if 0%{?with_python3} %package -n python3-%{srcname} Summary: %{summary} BuildRequires: python3-construct BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-construct Requires: python3-six >= 1.4.0 %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} Python module to parse Erlang BEAM files. %endif %prep %autosetup -p1 -n %{srcname}-%{version} %build %py2_build %if 0%{?with_python3} %py3_build %endif %install # Must do the python2 install first because the scripts in /usr/bin are # overwritten with every setup.py install, and in general we want the # python3 version to be the default. %py2_install %if 0%{?with_python3} %py3_install %endif %check %{__python2} setup.py test %if 0%{?with_python3} %{__python3} setup.py test %endif %files -n python2-%{srcname} %license LICENSE %doc README.md %{python2_sitelib}/* %if 0%{?with_python3} %files -n python3-%{srcname} %license LICENSE %doc README.md %{python3_sitelib}/* %endif %changelog * Tue Jun 19 2018 Miro Hrončok - 0.3.2-11 - Rebuilt for Python 3.7 * Wed Mar 21 2018 Peter Lemenkov - 0.3.2-10 - Fix BEAM-files parsing generated with Erlang 20 * Mon Feb 12 2018 Iryna Shcherbina - 0.3.2-9 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) * Fri Feb 09 2018 Fedora Release Engineering - 0.3.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Fri Sep 29 2017 Troy Dawson - 0.7.19-5 - Cleanup spec file conditionals * Thu Jul 27 2017 Fedora Release Engineering - 0.3.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.3.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 0.3.2-4 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 0.3.2-3 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Tue Jun 7 2016 Peter Lemenkov - 0.3.2-2 - Build for EL7 * Mon Feb 15 2016 Peter Lemenkov - 0.3.2-1 - Initial build