Fedora contributions by:
Lumír Balhar <lbalhar@redhat.com>
Miro Hrončok <mhroncok@redhat.com>
Tomas Hrnciar <thrnciar@redhat.com>
Tomas Orsava <torsava@redhat.com>
73 lines
1.8 KiB
RPMSpec
73 lines
1.8 KiB
RPMSpec
%global python3_pkgversion 3.14
|
|
|
|
Name: python%{python3_pkgversion}-iniconfig
|
|
Version: 2.1.0
|
|
Release: %autorelease
|
|
Summary: Brain-dead simple parsing of ini files
|
|
# SPDX
|
|
License: MIT
|
|
URL: http://github.com/RonnyPfannschmidt/iniconfig
|
|
BuildArch: noarch
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
# pytest 6+ needs this and this uses pytest for tests
|
|
%bcond_with tests
|
|
|
|
%if %{with tests}
|
|
# We BR pytest manually to avoid a dependency on tox in ELN/RHEL
|
|
BuildRequires: python%{python3_pkgversion}-pytest
|
|
%endif
|
|
|
|
Source: %{url}/archive/v%{version}/iniconfig-%{version}.tar.gz
|
|
|
|
# The package uses hatchling as a build backend. To avoid pulling
|
|
# a new dependency in RHEL we decided to patch it out and use setuptools_scm.
|
|
Patch: Replace-hatchling-with-setuptools-scm-build-backend.patch
|
|
|
|
%global _description %{expand:
|
|
iniconfig is a small and simple INI-file parser module
|
|
having a unique set of features:
|
|
|
|
* tested against Python2.4 across to Python3.2, Jython, PyPy
|
|
* maintains order of sections and entries
|
|
* supports multi-line values with or without line-continuations
|
|
* supports "#" comments everywhere
|
|
* raises errors with proper line-numbers
|
|
* no bells and whistles like automatic substitutions
|
|
* iniconfig raises an Error if two sections have the same name.}
|
|
%description %_description
|
|
|
|
|
|
%prep
|
|
%autosetup -n iniconfig-%{version}
|
|
|
|
|
|
%generate_buildrequires
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
|
|
%pyproject_buildrequires
|
|
|
|
|
|
%build
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
|
|
%pyproject_wheel
|
|
|
|
|
|
%install
|
|
%pyproject_install
|
|
%pyproject_save_files -l iniconfig
|
|
|
|
|
|
%check
|
|
%pyproject_check_import
|
|
%if %{with tests}
|
|
%pytest -v
|
|
%endif
|
|
|
|
|
|
%files -n python%{python3_pkgversion}-iniconfig -f %{pyproject_files}
|
|
%doc README.rst
|
|
|
|
|
|
%changelog
|
|
%autochangelog
|