# # spec file for package python-configparser # # Copyright (c) 2020 SUSE LLC # Copyright (c) 2016, Martin Hauke # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %if %{python3_version_nodots} >= 38 %define skip_python3 1 %endif %global flavor %{nil} %if "%{flavor}" == "test" %define psuffix -test %bcond_without test %else %define psuffix %{nil} %bcond_with test %endif Name: python-configparser%{psuffix} Version: 4.0.2 Release: 2.2 Summary: Backport of the enhanced config parser introduced in Python 3.x License: MIT Group: Development/Languages/Python URL: https://docs.python.org/3/library/configparser.html Source: https://files.pythonhosted.org/packages/source/c/configparser/configparser-%{version}.tar.gz BuildRequires: %{python_module backports} BuildRequires: %{python_module setuptools_scm >= 1.15.0} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-backports BuildArch: noarch %if %{with test} BuildRequires: %{python_module configparser >= %{version}} BuildRequires: %{python_module pytest >= 3.5} BuildRequires: python-devel BuildRequires: python-pathlib2 BuildRequires: python3-testsuite %endif %python_subpackages %description The ancient ConfigParser module available in the standard library 2.x has seen a major update in Python 3.x. This is a backport of those changes so that they can be used directly in Python 2.7. %prep %setup -q -n configparser-%{version} rm pytest.ini %build export LANG=en_US.UTF-8 %python_build %install %if !%{with test} export LANG=en_US.UTF-8 %python_install %python_expand rm -f %{buildroot}%{$python_sitelib}/backports/__init__.py* %python_expand rm -f %{buildroot}%{$python_sitelib}/backports/__pycache__/__init__* %python_expand %fdupes %{buildroot}%{$python_sitelib}/ %endif %check %if %{with test} %pytest %endif %if !%{with test} %files %{python_files} %doc README.rst CHANGES.rst %license LICENSE %{python_sitelib}/configparser.py* %pycache_only %{python_sitelib}/__pycache__ %{python_sitelib}/backports/configparser/ %{python_sitelib}/configparser-%{version}-py*.egg-info %endif %changelog * Wed Jan 15 2020 Tomáš Chvátal - Avoid the skip_python3 on 3.8 series, it is just useless package there but the conditions confuse OBS solver with multibuild * Fri Sep 13 2019 Tomáš Chvátal - Update to 4.0.2: * sync with upstream ptyhon releases * Tue Jul 9 2019 Tomáš Chvátal - Explain for what is the skip_python3 and make it build on SLE12 * Thu Jun 13 2019 Tomáš Chvátal - Switch to multibuild to avoid buildcycle * Tue Mar 26 2019 Tomáš Chvátal - Update to 3.7.4: * Project is now officially supported via Tidelift * Thu Feb 28 2019 Tomáš Chvátal - Update to 3.7.3: * Issue #34: Temporarily degrade to use ASCII for author's name. * Repackaged using setuptools_scm for file discovery and other features from `skeleton - Update to 3.7.1 * Fixed issue on Python 2.x when future is present (gh#jacaro/configparser#30) - Update to 3.7.0 * Merge functionality from Python 3.7.2. Now ConfigParser accepts bytes paths as well as any PathLike object, including those found in the pathlib2 backport . - Update to 3.5.3 * Reverted the limit on DeprecationWarning, as it had unintended consequences (gh#jacaro/configparser#27) - Update to 3.5.2 * Use environment markers to indicate the 'ordereddict' dependency for Python 2.6 (gh#jacaro/configparser#23) * Limit DeprecationWarning when a filename is indicated as a bytestring on Python 2. Now the warning is only emitted when py3kwarning is indicated (gh#jacaro/configparser#24) - Update to 3.5.1 * jaraco adopts the package. * Moved hosting to GitHub. * Updated backports namespace package to conform with other packages sharing the namespace (gh#jacaro/configparser#21) * Tue Dec 4 2018 Matej Cepl - Remove superfluous devel dependency for noarch package * Fri Mar 23 2018 toddrme2178@gmail.com - Switch to singlespec package - Build for python3 < 3.5 - Make structure consistent with other backports packages * Fri Jul 14 2017 toddrme2178@gmail.com - Remove backports subpackage. Since configparser is unmaintained, this is being moved to the maintained configparser2 package. * Fri Mar 31 2017 toddrme2178@gmail.com - %%{python_sitelib}/backports is a namespace package, and so under python 2.x it must have a proper %%{python_sitelib}/backports/__init__.py file. python-backports provides this __init__.py to prevent backports packages from conflicting. Please see the following links for more details: https://pypi.python.org/pypi/backports/ https://www.python.org/dev/peps/pep-0420/%%23namespace-packages-today * Thu Mar 30 2017 toddrme2178@gmail.com - Split backports directory into subpackage to allow the various packages that share the backports namespace to avoid conflicts. * Mon Mar 6 2017 jmatejek@suse.com - provide python2-configparser to seamlessly support singlespec - restore "unneeded file" that is actually needed * Tue Sep 6 2016 mardnh@gmx.de - initial package, version 3.5.0