Bug 2116084 - Review Request: python-pydiffx - Python implementation of the DiffX specification
Summary: Review Request: python-pydiffx - Python implementation of the DiffX specifica...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Elliott Sales de Andrade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2114603
Blocks: 2103563 2145079
TreeView+ depends on / blocked
 
Reported: 2022-08-06 22:13 UTC by Jonathan Wright
Modified: 2023-03-29 22:37 UTC (History)
3 users (show)

Fixed In Version: python-pydiffx-1.1-1.fc38
Clone Of:
Environment:
Last Closed: 2023-03-29 22:37:13 UTC
Type: ---
Embargoed:
quantum.analyst: fedora-review+


Attachments (Terms of Use)

Description Jonathan Wright 2022-08-06 22:13:02 UTC
Spec URL: https://jonathanspw.fedorapeople.org/pydiffx.spec
SRPM URL: https://jonathanspw.fedorapeople.org/pydiffx-1.0.1-1.fc37.noarch.rpm

Description: Python implementation of the DiffX specification

Fedora Account System Username: jonathanspw

Depends on https://bugzilla.redhat.com/show_bug.cgi?id=2114603

Comment 1 Elliott Sales de Andrade 2022-08-08 09:13:45 UTC
Seems that this should be python-pydiffx, not pydiffx. Also, your URLs are 404.

Comment 2 Carl George 🤠 2022-10-04 02:02:56 UTC
Agreed, here are the specific guidelines that cover the naming.

> A built (i.e. non-SRPM) package for a Python library MUST be named with the prefix python3-. A source package containing primarily a Python library MUST be named with the prefix python-.

https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_library_naming

Comment 3 Elliott Sales de Andrade 2022-11-23 04:17:22 UTC
Trying to see what the status is here? Currently rbtools is broken in F37: https://bugzilla.redhat.com/show_bug.cgi?id=2145079

Comment 4 Jonathan Wright 2022-11-23 04:38:21 UTC
I'll try to get this moving again so RBTools can be fixed.

Comment 6 Elliott Sales de Andrade 2022-11-23 06:18:56 UTC
Is the MIT license the SPDX identifier or the old identifier?

You also don't need BuildRequires on six and setuptools as you have a %generate_buildrequires section. A runtime Requires on six is also not needed as it's generated from metadata. 

Also missing a space in between "diffs,in" in the description.

Comment 7 Jonathan Wright 2022-11-23 14:21:38 UTC
Spec URL: https://jonathanspw.fedorapeople.org/python-pydiffx.spec
SRPM URL: https://jonathanspw.fedorapeople.org/python-pydiffx-1.1-1.fc38.src.rpm

(In reply to Elliott Sales de Andrade from comment #6)
> Is the MIT license the SPDX identifier or the old identifier?

Both

> You also don't need BuildRequires on six and setuptools as you have a
> %generate_buildrequires section. A runtime Requires on six is also not
> needed as it's generated from metadata. 

The BR on six is required.  Upstream doesn't properly provide the info for the %generate_buildrequires to work.

I dropped the runtime requirement on it.

> Also missing a space in between "diffs,in" in the description.

Fixed

Comment 8 Elliott Sales de Andrade 2022-11-24 00:50:38 UTC
(In reply to Jonathan Wright from comment #7)
> > You also don't need BuildRequires on six and setuptools as you have a
> > %generate_buildrequires section. A runtime Requires on six is also not
> > needed as it's generated from metadata. 
> 
> The BR on six is required.  Upstream doesn't properly provide the info for
> the %generate_buildrequires to work.

Yes, you'll need to pass `-r` to the macro to get runtime requirements as well.

Comment 9 Jonathan Wright 2022-11-24 01:01:32 UTC
The proper runtime requirement is already in there.

$ rpm -qsR results_python-pydiffx/1.1/1.fc38/python3-pydiffx-1.1-1.fc38.noarch.rpm  |grep six
python3.11dist(six)

Comment 10 Carl George 🤠 2022-11-24 01:40:34 UTC
> Upstream doesn't properly provide the info for the %generate_buildrequires to work.

It's preferred to patch the code to make %pyproject_buildrequires do the right thing, and then send that patch upstream.

https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#Automatically-generated-dependencies

You could add a 'test' extra to the setup.py file and do:

%pyproject_buildrequires -x test

Alternatively, you could use the GitHub tarball instead of the PyPI tarball, which will let you do:

%pyproject_buildrequires python/dev-requirements.txt

> The proper runtime requirement is already in there.

Elliott is talking about including the runtime requirements as build requirements, which is usually what you want for python packages.

> Yes, you'll need to pass `-r` to the macro to get runtime requirements as well.

No, that's been the default behavior for a while now.  The flag only exists now for backwards compatibility.

https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_build_macros

Comment 11 Jonathan Wright 2022-11-26 16:54:32 UTC
Took me a while to figure out because I didn't realize setup.py was calling functions from within the codebase...which require six, but six wasn't installed yet.  That was the problem all along.

I also fixed the requires in setup.py for the others deps, including tests.

Spec URL: https://jonathanspw.fedorapeople.org/python-pydiffx.spec
SRPM URL: https://jonathanspw.fedorapeople.org/python-pydiffx-1.1-1.fc38.src.rpm

Comment 12 Elliott Sales de Andrade 2022-11-27 00:53:20 UTC
OK, LGTM now.

I would recommend using %autochangelog and %autorelease as well.

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

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



===== 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.
[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.
[-]: Large documentation must go in a -doc subpackage. Large could be size
     (~1MB) or number of files.
     Note: Documentation size is 10240 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]: 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.
[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:
[-]: Binary eggs must be removed in %prep
     Note: Cannot find any build in BUILD directory (--prebuilt option?)
[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

===== 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.
[x]: Latest version is packaged.
[x]: Package does not include license text files separate from upstream.
[x]: Patches link to upstream bugs/comments/lists or are otherwise
     justified.
[-]: 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.
[x]: 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.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

========== 1 packages and 1 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 2.3 s ==========

Rpmlint (installed packages)
----------------------------
========== rpmlint session starts ==========
rpmlint: 2.2.0
configuration:
    /usr/lib/python3.10/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

========== 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 0.1 s ==========


Source checksums
----------------
https://files.pythonhosted.org/packages/source/p/pydiffx/pydiffx-1.1.tar.gz :
  CHECKSUM(SHA256) this package     : 0986dbb0a87cbf79e244e2f1c0e2b696d8e86b3861ea2955757a61d38e139228
  CHECKSUM(SHA256) upstream package : 0986dbb0a87cbf79e244e2f1c0e2b696d8e86b3861ea2955757a61d38e139228


Requires
--------
python3-pydiffx (rpmlib, GLIBC filtered):
    python(abi)
    python3.11dist(pygments)
    python3.11dist(six)



Provides
--------
python3-pydiffx:
    python-pydiffx
    python3-pydiffx
    python3.11-pydiffx
    python3.11dist(pydiffx)
    python3dist(pydiffx)



Generated by fedora-review 0.8.0 (e988316) last change: 2022-04-07
Command line :/usr/bin/fedora-review -b 2116084 -m fedora-rawhide-x86_64
Buildroot used: fedora-rawhide-x86_64
Active plugins: Generic, Shell-api, Python
Disabled plugins: Java, C/C++, R, Haskell, Perl, Ocaml, SugarActivity, PHP, fonts
Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH

Comment 13 Gwyn Ciesla 2022-11-28 15:17:03 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-pydiffx


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