|
|
a97c06 |
# Building the documentation requires the furo Sphinx theme. But building furo
|
|
|
a97c06 |
# requires sphinx_theme_builder, which requires this package. Avoid a
|
|
|
a97c06 |
# dependency loop with this conditional.
|
|
|
a97c06 |
%bcond doc 0
|
|
|
a97c06 |
|
|
|
a97c06 |
Name: python-pyproject-metadata
|
|
|
a97c06 |
Version: 0.8.0
|
|
|
a97c06 |
Release: %autorelease
|
|
|
a97c06 |
Summary: PEP 621 metadata parsing
|
|
|
a97c06 |
|
|
|
a97c06 |
License: MIT
|
|
|
a97c06 |
URL: https://github.com/FFY00/python-pyproject-metadata
|
|
|
a97c06 |
VCS: git:%{url}.git
|
|
|
a97c06 |
Source: %{url}/archive/%{version}/pyproject-metadata-%{version}.tar.gz
|
|
|
a97c06 |
|
|
|
a97c06 |
BuildArch: noarch
|
|
|
a97c06 |
|
|
|
a97c06 |
BuildRequires: python3-devel
|
|
|
a97c06 |
BuildRequires: %{py3_dist docutils}
|
|
|
a97c06 |
|
|
|
a97c06 |
%global _desc %{expand:
|
|
|
a97c06 |
Dataclass for PEP 621 metadata with support for core metadata generation.
|
|
|
a97c06 |
|
|
|
a97c06 |
This project does not implement the parsing of pyproject.toml containing
|
|
|
a97c06 |
PEP 621 metadata. Instead, given a Python data structure representing
|
|
|
a97c06 |
PEP 621 metadata (already parsed), it will validate this input and
|
|
|
a97c06 |
generate a PEP 643-compliant metadata file (e.g. PKG-INFO).}
|
|
|
a97c06 |
|
|
|
a97c06 |
%description %_desc
|
|
|
a97c06 |
|
|
|
a97c06 |
%package -n python3-pyproject-metadata
|
|
|
a97c06 |
Summary: PEP 621 metadata parsing
|
|
|
a97c06 |
|
|
|
a97c06 |
# This can be removed when F40 reaches EOL
|
|
|
a97c06 |
Obsoletes: python3-pep621 < 0.5
|
|
|
a97c06 |
Provides: python3-pep621 = %{version}-%{release}
|
|
|
a97c06 |
|
|
|
a97c06 |
%description -n python3-pyproject-metadata %_desc
|
|
|
a97c06 |
|
|
|
a97c06 |
%if %{with doc}
|
|
|
a97c06 |
%package doc
|
|
|
a97c06 |
Summary: Documentation for python3-pyproject-metadata
|
|
|
a97c06 |
|
|
|
a97c06 |
# This can be removed when F40 reaches EOL
|
|
|
a97c06 |
Obsoletes: python3-pep621-doc < 0.5
|
|
|
a97c06 |
Provides: python3-pep621-doc = %{version}-%{release}
|
|
|
a97c06 |
|
|
|
a97c06 |
%description doc
|
|
|
a97c06 |
Documentation for python3-pyproject-metadata.
|
|
|
a97c06 |
%endif
|
|
|
a97c06 |
|
|
|
a97c06 |
%prep
|
|
|
a97c06 |
%autosetup -n pyproject-metadata-%{version}
|
|
|
a97c06 |
# No need to BuildRequire pytest-cov to run pytest
|
|
|
a97c06 |
sed -i /pytest-cov/d pyproject.toml
|
|
|
a97c06 |
|
|
|
a97c06 |
%generate_buildrequires
|
|
|
a97c06 |
%pyproject_buildrequires -x test%{?with_doc:,docs}
|
|
|
a97c06 |
|
|
|
a97c06 |
%build
|
|
|
a97c06 |
%pyproject_wheel
|
|
|
a97c06 |
rst2html --no-datestamp CHANGELOG.rst CHANGELOG.html
|
|
|
a97c06 |
|
|
|
a97c06 |
%if %{with doc}
|
|
|
a97c06 |
# Build the documentation
|
|
|
a97c06 |
PYTHONPATH=$PWD/build/lib
|
|
|
a97c06 |
mkdir html
|
|
|
a97c06 |
sphinx-build -b html docs html
|
|
|
a97c06 |
rm -rf html/{.buildinfo,.doctrees}
|
|
|
a97c06 |
%endif
|
|
|
a97c06 |
|
|
|
a97c06 |
%install
|
|
|
a97c06 |
%pyproject_install
|
|
|
a97c06 |
%pyproject_save_files pyproject_metadata
|
|
|
a97c06 |
|
|
|
a97c06 |
%check
|
|
|
a97c06 |
%pytest
|
|
|
a97c06 |
|
|
|
a97c06 |
%files -n python3-pyproject-metadata -f %{pyproject_files}
|
|
|
a97c06 |
%doc CHANGELOG.html README.md
|
|
|
a97c06 |
%license LICENSE
|
|
|
a97c06 |
|
|
|
a97c06 |
%if %{with doc}
|
|
|
a97c06 |
%files doc
|
|
|
a97c06 |
%doc html
|
|
|
a97c06 |
%endif
|
|
|
a97c06 |
|
|
|
a97c06 |
%changelog
|
|
|
a97c06 |
%autochangelog
|