https://bugzilla.redhat.com/show_bug.cgi?id=2418764
Miro Hrončok <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #8 from Miro Hrončok <[email protected]> --- > %pyproject_buildrequires is supposed to include runtime requirements It indeed does: $ rpm -qRp python-fastapi_pagination-0.15.1-1.fc44.src.rpm ... python3dist(fastapi) python3dist(fastapi) >= 0.93 ... python3dist(pydantic) python3dist(pydantic) >= 1.9.1 ... python3dist(typing-extensions) python3dist(typing-extensions) >= 4.8 ... Those dependencies MUST/SHOULD NOT be duplicated by manual dependencies in the spec file. https://docs.fedoraproject.org/en-US/packaging-guidelines/#_package_dependencies (says MUST NOT) https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#Automatically-generated-dependencies (says SHOULD NOT) > You should at least include the minimal import check test... Indeed, the guidelines actually mandate that: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_tests """ If a test suite exists upstream, it SHOULD be run in the %check section. If that is not possible with reasonable effort, at least a basic smoke test (such as importing the packaged module) MUST be run in %check. """ -------------- A couple of notes about the spec file: > %global srcname fastapi_pagination > %global importname fastapi_pagination OPINIONATED: I highly recommend avoiding that indirection. It makes the spec file harder to read. No guidelines prevent you from doing it, and if you prefer it this way, feel free to do so, but in my experience, it adds no benefit. > Name: python-%{srcname} > ... > %package -n python3-%{srcname} Hard to see, but this expands to python-fastapi_pagination and python3-fastapi_pagination SHOULD: Rename the package to python-fastapi-pagination with a python3-fastapi-pagination subpackage. https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_library_naming """ If possible, the project name SHOULD be the same as the name of the main importable module, in lowercase, with underscores (_) replaced by dashes (-). """ > Release: 1%{?dist} > ... > > %changelog > * Wed Dec 03 2025 Jayaraj <[email protected]> - 0.15.1-1 > - Initial Fedora package for fastapi-pagination SHOULD: The changelog should be generated automatically from git commit logs using the %autochangelog macro. https://docs.fedoraproject.org/en-US/packaging-guidelines/#changelogs > Source0: %{pypi_source %{srcname} %{version}} REDUNDANCY: There is no need to number a sole source. a Source: without the zero would do. There is no need to supply the version to %{pypi_source ...}. > BuildRequires: pyproject-rpm-macros REDUNDANCY: There is no need to BuildRequire this. No guidelines mandate that. The README for pyproject-rpm-macros explicitly says you should BuildRequire python3-devel to gett he macros on Fedora and EPEL 9+ (and this specfile does not work on EPEL < 9 anyway as it uses %generate_buildrequires). > %description > FastAPI Pagination provides easy, extensible pagination for FastAPI > applications. It supports ORM models including SQLAlchemy, Tortoise ORM, > and async DB layers, with multiple pagination strategies like limit-offset > and cursor pagination. > ... > %description -n python3-%{srcname} > FastAPI Pagination provides utilities for paginating API responses in FastAPI > applications with support for multiple ORMs and custom page types. QUESTION: Why do the descriptions differ? > %autosetup -n %{srcname}-%{version} SUGGESTION: Consider using -p1 from the start. It will make it easier to backport patches in the future. > %check > echo "Skipping tests (require faker, dirty-equals, asyncpg, etc.)" MUST: As already said, please run some kind of check, even very simple one. OPINIONATED: When there is no check at all, do not include a %check section just to echo nothing is done. A presence of a %check section usually indicates some check is present. > %license LICENSE REDUNDANCY: The license file is already included in %{pyproject_files}. Consider adding the -l flag to %pyproject_save_files to help asseritng that. https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#pyproject_save_files Not in the specfile -- Python extras: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#Extras """ Python packages SHOULD have Provides for all extras the upstream project specifies, except... """ There are a lot of extras defined upstream: https://github.com/uriyyo/fastapi-pagination/blob/0.15.2/pyproject.toml#L28 SHOULD: Add %pyproject_extras_subpkg -n python3-fastapi-pagination sqlmodel,sqlalchemy,databases,orm,... (excluding those with unavailable dependencies). OPINIONATED: Also add those to %pyproject_buildrequires -x to avoid building metapackages with broken runtime dependencies. -- 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=2418764 Report this comment as SPAM: https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202418764%23c8 -- _______________________________________________ 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://pagure.io/fedora-infrastructure/new_issue
