Bug 2123618 - Review Request: python-hatch-fancy-pypi-readme - Hatch plugin for writing fancy PyPI readmes
Summary: Review Request: python-hatch-fancy-pypi-readme - Hatch plugin for writing fan...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-02 07:28 UTC by Parag Nemade
Modified: 2022-10-26 12:12 UTC (History)
3 users (show)

Fixed In Version: python-hatch-fancy-pypi-readme-22.3.0-3.fc38
Clone Of:
Environment:
Last Closed: 2022-10-26 12:12:56 UTC
Type: ---
Embargoed:
mhroncok: fedora-review+


Attachments (Terms of Use)
Remove unused dependency from pyproject.toml (366 bytes, patch)
2022-09-04 20:52 UTC, Sandro
no flags Details | Diff
Updated patch removing unused/unwanted dependencies (344 bytes, patch)
2022-09-04 21:42 UTC, Sandro
no flags Details | Diff
Patch solving AUTHORS.md installed in licenses (416 bytes, patch)
2022-09-08 08:09 UTC, Sandro
no flags Details | Diff

Description Parag Nemade 2022-09-02 07:28:21 UTC
Spec URL: https://pnemade.fedorapeople.org/python-hatch-fancy-pypi-readme.spec
SRPM URL: https://pnemade.fedorapeople.org/python-hatch-fancy-pypi-readme-22.3.0-1.fc37.src.rpm

Description:
This provides a Hatch metadata plugin for everyone who cares about the
first impression of their project’s PyPI landing page. It allows you to
define your PyPI project description in terms of concatenated fragments
that are based on static strings, files, and most importantly: parts of
files defined using cut-off points or regular expressions.

Fedora Account System Username: pnemade

Comment 1 Parag Nemade 2022-09-02 07:28:25 UTC
This package built on koji:  https://koji.fedoraproject.org/koji/taskinfo?taskID=91519810

Comment 2 Sandro 2022-09-03 15:38:38 UTC
I'm still rather new to packaging and package reviews and I'm looking for a sponsor.

That said, the package looks good. Only one real issue and a requires that need clarification.

Package Review
==============

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated
[ ] = Manual review needed


Issues:
=======
- If (and only if) the source package includes the text of the license(s)
  in its own file, then that file, containing the text of the license(s)
  for the package is included in %license.
  Note: License file AUTHORS.md is not marked as %license
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/LicensingGuidelines/#_license_text

^^AUTHORS.md should be included in %doc or dropped.

- Requires python3.11dist(hatchling) (see below)


===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "MIT License", "*No copyright* MIT
     License". 15 files have unknown license. Detailed output of
     licensecheck in /home/sandro/devel/fedora/2123618-python-hatch-fancy-
     pypi-readme/licensecheck.txt
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[ ]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[x]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 20480 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Package does not contain duplicates in %files.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[?]: Python eggs must not download any dependencies during the build
     process.
[?]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[x]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[!]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[x]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[?]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
Cannot parse rpmlint output:


Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.2.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 1

python3-hatch-fancy-pypi-readme.noarch: W: no-manual-page-for-binary hatch-fancy-pypi-readme
 1 packages and 0 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 0.0 s 



Source checksums
----------------
https://files.pythonhosted.org/packages/source/h/hatch_fancy_pypi_readme/hatch_fancy_pypi_readme-22.3.0.tar.gz :
  CHECKSUM(SHA256) this package     : 7d4651f8f07825931c92873cb51137214a938badb7a759b85c1d95bf74f86efa
  CHECKSUM(SHA256) upstream package : 7d4651f8f07825931c92873cb51137214a938badb7a759b85c1d95bf74f86efa


Requires
--------
python3-hatch-fancy-pypi-readme (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi)
    python3.11dist(hatchling)

^^^According to the pyproject.toml this appears to be a build requirement only.



Provides
--------
python3-hatch-fancy-pypi-readme:
    python-hatch-fancy-pypi-readme
    python3-hatch-fancy-pypi-readme
    python3.11-hatch-fancy-pypi-readme
    python3.11dist(hatch-fancy-pypi-readme)
    python3dist(hatch-fancy-pypi-readme)



