Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 2160496 - Review Request: python-looseversion - Version numbering for anarchists and software realists
Summary: Review Request: python-looseversion - Version numbering for anarchists and so...
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Ben Beasley
QA Contact: Fedora Extras Quality Assurance
Whiteboard: Trivial
Depends On:
Blocks: fedora-neuro, NeuroFedora 2073563
TreeView+ depends on / blocked
Reported: 2023-01-12 15:40 UTC by Ankur Sinha (FranciscoD)
Modified: 2023-01-13 16:51 UTC (History)
2 users (show)

Fixed In Version: python-looseversion-1.0.3-4.fc38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2023-01-13 16:51:32 UTC
Type: ---
code: fedora-review+

Attachments (Terms of Use)

Description Ankur Sinha (FranciscoD) 2023-01-12 15:40:05 UTC
Spec URL:

A backwards/forwards-compatible fork of distutils.version.LooseVersion, for
times when PEP-440 isnt what you need.

The goal of this package is to be a drop-in replacement for the original
LooseVersion. It implements an identical interface and comparison logic to
LooseVersion. The only major change is that a looseversion.LooseVersion is
comparable to a distutils.version.LooseVersion, which means tools should not
need to worry whether all dependencies that use LooseVersion have migrated.

If you are simply comparing versions of Python packages, consider moving to
packaging.version.Version, which follows PEP-440. LooseVersion is better suited
to interacting with heterogeneous version schemes that do not follow PEP-440.

Fedora Account System Username: ankursinha

Comment 1 Ankur Sinha (FranciscoD) 2023-01-12 15:40:07 UTC
This package built on koji:

Comment 3 Ben Beasley 2023-01-13 16:04:26 UTC
Package Review

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

- Dist tag is present.

  This ^^^ was in the template, but it seems to be fedora-review being confused
  by rpmautospec. Everything looks normal here.

- 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 LICENSE is not marked as %license

    $ rpm -qL -p results/python3-looseversion-1.0.3-2.fc38.noarch.rpm
    (outputs nothing)

  So this really is one of those cases where %pyproject_files doesn’t contain the properly marked license file, and you need an explicit

    %license LICENSE

  Right now:

    - setuptools backend will properly mark license files if they are
      conventionally-named (pattern matching COPYING/LICENSE and similar)
    - hatchling backend should normally properly mark license files except on
      EPEL9 where it is too old
    - as far as I know other backends (poetry/flit_core) don’t

  This package has in pyproject.toml:

    build-backend = "flit_core.buildapi"

  which explains why need the explicit %license entry.

  The spec file you uploaded has the %license entry, so I’m thinking this is
  just a slightly stale source RPM.

Notes (no change required):

- You might find it easier to change



    %pyproject_buildrequires -t





  and drop

    BuildRequires:  python3-pytest

  but the way you’re doing it now is fine too.

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

[x]: Package is licensed with an open-source compatible license and meets
     other legal requirements as defined in the legal section of Packaging
[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", "Python Software Foundation License
     2.0", "*No copyright* CNRI Python License". 5 files have unknown
     license. Detailed output of licensecheck in
[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
[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 10240 bytes in 2 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]: 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
[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
[x]: File names are valid UTF-8.
[x]: Packages must not store files under /srv, /opt or /usr/local

[x]: Python eggs must not download any dependencies during the build
[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 =====

[-]: 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).
[x]: Package functions as described.

     (tests pass)

[x]: 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.
[x]: Package should compile and build into binary rpms on all supported
[x]: %check is present and all tests pass.
[x]: Packages should try to preserve timestamps of original installed
[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
[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 =====

[!]: Spec file according to URL is the same as in SRPM.
     Note: Spec file as given by url is not the same as in SRPM (see
     attached diff).
     See: (this test has no URL)

     This is mostly rpmautospec processing, although it does look like there
     was a difference with the %license entry too.

[x]: Rpmlint is run on all installed packages.
     Note: No rpmlint messages.

Checking: python3-looseversion-1.0.3-2.fc38.noarch.rpm
=========================================================================================================== rpmlint session starts ===========================================================================================================
rpmlint: 2.4.0
rpmlintrc: [PosixPath('/tmp/tmppvk46e4v')]
checks: 31, packages: 2

python-looseversion.src: W: strange-permission python-looseversion.spec 600
============================================================================ 2 packages and 0 specfiles checked; 0 errors, 1 warnings, 0 badness; has taken 0.5 s ============================================================================

Rpmlint (installed packages)
============================ rpmlint session starts ============================
rpmlint: 2.4.0
checks: 31, packages: 1

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

Source checksums
---------------- :
  CHECKSUM(SHA256) this package     : 035288860e1afe67d63ea9c700dd9d095c724e2e5722a39029dd91652d4316ed
  CHECKSUM(SHA256) upstream package : 035288860e1afe67d63ea9c700dd9d095c724e2e5722a39029dd91652d4316ed

python3-looseversion (rpmlib, GLIBC filtered):


Diff spec file in url and in SRPM
--- /home/ben/Downloads/2160496-python-looseversion/srpm/python-looseversion.spec	2023-01-13 10:39:45.955263867 -0500
+++ /home/ben/Downloads/2160496-python-looseversion/srpm-unpacked/python-looseversion.spec	2023-01-11 19:00:00.000000000 -0500
@@ -1,2 +1,12 @@
+## START: Set by rpmautospec
+## (rpmautospec version 0.3.1)
+## RPMAUTOSPEC: autorelease, autochangelog
+%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
+    release_number = 2;
+    base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
+    print(release_number + base_release_number - 1);
+## END: Set by rpmautospec
 %global _description %{expand:
 A backwards/forwards-compatible fork of distutils.version.LooseVersion, for
@@ -52,6 +62,9 @@
 %files -n python3-looseversion -f %{pyproject_files}
-%license LICENSE
+* Thu Jan 12 2023 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur> - 1.0.3-2
+- Uncommitted changes
+* Thu Jan 12 2023 Ankur Sinha (Ankur Sinha Gmail) <sanjay.ankur> - 1.0.3-1
+- init

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

Comment 4 Ben Beasley 2023-01-13 16:07:31 UTC
The package is APPROVED.

Since the “%license LICENSE” line was missing in the source RPM (but not the spec file), please make sure it is present in the imported package.

Take a look at the additional entirely optional note about tox in the review template above.

Comment 5 Fedora Admin user for bugzilla script actions 2023-01-13 16:27:18 UTC
The Pagure repository was created at

Comment 6 Ankur Sinha (FranciscoD) 2023-01-13 16:32:00 UTC
Thanks for the review, Ben.

Not sure why the spec and srpm are out of sync. I used fedora-create-review, so maybe I pointed at an older srpm there. I've made the necessary tweaks now, and double-checked that the license is included:

$ rpm -ql --licensefiles -p ./results_python-looseversion/1.0.3/3.fc38/python3-looseversion-1.0.3-3.fc38.noarch.rpm 

I'll go build etc.

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