Blame SPECS/python3.11-iniconfig.spec

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