Blame SPECS/python3.11-iniconfig.spec

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