File python-iniparse.spec of Package python3-iniparse
#
# spec file for package python-iniparse
#
# Copyright (c) 2025 SUSE LLC and contributors
# Copyright (c) 2017 Neal Gompa <ngompa13@gmail.com>.
#
# 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/
#
%{?sle15_python_module_pythons}
Name: python-iniparse
Version: 0.5
Release: lp160.78.1
Summary: Python Module for Accessing and Modifying Configuration Data in INI files
License: MIT
URL: https://github.com/candlepin/python-iniparse
Source: https://files.pythonhosted.org/packages/source/i/iniparse/iniparse-%{version}.tar.gz
# PATCH-FIX-UPSTREAM: speilicke@suse.com -- Backport of https://code.google.com/p/iniparse/issues/detail?id=31
Patch0: iniparse-insert-after-commented-option.patch
# https://github.com/candlepin/python-iniparse/commit/28dddd6f45fb5928d1477d14fac5daca92ffbb4c
Patch1: python-iniparse-no-python2.patch
# https://github.com/candlepin/python-iniparse/commit/b3684a45d02af784d3d8f6ea680a351b38a865dc
Patch2: python-iniparse-no-six.patch
# from https://github.com/candlepin/python-iniparse/pull/24
Patch3: python311-compat.patch
# PATCH-FIX-UPSTREAM: python3117.patch gh#candlepin/python-iniparse#29
Patch4: python3117.patch
# PATCH-FIX-UPSTREAM Based on gh#candlepin/python-iniparse#32
Patch5: use-load-tests.patch
# PATCH-FIX-UPSTREAM https://github.com/candlepin/python-iniparse/commit/42d34719f01229b25d2725cb56e7a527a3ec35cc Avoid the multiprocessing forkserver method
Patch6: py314.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module testsuite}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
%python_subpackages
%description
iniparse is an INI parser for Python which is API compatible with the
standard library's ConfigParser, preserves structure of INI files
(order of sections & options, indentation, comments, and blank lines
are preserved when data is updated), and is more convenient to use.
%prep
%autosetup -p1 -n iniparse-%{version}
chmod 644 html/index.html
%build
%pyproject_wheel
%install
%pyproject_install
rm -rf %{buildroot}%{_datadir}/doc/iniparse-%{version} # Remove unwanted stuff
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_exec runtests.py -v
%files %{python_files}
%license LICENSE
%doc Changelog LICENSE-PSF README.md html/*
%{python_sitelib}/iniparse
%{python_sitelib}/iniparse-%{version}.dist-info
%changelog
* Mon Sep 8 2025 Markéta Machová <mmachova@suse.com>
- Add py314.patch to fix tests with Python 3.14
* Wed Aug 28 2024 Steve Kowalik <steven.kowalik@suse.com>
- Add patch use-load-tests.patch:
* Use the load tests protocol to run the testsuite.
* Fri Jun 21 2024 Manuel Jacob <me@manueljacob.de>
- add %%{?sle15_python_module_pythons}
* Thu Feb 29 2024 Steve Kowalik <steven.kowalik@suse.com>
- Switch to autosetup and pyproject macros.
- No more greedy globs in %%files.
- Refresh iniparse-insert-after-commented-option.patch to apply with -p1
- Drop now unneeded Buildrequires on python3-devel
* Wed Dec 20 2023 Daniel Garcia <daniel.garcia@suse.com>
- Fix tests with python 3.11.7
- Add patch python3117.patch (gh#candlepin/python-iniparse#29) and
refresh patch python311-compat.patch
* Mon Aug 14 2023 Dirk Müller <dmueller@suse.com>
- add python311-compat.patch to fix build with python 3.11/12
* Mon Nov 7 2022 pgajdos@suse.com
- do not require python-six
- added patches
fix https://github.com/candlepin/python-iniparse/commit/28dddd6f45fb5928d1477d14fac5daca92ffbb4c
+ python-iniparse-no-python2.patch
fix https://github.com/candlepin/python-iniparse/commit/b3684a45d02af784d3d8f6ea680a351b38a865dc
+ python-iniparse-no-six.patch
* Wed Mar 2 2022 Matej Cepl <mcepl@suse.com>
- Fix BR: it is %%{python_module devel} not python2-devel.
* Thu Oct 29 2020 Benjamin Greiner <code@bnavigator.de>
- Need python3X-testsuite for all flavors
(see gh#openSUSE/python-rpm-macros#66)
* Tue Apr 14 2020 Marketa Calabkova <mcalabkova@suse.com>
- Update to 0.5
* upstream changed
* code improvements
* Python 3 support
- Reapplied patch iniparse-insert-after-commented-option.patch
- Dropped upstreamed patches:
* iniparse-fix-issue-28.patch
* python-iniparse-python3-compat.patch
* python-iniparse-setup-fixes.patch
* Tue Dec 4 2018 Matej Cepl <mcepl@suse.com>
- Remove superfluous devel dependency for noarch package
* Tue Nov 14 2017 jmatejek@suse.com
- require %%{python_module devel} instead of listing the devels one by one
* Thu Sep 14 2017 ngompa13@gmail.com
- Add missing python-six runtime dependency
* Tue Jun 6 2017 ngompa13@gmail.com
- Add patches from Fedora to enable Python 3 support
* iniparse-fix-issue-28.patch
* python-iniparse-python3-compat.patch
* python-iniparse-setup-fixes.patch
- Convert to singlespec to offer Python 3 variant
* Thu Oct 24 2013 speilicke@suse.com
- Require python-setuptools instead of distribute (upstreams merged)
* Mon May 27 2013 speilicke@suse.com
- Add iniparse-insert-after-commented-option.patch: See
https://code.google.com/p/iniparse/issues/detail?id=31 for details
- Run testsuite
* Thu Feb 23 2012 berendt@b1-systems.de
- added missing build requirement python-devel for SLE
* Tue Jan 31 2012 saschpe@suse.de
- Spec file cleanup:
* Simplified macro usage
* Removed outdated %%clean section
* Buildrequire python-distribute instead of setuptools
* Thu Sep 16 2010 coolo@novell.com
- update to 0.4
* Fixed pickling and multiprocessing bugs
* Enabled auto-addition of config attributes via square bracket
syntax
* Utility function to tidy INI files
* Ability to change comment syntax for parsing Mercurial config
files
* Added ConfigParser exceptions and constants to the top-level
iniparse module
* Wed Aug 5 2009 matejcik@suse.cz
- update to 0.3.1
* minor bugfixes
* better multi-line handling
* Wed Jan 7 2009 cthiel@suse.de
- initial package (version 0.2.4)