https://bugzilla.redhat.com/show_bug.cgi?id=2545833

Clement Verna <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Comment|0                           |updated



--- Comment #0 has been edited ---

Spec URL:  
https://cverna.fedorapeople.org/rpms/python-frontmatter/python-frontmatter.spec
SRPM URL:  
https://cverna.fedorapeople.org/rpms/python-frontmatter/python-frontmatter-1.3.0-1.fc46.src.rpm
rpmlint:    https://cverna.fedorapeople.org/rpms/python-frontmatter/rpmlint.txt
Source URL:
https://github.com/eyeseast/python-frontmatter/archive/v1.3.0/python-frontmatter-1.3.0.tar.gz
            https://github.com/eyeseast/python-frontmatter

Fedora Account System Username: cverna

Package Name:    python-frontmatter
Version:         1.3.0
Release:         1%{?dist}
License:         MIT
URL:             https://github.com/eyeseast/python-frontmatter
BuildArch:       noarch
Binary RPM:      python3-frontmatter

Description:
Python library for parsing and managing documents with YAML front matter,
such as Markdown posts.
It exposes a simple API to load a file or a string, read and change its
metadata, and serialize it back.

Why it is being packaged:
python-frontmatter is a runtime dependency of lola
(https://github.com/LobsterTrap/lola). It does not exist in Fedora today.

Source checksums (sha256):
c123bd29cd209343941e6b28e09dbfbe10a5321760c0a4a6e6e0ce00d39283e9 
python-frontmatter-1.3.0.tar.gz

The archive of the release tag is used rather than the PyPI sdist, as the
Python packaging guidelines ask ("Source files from PyPI"): the sdist omits
the test suite that the tag archive ships.


Build backend and the uv_build version bound (please review this):

Upstream builds with the uv_build PEP 517 backend and requires
"uv_build>=0.11.15,<0.12". Fedora ships uv_build 0.12.x only, so no version in
the distribution satisfies the upper bound and the generated BuildRequires
cannot be resolved. The spec therefore declares

    %prep
    %pyproject_patch_dependency uv_build:drop_upper

which is the pyproject-rpm-macros mechanism intended for exactly this case
(it drops upper bounds from generated BuildRequires and from the installed
dependency metadata).

Build:
mock -r fedora-rawhide-aarch64 (aarch64), Fedora Rawhide (f46): builds clean.
%check: %pyproject_check_import frontmatter plus upstream's pytest suite:
47 tests pass, 7 are deselected ("47 passed, 7 deselected").
The 7 deselected tests are the ones exercising TOML front matter, which needs
the optional `toml` module. `toml` is not packaged in Fedora, so
frontmatter.default_handlers.TOMLHandler is None here. Deselected nodes:
TOMLHandlerTest (4 tests), HandlerTest::test_detect_format,
HandlerTest::test_sanity_all and test_docs.py::test_handler_docs (a doctest
that instantiates TOMLHandler).
The TOML test data directory is also removed in %check: pytest puts tests/ on
sys.path, so tests/toml would be imported as a namespace package named `toml`,
shadowing the missing module and failing unrelated tests (16 failures before
this was handled).
Both exclusions follow the Python packaging guidelines, "Tests": specific
failing tests MAY be excluded, and "dependencies not packaged in Fedora" is
listed there as a valid reason to skip tests.
Upstream ships frontmatter/conftest.py inside the importable package and that
module imports pytest, hence BuildRequires: python3dist(pytest).
The tag archive is used as Source because it carries the tests, which the
PyPI sdist omits ("Source files from PyPI").

rpmlint output (also attached, python-frontmatter-rpmlint.txt):
  spec:    0 errors, 0 warnings
  srpm:    0 errors, 0 warnings
  binary:  0 errors, 0 warnings

Self-review against ReviewGuidelines.adoc:
- rpmlint: run on spec, srpm and binary rpm, output above.
- naming: the canonical project name already starts with python-, so the
  source package keeps it (Python guidelines, "Library naming").
- spec file name matches %{name}: python-frontmatter.spec.
- license: MIT, matches the LICENSE file in the sdist; enforced at build time
  by %pyproject_save_files -l.
- sources match upstream (sha256 above).
- builds successfully on aarch64.
- BuildRequires: python3-devel, python3dist(pytest), plus uv_build and
  pyproject-rpm-macros pulled in by %pyproject_buildrequires.
- runtime dependency python3dist(pyyaml) is already in Fedora.
- no locales, no bundled libraries, no shared libraries, no scriptlets.
- %files: %{pyproject_files} plus %doc README.md; only directories under
  %{python3_sitelib} are owned.

Open items:
- Optional: report the uv_build upper bound upstream, so that the
  %pyproject_patch_dependency override can eventually be dropped.
- Optional: if Fedora ever packages the `toml` module, remove the four
  deselects and the tests/toml removal and run the full suite.

Assisted-by: AI


-- 
You are receiving this mail because:
You are always notified about changes to this product and component
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2545833

-- 
_______________________________________________
package-review mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to