[packages/python-configparser] - updated to 4.0.2 - removed outdated backports-dont-use-setuptools-namespace patch
qboosh
qboosh at pld-linux.org
Tue Oct 22 20:26:55 CEST 2019
commit 0fbef2344fd980e50b12bf94eadd65377efaf1e3
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Oct 22 20:30:25 2019 +0200
- updated to 4.0.2
- removed outdated backports-dont-use-setuptools-namespace patch
backports-dont-use-setuptools-namespace.patch | 11 ----
python-configparser.spec | 89 ++++++++++++++++++++++-----
2 files changed, 72 insertions(+), 28 deletions(-)
---
diff --git a/python-configparser.spec b/python-configparser.spec
index c558e39..293c711 100644
--- a/python-configparser.spec
+++ b/python-configparser.spec
@@ -1,34 +1,52 @@
#
# Conditional build:
+%bcond_without doc # Sphinx documentation
%bcond_without tests # do not perform "make test"
%bcond_without python2 # CPython 2.x module
-%bcond_with python3 # CPython 3.x module (not needed for Python 3.5+)
+%bcond_with python3 # CPython 3.x module (not needed for Python 3.7+)
-Summary: Updated configparser from Python 3.5 to Python 2
-Summary(pl.UTF-8): Uaktualniony configparser z Pythona 3.5 do Pythona 2
+Summary: Updated configparser from Python 3.7 to Python 2
+Summary(pl.UTF-8): Uaktualniony configparser z Pythona 3.7 do Pythona 2
Name: python-configparser
-Version: 3.5.0
-Release: 4
+Version: 4.0.2
+Release: 1
License: BSD
Group: Libraries/Python
-#Source0Download: https://pypi.python.org/simple/configparser/
+#Source0Download: https://pypi.org/simple/configparser/
Source0: https://files.pythonhosted.org/packages/source/c/configparser/configparser-%{version}.tar.gz
-# Source0-md5: cfdd915a5b7a6c09917a64a573140538
-# https://bitbucket.org/ambv/configparser/issues/21/configparser-should-not-declare-a
-Patch0: backports-dont-use-setuptools-namespace.patch
-URL: https://pypi.python.org/pypi/configparser
+# Source0-md5: 35926cc4b9133f1f9ca70a1fd2fdf237
+URL: https://pypi.org/project/configparser/
%if %{with python2}
BuildRequires: python >= 1:2.6
BuildRequires: python-modules >= 1:2.6
BuildRequires: python-setuptools
+BuildRequires: python-setuptools_scm >= 1.15.0
+%if %{with additional_tests}
+BuildRequires: python-pytest >= 3.5
+BuildRequires: python-pytest-black-multipy
+BuildRequires: python-pytest-checkdocs >= 1.2
+BuildRequires: python-pytest-flake8
+%endif
%endif
%if %{with python3}
BuildRequires: python3 >= 1:3.4
BuildRequires: python3-modules >= 1:3.4
BuildRequires: python3-setuptools
+BuildRequires: python3-setuptools_scm >= 1.15.0
+%if %{with additional_tests}
+BuildRequires: python3-pytest >= 3.5
+BuildRequires: python3-pytest-black-multipy
+BuildRequires: python3-pytest-checkdocs >= 1.2
+BuildRequires: python3-pytest-flake8
+%endif
%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires: python3-jaraco.packaging >= 3.2
+BuildRequires: python3-rst.linker >= 1.9
+BuildRequires: sphinx-pdg-3
+%endif
Requires: python-backports
Requires: python-modules >= 1:2.6
BuildArch: noarch
@@ -37,42 +55,64 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%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.
+changes so that they can be used directly in Python 2.6 - 3.6.
%description -l pl.UTF-8
Przestarzały moduł ConfigParser dostępny w bibliotece standardowej
Pythona 2.x został znacząco uaktualniony w Pythonie 3.2. Niniejszy
moduł zawiera backport tych zmian, aby można ich było używać
-bezpośrednio w Pythonie 2.6 - 3.5.
+bezpośrednio w Pythonie 2.6 - 3.6.
%package -n python3-configparser
-Summary: Updated configparser from Python 3.5 to older Python 3
-Summary(pl.UTF-8): Uaktualniony configparser z Pythona 3.5 do starszego Pythona 3
+Summary: Updated configparser from Python 3.7 to older Python 3
+Summary(pl.UTF-8): Uaktualniony configparser z Pythona 3.7 do starszego Pythona 3
Group: Libraries/Python
Requires: python3-modules >= 1:3.4
%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.
+changes so that they can be used directly in Python 2.6 - 3.6.
%description -n python3-configparser -l pl.UTF-8
Przestarzały moduł ConfigParser dostępny w bibliotece standardowej
Pythona 2.x został znacząco uaktualniony w Pythonie 3.2. Niniejszy
moduł zawiera backport tych zmian, aby można ich było używać
-bezpośrednio w Pythonie 2.6 - 3.5.
+bezpośrednio w Pythonie 2.6 - 3.6.
+
+%package apidocs
+Summary: API documentation for Python configparser module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona configparser
+Group: Documentation
+
+%description apidocs
+API documentation for Python configparser module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona configparser.
%prep
%setup -q -n configparser-%{version}
-%patch0 -p1
%build
%if %{with python2}
%py_build
+
+%if %{with tests}
+%{__python} -m unittest discover -s src
+%endif
%endif
%if %{with python3}
%py3_build
+
+%if %{with tests}
+%{__python3} -m unittest discover -s src
+%endif
+%endif
+
+%if %{with doc}
+sphinx-build-3 -b html docs docs/_build/html
%endif
%install
@@ -87,10 +127,17 @@ rm -rf $RPM_BUILD_ROOT
# hack for: import configparser and from backports import configparser to work
ln -s ../../configparser.pyc $RPM_BUILD_ROOT%{py_sitescriptdir}/backports/configparser/
ln -s ../../configparser.pyo $RPM_BUILD_ROOT%{py_sitescriptdir}/backports/configparser/
+
+# belongs to python-backports.spec
+%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/backports/__init__.py*
%endif
%if %{with python3}
%py3_install
+
+# belongs to python-backports.spec
+%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/backports/__init__.py*
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/backports/__pycache__
%endif
%clean
@@ -110,5 +157,13 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc README.rst configparser.rst
%{py3_sitescriptdir}/backports/configparser
+%{py3_sitescriptdir}/configparser.py
+%{py3_sitescriptdir}/__pycache__/configparser.cpython-*.py[co]
%{py3_sitescriptdir}/configparser-%{version}-py*.egg-info
%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_static,*.html,*.js}
+%endif
diff --git a/backports-dont-use-setuptools-namespace.patch b/backports-dont-use-setuptools-namespace.patch
deleted file mode 100644
index f081adc..0000000
--- a/backports-dont-use-setuptools-namespace.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -urN configparser-3.5.0.org/setup.py configparser-3.5.0/setup.py
---- configparser-3.5.0.org/setup.py 2016-05-21 10:14:22.000000000 +0200
-+++ configparser-3.5.0/setup.py 2018-11-30 11:17:12.134505201 +0100
-@@ -42,7 +42,6 @@
- py_modules=modules,
- package_dir={'': 'src'},
- packages=find_packages('src'),
-- namespace_packages=['backports'],
- include_package_data=True,
- zip_safe=False,
- install_requires=requirements,
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-configparser.git/commitdiff/0fbef2344fd980e50b12bf94eadd65377efaf1e3
More information about the pld-cvs-commit
mailing list