python3.14-pyproject-metadata/SPECS/python3.14-pyproject-metadata.spec
2026-04-16 04:58:57 -04:00

96 lines
2.6 KiB
RPMSpec

## START: Set by rpmautospec
## (rpmautospec version 0.6.5)
## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 3;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
## END: Set by rpmautospec
%global python3_pkgversion 3.14
# Building the documentation requires the furo Sphinx theme. But building furo
# requires sphinx_theme_builder, which requires this package. Avoid a
# dependency loop with this conditional.
%bcond doc 0
Name: python%{python3_pkgversion}-pyproject-metadata
Version: 0.9.1
Release: %autorelease
Summary: PEP 621 metadata parsing
License: MIT
URL: https://github.com/FFY00/python-pyproject-metadata
VCS: git:%{url}.git
Source: %{url}/archive/%{version}/pyproject-metadata-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python%{python3_pkgversion}-devel
%global _desc %{expand:
Dataclass for PEP 621 metadata with support for core metadata generation.
This project does not implement the parsing of pyproject.toml containing
PEP 621 metadata. Instead, given a Python data structure representing
PEP 621 metadata (already parsed), it will validate this input and
generate a PEP 643-compliant metadata file (e.g. PKG-INFO).}
%description %_desc
%if %{with doc}
%package doc
Summary: Documentation for python3-pyproject-metadata
%description doc
Documentation for python3-pyproject-metadata.
%endif
%prep
%autosetup -n pyproject-metadata-%{version}
# No need to BuildRequire pytest-cov to run pytest
sed -i /pytest-cov/d pyproject.toml
%generate_buildrequires
%pyproject_buildrequires -x test%{?with_doc:,docs}
%build
%pyproject_wheel
%if %{with doc}
# Build the documentation
PYTHONPATH=$PWD/build/lib
mkdir html
sphinx-build -b html docs html
rm -rf html/{.buildinfo,.doctrees}
%endif
%install
%pyproject_install
%pyproject_save_files -L pyproject_metadata
%check
%pytest -v
%files -n python%{python3_pkgversion}-pyproject-metadata -f %{pyproject_files}
%doc docs/changelog.md README.md
%license LICENSE
%if %{with doc}
%files doc
%doc html
%endif
%changelog
## START: Generated by rpmautospec
* Fri Nov 28 2025 Lukáš Zachar <lzachar@redhat.com> - 0.9.1-3
- Add gating
* Fri Nov 28 2025 Tomáš Hrnčiar <thrnciar@redhat.com> - 0.9.1-2
- Convert from Fedora for the Python 3.14 stack in RHEL
* Fri Nov 28 2025 Tomáš Hrnčiar <thrnciar@redhat.com> - 0.9.1-1
- RHEL: Rename SPEC to python3.14-pyproject-metadata.spec
## END: Generated by rpmautospec