%if 0%{?fedora} && 0%{?fedora} < 31 %global with_python2 1 %endif Summary: A powerful declarative parser/builder for binary data Name: python-construct Version: 2.9.45 Release: 1%{?dist} License: MIT URL: http://construct.readthedocs.org Source0: https://pypi.python.org/packages/source/c/construct/construct-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel #BuildRequires: python2-pytest BuildRequires: python3-devel #BuildRequires: python3-pytest %global _description\ Construct is a powerful declarative parser (and builder) for binary\ data.\ \ Instead of writing imperative code to parse a piece of data, you\ declaratively define a data structure that describes your data. As\ this data structure is not code, you can use it in one direction to\ parse data into Pythonic objects, and in the other direction, convert\ (build) objects into binary data. %description %_description %if 0%{?with_python2} %package -n python2-construct Summary: %summary Requires: python2-six %{?python_provide:%python_provide python2-construct} %description -n python2-construct %_description %endif %package -n python3-construct Summary: %summary Requires: python3-six %description -n python3-construct %_description %prep %setup -q -n construct-%{version} %build %if 0%{?with_python2} %{py2_build} %endif %{py3_build} %install %if 0%{?with_python2} %{py2_install} %endif %{py3_install} %check # tests are not part of release tarball #{__python2} -m pytest --benchmark-disable --showlocals #{__python3} -m pytest --benchmark-disable --showlocals %if 0%{?with_python2} %files -n python2-construct %license LICENSE %doc README.rst %{python2_sitelib}/construct %{python2_sitelib}/construct-%{version}-py?.?.egg-info %endif %files -n python3-construct %license LICENSE %doc README.rst %{python3_sitelib}/construct %{python3_sitelib}/construct-%{version}-py?.?.egg-info %changelog * Mon May 13 2019 Terje Rosten - 2.9.45-1 - 2.9.45 - Remove Python 2 subpackage * Sat Feb 02 2019 Fedora Release Engineering - 2.5.1-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jul 13 2018 Fedora Release Engineering - 2.5.1-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 2.5.1-17 - Rebuilt for Python 3.7 * Mon May 21 2018 Terje Rosten - 2.5.1-16 - Add patch to fix Python 3 import issue (rhbz#1560199) * Mon Feb 12 2018 Terje Rosten - 2.5.1-15 - Clean up * Mon Feb 12 2018 Iryna Shcherbina - 2.5.1-14 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) * Fri Feb 09 2018 Fedora Release Engineering - 2.5.1-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 2.5.1-12 - Python 2 binary package renamed to python2-construct See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 * Thu Jul 27 2017 Fedora Release Engineering - 2.5.1-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 2.5.1-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 2.5.1-9 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 2.5.1-8 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 2.5.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Nov 10 2015 Fedora Release Engineering - 2.5.1-6 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Thu Jun 18 2015 Fedora Release Engineering - 2.5.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 2.5.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed May 14 2014 Bohuslav Kabrda - 2.5.1-3 - Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4 * Sun Aug 04 2013 Fedora Release Engineering - 2.5.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Sat Jun 08 2013 Terje Rosten - 2.5.1-1 - initial package