Blame SPECS/python3.11-iniconfig.spec

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