Name: python-configparser Version: 3.5.0 Release: 1%{?dist} Summary: Brings the updated configparser from Python 3.5 to Python 2.6-3.5 License: MIT URL: https://pypi.python.org/pypi/configparser Source0: https://files.pythonhosted.org/packages/7c/69/c2ce7e91c89dc073eb1aa74c0621c3eefbffe8216b3f9af9d3885265c01c/configparser-3.5.0.tar.gz BuildArch: noarch BuildRequires: python2-devel python-setuptools Requires: python-setuptools %description The ancient ConfigParser module available in the standard library 2.x has seen a major update in Python 3.2. This is a backport of those changes so that they can be used directly in Python 2.6 - 3.5. %package -n python3-configparser Summary: Brings the updated configparser from Python 3.5 to Python 2.6-3.5 BuildRequires: python3-devel python3-setuptools Requires: python3-configparser %description -n python3-configparser The ancient ConfigParser module available in the standard library 2.x has seen a major update in Python 3.2. This is a backport of those changes so that they can be used directly in Python 2.6 - 3.5. %prep %setup -q -n configparser-%{version} rm -rf src/configparser.egg-info rm -rf %{py3dir} cp -a . %{py3dir} %build pushd %{py3dir} %{__python3} setup.py build popd %{__python2} setup.py build %install pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root %{buildroot} popd # Revome shebang sed -i '\@^#!/usr/bin/env python@d' \ %{buildroot}%{python3_sitelib}/backports/configparser/__init__.py sed -i '\@^#!/usr/bin/env python@d' \ %{buildroot}%{python3_sitelib}/backports/configparser/helpers.py %{__python2} setup.py install -O1 --skip-build --root %{buildroot} # Remove shebang sed -i '\@^#!/usr/bin/env python@d' \ %{buildroot}%{python2_sitelib}/configparser.py sed -i '\@^#!/usr/bin/env python@d' \ %{buildroot}%{python2_sitelib}/backports/configparser/__init__.py sed -i '\@^#!/usr/bin/env python@d' \ %{buildroot}%{python2_sitelib}/backports/configparser/helpers.py %files %doc README.rst %{python2_sitelib}/configparser-%{version}-py%{python2_version}.egg-info %{python2_sitelib}/backports/configparser/ %{python2_sitelib}/configparser-%{version}-py%{python2_version}-nspkg.pth %{python2_sitelib}/configparser.py* %files -n python3-configparser %doc README.rst %{python3_sitelib}/configparser-%{version}-py%{python3_version}.egg-info %{python3_sitelib}/backports/configparser/ %{python3_sitelib}/configparser-%{version}-py%{python3_version}-nspkg.pth %changelog * Sat Aug 12 2017 Julien Enselme - 3.5.0-1 - Update to 3.5.0 * Wed Mar 04 2015 Julien Enselme - 3.5.0b2-0.1 - Initial packaging