Generated by fedora-review 0.9.0 (6761b6c) last change: 2022-08-23
Command line :/usr/bin/fedora-review -b 2123618
Buildroot used: fedora-rawhide-x86_64
Active plugins: Python, Generic, Shell-api
Disabled plugins: R, Java, fonts, Ocaml, PHP, Perl, Haskell, C/C++, SugarActivity
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 3 Parag Nemade 2022-09-04 07:04:41 UTC
(In reply to Sandro from comment #2)

Thank you for having a look at this package.

> Issues:
> =======
> - If (and only if) the source package includes the text of the license(s)
>   in its own file, then that file, containing the text of the license(s)
>   for the package is included in %license.
>   Note: License file AUTHORS.md is not marked as %license
>   See: https://docs.fedoraproject.org/en-US/packaging-
>   guidelines/LicensingGuidelines/#_license_text
> 
> ^^AUTHORS.md should be included in %doc or dropped.

Actually this file is getting installed, hence fedora-review tool considering it as license file and asking to mark it as %license
/usr/lib/python3.11/site-packages/hatch_fancy_pypi_readme-22.3.0.dist-info/licenses/AUTHORS.md

but it should not get installed in that location. Reported upstream https://github.com/hynek/hatch-fancy-pypi-readme/issues/8


> 
> Requires
> --------
> python3-hatch-fancy-pypi-readme (rpmlib, GLIBC filtered):
>     /usr/bin/python3
>     python(abi)
>     python3.11dist(hatchling)
> 
> ^^^According to the pyproject.toml this appears to be a build requirement
> only.
> 

but i see it is also runtime required package
src/hatch_fancy_pypi_readme/hooks.py:9:from hatchling.metadata.plugin.interface import MetadataHookInterface

Comment 4 Sandro 2022-09-04 16:06:21 UTC
(In reply to Parag Nemade from comment #3)
> (In reply to Sandro from comment #2)
> 
> Thank you for having a look at this package.
> 
> > Issues:
> > =======
> > - If (and only if) the source package includes the text of the license(s)
> >   in its own file, then that file, containing the text of the license(s)
> >   for the package is included in %license.
> >   Note: License file AUTHORS.md is not marked as %license
> >   See: https://docs.fedoraproject.org/en-US/packaging-
> >   guidelines/LicensingGuidelines/#_license_text
> > 
> > ^^AUTHORS.md should be included in %doc or dropped.
> 
> Actually this file is getting installed, hence fedora-review tool
> considering it as license file and asking to mark it as %license
> /usr/lib/python3.11/site-packages/hatch_fancy_pypi_readme-22.3.0.dist-info/
> licenses/AUTHORS.md
> 
> but it should not get installed in that location. Reported upstream
> https://github.com/hynek/hatch-fancy-pypi-readme/issues/8

I had some fun this afternoon, trying to get rid of AUTHORS.md in all kind of ways.

When finally I succeeded, the tests would no longer pass:

=================================== FAILURES ===================================
___________________________ TestCLIEndToEnd.test_ok ____________________________
self = <tests.test_cli.TestCLIEndToEnd object at 0x7f68243a6a90>
    def test_ok(self):
        """
        A valid config is rendered.
        """
>       out = run("hatch_fancy_pypi_readme", "tests/example_pyproject.toml")
tests/test_cli.py:52: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
check = True, args = ('hatch_fancy_pypi_readme', 'tests/example_pyproject.toml')
process = CompletedProcess(args=['/usr/bin/python3', '-m', 'hatch_fancy_pypi_readme', 'tests/example_pyproject.toml'], returncod...^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nFileNotFoundError: [Errno 2] No such file or directory: \'AUTHORS.md\'\n')


There's something fishy about AUTHORS.md. It should definitely not be installed in the license directory inside the whl archive. Not sure if this is a bug or an incomplete pyproject.toml. Best to get clarification from upstream.

> > 
> > Requires
> > --------
> > python3-hatch-fancy-pypi-readme (rpmlib, GLIBC filtered):
> >     /usr/bin/python3
> >     python(abi)
> >     python3.11dist(hatchling)
> > 
> > ^^^According to the pyproject.toml this appears to be a build requirement
> > only.
> > 
> 
> but i see it is also runtime required package
> src/hatch_fancy_pypi_readme/hooks.py:9:from
> hatchling.metadata.plugin.interface import MetadataHookInterface

You are right. It's a build as well as a runtime dependency. And the requires is determined by rpmbuild itself. So, all good on this issue.

Comment 5 Sandro 2022-09-04 16:33:15 UTC
One more (minor) thing I forgot to mention:

I would suggest using consistent naming in the BuildRequires. You added some for running the tests. For consistency and better readability I would change these to:

BuildRequires:  python3-build
BuildRequires:  python3-wheel
BuildRequires:  python3-pytest

Comment 6 Miro Hrončok 2022-09-04 20:46:35 UTC
About AUTHORS.md:

This file is insalled as a regular file because hatch does not make it as a license file in the metadata (yet), see https://github.com/pypa/hatch/issues/193

I see no point in removing it though. You can mark it as %doc or %license if you prefer to do so by duplicate listing it in %files as

%doc %{python3_siteleib}/hatch_fancy_pypi_readme-22.3.0.dist-info/licenses/AUTHORS.md
%license %{python3_siteleib}/hatch_fancy_pypi_readme-22.3.0.dist-info/licenses/LICENSE.txt

Comment 7 Sandro 2022-09-04 20:52:54 UTC
Created attachment 1909545 [details]
Remove unused dependency from pyproject.toml

With the attached patch included in the spec file you can drop all BuildRequires for running tests and add -t to  %pyproject_buildrequires. That will pull in all dependencies automatically. Upstream has removed the troublesome pytest-icdiff in main already.

That will leave you with a very clean spec file ready for future updates.

The BuildRequires for pyproject-rpm-macros is not needed, either.

Comment 8 Miro Hrončok 2022-09-04 21:22:31 UTC
Please also drop coverage[toml], as did upstream. See https://github.com/hynek/hatch-fancy-pypi-readme/commit/6c06d7244183c5b71aed905c9950e3206e5f0a9e

Comment 9 Sandro 2022-09-04 21:42:05 UTC
Created attachment 1909546 [details]
Updated patch removing unused/unwanted dependencies

(In reply to Miro Hrončok from comment #8)
> Please also drop coverage[toml], as did upstream.

The updated patch now removes both.

Comment 10 Parag Nemade 2022-09-05 06:45:06 UTC
Fixed both the issues above discussed.

Just can someone confirm if installation of this dynamic buildrequires python3-tox-current-env is really correct?

Spec URL: https://pnemade.fedorapeople.org/fedora-work/SPECS/python-hatch-fancy-pypi-readme.spec
SRPM URL: https://pnemade.fedorapeople.org/fedora-work/SRPMS/python-hatch-fancy-pypi-readme-22.3.0-2.fc37.src.rpm


Koji scratch build -> https://koji.fedoraproject.org/koji/taskinfo?taskID=91647499

Comment 11 Miro Hrončok 2022-09-05 09:36:06 UTC
> Just can someone confirm if installation of this dynamic buildrequires python3-tox-current-env is really correct?

-t stands for tox. It uses tox-current-env. So yes, this is correct.

However, since this does not use %tox in %check you might want to limit the dependencies by using:

    %pyproject_buildrequires -x tests

See https://github.com/hynek/hatch-fancy-pypi-readme/blob/22.3.0/pyproject.toml#L50

That way, the package won't buildreuire tox(-current-env).

Comment 12 Miro Hrončok 2022-09-05 09:37:46 UTC
Correction:

    %pyproject_buildrequires -w -x tests

Comment 13 Parag Nemade 2022-09-05 10:30:46 UTC
Thank you for your quick reply.

As this is minor update, I just regenerated -2 release of this package.

Spec URL: https://pnemade.fedorapeople.org/fedora-work/SPECS/python-hatch-fancy-pypi-readme.spec
SRPM URL: https://pnemade.fedorapeople.org/fedora-work/SRPMS/python-hatch-fancy-pypi-readme-22.3.0-2.fc37.src.rpm

Rawhide Scratch build -> https://koji.fedoraproject.org/koji/taskinfo?taskID=91653503

Comment 14 Sandro 2022-09-05 11:20:32 UTC
(In reply to Parag Nemade from comment #10)
> Fixed both the issues above discussed.

Unfortunately, that leads to a duplicate file warning for AUTHORS.md in addition to the warning that the file is not marked as %license.

I provided a patch to the pyproject.toml file in the bug you reported upstream:

https://github.com/hynek/hatch-fancy-pypi-readme/issues/8#issuecomment-1236845515

With that patch applied, you can simply add the AUTHORS.md file to %doc (same as README.md) as it will no longer be installed.

Comment 15 Parag Nemade 2022-09-08 06:05:08 UTC
Based on upstream discussions, I think we should be good with using the update I provided above -2 release for this package in Fedora.

Can someone please do official review and approve it. I need this to build new python-jsonschema package in rawhide.

Comment 16 Sandro 2022-09-08 08:09:28 UTC
Created attachment 1910404 [details]
Patch solving AUTHORS.md installed in licenses

For version -2 fedora-review reports the issues below:

Issues:
=======
- Package does not contain duplicates in %files.
  Note: warning: File listed twice: /usr/lib/python3.11/site-
  packages/hatch_fancy_pypi_readme-22.3.0.dist-info/licenses/AUTHORS.md
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_duplicate_files
- If (and only if) the source package includes the text of the license(s)
  in its own file, then that file, containing the text of the license(s)
  for the package is included in %license.
  Note: License file AUTHORS.md is not marked as %license
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/LicensingGuidelines/#_license_text

The first one is new and needs to be addressed. The second one has already been discussed. Both would be addressed by attached patch and adding AUTHORS.md to %doc.

Since I'm not in packagers group, yet, and cannot approve the review, I will leave the final say to someone who can. Maybe Miro would be able to take over, if he's got time.

Comment 17 Miro Hrončok 2022-09-08 11:35:15 UTC
- Package does not contain duplicates in %files.
  Note: warning: File listed twice: /usr/lib/python3.11/site-
  packages/hatch_fancy_pypi_readme-22.3.0.dist-info/licenses/AUTHORS.md
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/#_duplicate_files

This is known and done deliberately. No need to fix.

- If (and only if) the source package includes the text of the license(s)
  in its own file, then that file, containing the text of the license(s)
  for the package is included in %license.
  Note: License file AUTHORS.md is not marked as %license
  See: https://docs.fedoraproject.org/en-US/packaging-
  guidelines/LicensingGuidelines/#_license_text

AUTHORS is not a license. This is a bogus report.


I'd gladly review this package officially but I am traveling and will be at a conference until the end of this week. So I am not assigning this Bugzilla to myself just yet in case somebody else wants to beat me to it.

Comment 18 Miro Hrončok 2022-09-19 12:29:32 UTC
Running Fedora review. In the meantime, I re-read the spec file.

> %global pypi_name hatch-fancy-pypi-readme

(opinionated, feel free to ignore me) Defining a macro like this and reusing it in the spec file makes the spec file harder to read. Especially since the string hatch_fancy_pypi_readme needs to be used on several places instead.



> %autosetup -n hatch_fancy_pypi_readme-%{version}

(opinionated, feel free to ignore me) Consider using -p1 here from the beginning, so no change is required when a patch is added from upstream.


> # https://github.com/hynek/hatch-fancy-pypi-readme/commit/6c06d7244183c5b71aed905c9950e3206e5f0a9e
> sed -i 's/ \"pytest-icdiff\", \"coverage\[toml\]\", //g' pyproject.toml

(strongly suggested) Add a human-readable comment that summarizes this change, e.g: # Drop unwanted build dependencies that upstream already dropped


> %pyproject_buildrequires -w

(strongly suggested) Considering -w is provisional and hatch no longer needs it since https://src.fedoraproject.org/rpms/python-hatchling/pull-request/16 I suggest dropping -w.

Comment 19 Miro Hrončok 2022-09-19 13:16:43 UTC
Package Review
==============

Package APPRVOED.

Legend:
[x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated

===== MUST items =====

Generic:
[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
     Guidelines.
[x]: License field in the package spec file matches the actual license.
     Note: Checking patched sources after %prep for licenses. Licenses
     found: "Unknown or generated", "MIT License", "*No copyright* MIT
     License". 15 files have unknown license. Detailed output of
     licensecheck in /home/churchyard/rpmbuild/FedoraReview/2123618-python-
     hatch-fancy-pypi-readme/licensecheck.txt
[x]: Package contains no bundled libraries without FPC exception.
[x]: Changelog in prescribed format.
[x]: Sources contain only permissible code or content.
[-]: Package contains desktop file if it is a GUI application.
[-]: Development files must be in a -devel package
[x]: Package uses nothing in %doc for runtime.
[x]: Package consistently uses macros (instead of hard-coded directory
     names).
[x]: Package is named according to the Package Naming Guidelines.
[x]: Package does not generate any conflict.
[x]: Package obeys FHS, except libexecdir and /usr/target.
[-]: If the package is a rename of another package, proper Obsoletes and
     Provides are present.
[x]: Requires correct, justified where necessary.
[x]: Spec file is legible and written in American English.
[-]: Package contains systemd file(s) if in need.
[x]: Package is not known to require an ExcludeArch tag.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 20480 bytes in 1 files.
[x]: Package complies to the Packaging Guidelines
[x]: Package successfully compiles and builds into binary rpms on at least
     one supported primary architecture.
[x]: Package installs properly.
[x]: Rpmlint is run on all rpms the build produces.
     Note: There are rpmlint messages (see attachment).
[x]: Package requires other packages for directories it uses.
[x]: Package must own all directories that it creates.
[x]: Package does not own files or directories owned by other packages.
[x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT
[x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the
     beginning of %install.
[x]: Macros in Summary, %description expandable at SRPM build time.
[x]: Dist tag is present.
[x]: Permissions on files are set properly.
[x]: Package must not depend on deprecated() packages.
[x]: Package use %makeinstall only when make install DESTDIR=... doesn't
     work.
[x]: Package is named using only allowed ASCII characters.
[x]: Package does not use a name that already exists.
[x]: Package is not relocatable.
[x]: Sources used to build the package match the upstream source, as
     provided in the spec URL.
[x]: Spec file name must match the spec package %{name}, in the format
     %{name}.spec.
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

Python:
[x]: Python eggs must not download any dependencies during the build
     process.
[x]: A package which is used by another package via an egg interface should
     provide egg info.
[x]: Package meets the Packaging Guidelines::Python
[x]: Package contains BR: python2-devel or python3-devel
[x]: Packages MUST NOT have dependencies (either build-time or runtime) on
     packages named with the unversioned python- prefix unless no properly
     versioned package exists. Dependencies on Python packages instead MUST
     use names beginning with python2- or python3- as appropriate.
[x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files
[x]: Binary eggs must be removed in %prep

===== SHOULD items =====

Generic:
[-]: If the source package does not include license text(s) as a separate
     file from upstream, the packager SHOULD query upstream to include it.
[x]: Final provides and requires are sane (see attachments).
[?]: Package functions as described.
[?]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[-]: Sources are verified with gpgverify first in %prep if upstream
     publishes signatures.
     Note: gpgverify is not used.
[?]: Package should compile and build into binary rpms on all supported
     architectures.
[x]: %check is present and all tests pass.
[?]: Packages should try to preserve timestamps of original installed
     files.
[x]: Reviewer should test that the package builds in mock.
[x]: Buildroot is not present
[x]: Package has no %clean section with rm -rf %{buildroot} (or
     $RPM_BUILD_ROOT)
[x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin.
[x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file
[x]: Sources can be downloaded from URI in Source: tag
[x]: SourceX is a working URL.
[x]: Spec use %global instead of %define unless justified.

===== EXTRA items =====

Generic:
[x]: Rpmlint is run on all installed packages.
     Note: There are rpmlint messages (see attachment).
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
============================ rpmlint session starts ============================
rpmlint: 2.2.0
configuration:
    /usr/lib/python3.10/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora-legacy-licenses.toml
    /etc/xdg/rpmlint/fedora-spdx-licenses.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 2

python3-hatch-fancy-pypi-readme.noarch: W: no-manual-page-for-binary hatch-fancy-pypi-readme
 2 packages and 0 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 0.8 s 



Rpmlint (installed packages)
----------------------------
============================ rpmlint session starts ============================
rpmlint: 2.2.0
configuration:
    /usr/lib/python3.11/site-packages/rpmlint/configdefaults.toml
    /etc/xdg/rpmlint/fedora.toml
    /etc/xdg/rpmlint/licenses.toml
    /etc/xdg/rpmlint/scoring.toml
    /etc/xdg/rpmlint/users-groups.toml
    /etc/xdg/rpmlint/warn-on-functions.toml
checks: 32, packages: 1

python3-hatch-fancy-pypi-readme.noarch: W: no-manual-page-for-binary hatch-fancy-pypi-readme
 1 packages and 0 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 0.0 s 



Source checksums
----------------
https://files.pythonhosted.org/packages/source/h/hatch_fancy_pypi_readme/hatch_fancy_pypi_readme-22.3.0.tar.gz :
  CHECKSUM(SHA256) this package     : 7d4651f8f07825931c92873cb51137214a938badb7a759b85c1d95bf74f86efa
  CHECKSUM(SHA256) upstream package : 7d4651f8f07825931c92873cb51137214a938badb7a759b85c1d95bf74f86efa


BuildRequires
-------------
    (python3dist(toml) if python3-devel < 3.11)
    pyproject-rpm-macros
    python3-devel
    python3dist(build)
    python3dist(hatchling)
    python3dist(packaging)
    python3dist(pip) >= 19
    python3dist(pytest)
    python3dist(wheel)


Requires
--------
python3-hatch-fancy-pypi-readme (rpmlib, GLIBC filtered):
    /usr/bin/python3
    python(abi) = 3.11
    python3.11dist(hatchling)


Provides
--------
python3-hatch-fancy-pypi-readme:
    python-hatch-fancy-pypi-readme = 22.3.0-2.fc38
    python3-hatch-fancy-pypi-readme = 22.3.0-2.fc38
    python3.11-hatch-fancy-pypi-readme = 22.3.0-2.fc38
    python3.11dist(hatch-fancy-pypi-readme) = 22.3
    python3dist(hatch-fancy-pypi-readme) = 22.3


Generated by fedora-review 0.7.0 (fed5495) last change: 2019-03-17
Command line :try-fedora-review -b 2123618 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Python, Shell-api
Disabled plugins: Haskell, fonts, R, PHP, Java, Ocaml, SugarActivity, Ruby, C/C++, Perl
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 20 Parag Nemade 2022-09-19 13:36:14 UTC
Thank you Miro for this detailed package review.

I have included all your suggestions here.

Spec URL: https://pnemade.fedorapeople.org/fedora-work/SPECS/python-hatch-fancy-pypi-readme.spec
SRPM URL: https://pnemade.fedorapeople.org/fedora-work/SRPMS/python-hatch-fancy-pypi-readme-22.3.0-2.fc37.src.rpm

Comment 21 Miro Hrončok 2022-09-19 13:44:59 UTC
%global pypi_name hatch-fancy-pypi-readme

This is now redundant.

I have reviewed the changes, looks great :)

Comment 22 Parag Nemade 2022-09-19 13:48:16 UTC
Thank you. I will take care of that at the time of package import.

Comment 23 Gwyn Ciesla 2022-09-19 14:17:25 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-hatch-fancy-pypi-readme

Comment 24 Miro Hrončok 2022-09-19 16:01:05 UTC
Also note that I am working on bz2127946 which will mark %{python3_sitelib}/hatch_fancy_pypi_readme-%{version}.dist-info/licenses/AUTHORS.md as %license, not %doc. You might want to make that consistent or remove the hack entirely and consider it to be fixed eventually.

Comment 25 Parag Nemade 2022-09-20 00:44:21 UTC
I am planning to add this package to Fedora 37 and EPEL9 as well. Will that fix be available in F37 and EPEL9 as well?

Comment 26 Miro Hrončok 2022-09-20 07:36:49 UTC
Yes for Fedora 37.

For EPEL 9 it is a bit more complex. The package is not in EPEL but in RHEL, but the fix will eventually land there. However, if python-hatchling is not updated in EPEL 9, it will still not work there.


Note You need to log in before you can comment on or make changes to this bug.