|
|
6fbe59 |
%global __python3 /usr/bin/python3.11
|
|
|
6fbe59 |
%global python3_pkgversion 3.11
|
|
|
6fbe59 |
|
|
|
6fbe59 |
Name: python%{python3_pkgversion}-iniconfig
|
|
|
6fbe59 |
Version: 1.1.1
|
|
|
6fbe59 |
Release: 1%{?dist}
|
|
|
6fbe59 |
Summary: Brain-dead simple parsing of ini files
|
|
|
6fbe59 |
License: MIT
|
|
|
6fbe59 |
URL: http://github.com/RonnyPfannschmidt/iniconfig
|
|
|
6fbe59 |
BuildArch: noarch
|
|
|
6fbe59 |
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
6fbe59 |
BuildRequires: python%{python3_pkgversion}-rpm-macros
|
|
|
6fbe59 |
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
6fbe59 |
BuildRequires: python%{python3_pkgversion}-wheel
|
|
|
6fbe59 |
|
|
|
6fbe59 |
Source0: %{pypi_source iniconfig}
|
|
|
6fbe59 |
|
|
|
6fbe59 |
# pytest 6+ needs this and this uses pytest for tests
|
|
|
6fbe59 |
%bcond_with tests
|
|
|
6fbe59 |
|
|
|
6fbe59 |
%if %{with tests}
|
|
|
6fbe59 |
BuildRequires: python%{python3_pkgversion}-pytest
|
|
|
6fbe59 |
%endif
|
|
|
6fbe59 |
|
|
|
6fbe59 |
%global _description %{expand:
|
|
|
6fbe59 |
iniconfig is a small and simple INI-file parser module
|
|
|
6fbe59 |
having a unique set of features:
|
|
|
6fbe59 |
|
|
|
6fbe59 |
* tested against Python2.4 across to Python3.2, Jython, PyPy
|
|
|
6fbe59 |
* maintains order of sections and entries
|
|
|
6fbe59 |
* supports multi-line values with or without line-continuations
|
|
|
6fbe59 |
* supports "#" comments everywhere
|
|
|
6fbe59 |
* raises errors with proper line-numbers
|
|
|
6fbe59 |
* no bells and whistles like automatic substitutions
|
|
|
6fbe59 |
* iniconfig raises an Error if two sections have the same name.}
|
|
|
6fbe59 |
%description %_description
|
|
|
6fbe59 |
|
|
|
6fbe59 |
|
|
|
6fbe59 |
%prep
|
|
|
6fbe59 |
%autosetup -n iniconfig-%{version}
|
|
|
6fbe59 |
# Remove undeclared dependency on python-py
|
|
|
6fbe59 |
# Merged upstream https://github.com/pytest-dev/iniconfig/pull/47
|
|
|
6fbe59 |
sed -i "s/py\.test/pytest/" testing/test_iniconfig.py
|
|
|
6fbe59 |
|
|
|
6fbe59 |
|
|
|
6fbe59 |
# Remove dependency on setuptools-scm
|
|
|
6fbe59 |
sed -i "s/ *use_scm_version=.*,/version='%{version}',/" setup.py
|
|
|
6fbe59 |
|
|
|
6fbe59 |
|
|
|
6fbe59 |
%build
|
|
|
6fbe59 |
%py3_build
|
|
|
6fbe59 |
|
|
|
6fbe59 |
|
|
|
6fbe59 |
%install
|
|
|
6fbe59 |
%py3_install
|
|
|
6fbe59 |
|
|
|
6fbe59 |
|
|
|
6fbe59 |
%if %{with tests}
|
|
|
6fbe59 |
%check
|
|
|
6fbe59 |
%pytest
|
|
|
6fbe59 |
%endif
|
|
|
6fbe59 |
|
|
|
6fbe59 |
|
|
|
6fbe59 |
%files -n python%{python3_pkgversion}-iniconfig
|
|
|
6fbe59 |
%doc README.txt
|
|
|
6fbe59 |
%license LICENSE
|
|
|
6fbe59 |
%{python3_sitelib}/iniconfig-%{version}-py%{python3_version}.egg-info/
|
|
|
6fbe59 |
%{python3_sitelib}/iniconfig/
|
|
|
6fbe59 |
|
|
|
6fbe59 |
|
|
|
6fbe59 |
%changelog
|
|
|
6fbe59 |
* Fri Dec 02 2022 Charalampos Stratakis <cstratak@redhat.com> - 1.1.1-1
|
|
|
6fbe59 |
- Initial package
|
|
|
6fbe59 |
- Fedora contributions by:
|
|
|
6fbe59 |
Lumir Balhar <lbalhar@redhat.com>
|
|
|
6fbe59 |
Miro HronĨok <miro@hroncok.cz>
|
|
|
6fbe59 |
Tomas Hrnciar <thrnciar@redhat.com>
|