Bug 2077832 - Review Request: python-hatch-vcs - Hatch plugin for versioning with your preferred VCS
Summary: Review Request: python-hatch-vcs - Hatch plugin for versioning with your pref...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-22 11:14 UTC by Ben Beasley
Modified: 2022-05-16 01:08 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-04-22 16:48:39 UTC
Type: ---
Embargoed:
mhroncok: fedora-review+


Attachments (Terms of Use)

Description Ben Beasley 2022-04-22 11:14:58 UTC
Spec URL: https://music.fedorapeople.org/python-hatch-vcs.spec
SRPM URL: https://music.fedorapeople.org/python-hatch-vcs-0.2.0-1.fc35.src.rpm
Description:

This provides a plugin for Hatch that uses your preferred version control
system (like Git) to determine project versions.

Fedora Account System Username: music

Koji scratch builds:

F37: https://koji.fedoraproject.org/koji/taskinfo?taskID=86074660
F36: https://koji.fedoraproject.org/koji/taskinfo?taskID=86074661

This will be needed to update python-platformdirs to version 2.5.2.

Comment 1 Ben Beasley 2022-04-22 11:19:13 UTC
CC’ing Miro Hrončok, who might be interested in this since it is another hatchling package, and Carl George, who maintains python-platformdirs.

Comment 2 Miro Hrončok 2022-04-22 11:58:47 UTC
Happy to review. But before I do: What is the idea behind this package? This is setuptools_scm for hatchling? How reliable it is in rpmbuild when we build from sdists, and from github tarballs?

Comment 3 Ben Beasley 2022-04-22 12:11:18 UTC
Yes, as I understand it this is pretty much setuptools_scm for hatchling.

I’m still working on the application to RPM builds. In my work so far on a PR for python-platformdirs, it at least seems like the option of simply patching it out of pyproject.toml and ignoring it will not be straightforward, so I went ahead and put up the review, but I haven’t actually gotten to the point of using it yet. I’ll hopefully get to that shortly and report back on what hoops I have to jump through to actually use it with a PyPI sdist.

I’m hoping that it can at least pick up the version from PyPI sdists somehow. If I end up having to create a local git repository with a tag in order to get this to work in python-platformdirs, I’ll probably ask upstream about something like the SETUPTOOLS_SCM_PRETEND_VERSION environment variable.

See also the discussion on https://github.com/platformdirs/platformdirs/commit/d6ab2ca5bb19d0c707352d826d76785d085d165f#commitcomment-71548711.

Comment 4 Ben Beasley 2022-04-22 13:03:20 UTC
At least for the PyPI sdist of python-platformdirs, it’s sufficient to have python3-hatch-vcs installed, and the versions are set correctly without any further workarounds.

PR: https://src.fedoraproject.org/rpms/python-platformdirs/pull-request/4
COPR: https://copr.fedorainfracloud.org/coprs/music/platformdirs-2.5.2/packages/

For GitHub archives, I suspect but have not verified that some workaround will be needed in most cases. This uses setuptools-scm as a dependency, and I wouldn’t be surprised if

> export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}'

already works.

Comment 5 Ben Beasley 2022-04-22 13:18:04 UTC
I confirmed for python-platformdirs that:

1. As already noted, just having hatch-vcs available is good enough for the PyPI sdist.
2. If we were using the GitHub archive,

> export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}'

allows hatch-vcs to set the version correctly[1], since it’s letting setuptools_scm do the hard work.

[1] https://src.fedoraproject.org/fork/music/rpms/python-platformdirs/c/a879e401b1db70f667fdea74badc47da7971b78c?branch=v2.5.2-github

Comment 6 Miro Hrončok 2022-04-22 13:25:39 UTC
Package Review
==============

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".
[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 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]: 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:
[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).
[x]: 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: No rpmlint messages.
[x]: Spec file according to URL is the same as in SRPM.


Rpmlint
-------
2 packages and 1 specfiles checked; 0 errors, 0 warnings, 0 badness; has taken 1.2 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.0 s 



Source checksums
----------------
https://files.pythonhosted.org/packages/source/h/hatch_vcs/hatch_vcs-0.2.0.tar.gz :
  CHECKSUM(SHA256) this package     : 9913d733b34eec9bb0345d0626ca32165a4ad2de15d1ce643c36d09ca908abff
  CHECKSUM(SHA256) upstream package : 9913d733b34eec9bb0345d0626ca32165a4ad2de15d1ce643c36d09ca908abff


Requires
--------
python3-hatch-vcs (rpmlib, GLIBC filtered):
    python(abi)
    python3.10dist(hatchling)
    python3.10dist(setuptools-scm)

BuildRequires
-------------
$ rpm -qRp 2077832-python-hatch-vcs/results/python-hatch-vcs-0.2.0-1.fc37.src.rpm 
    git-core
    pyproject-rpm-macros
    python3-devel
    python3-devel
    python3dist(hatchling) >= 0.21
    python3dist(packaging)
    python3dist(pip) >= 19
    python3dist(pytest)
    python3dist(setuptools-scm) >= 6.4
    python3dist(toml)
    python3dist(tomli)
    rpmlib(...)


Provides
--------
python3-hatch-vcs:
    python-hatch-vcs
    python3-hatch-vcs
    python3.10-hatch-vcs
    python3.10dist(hatch-vcs)
    python3dist(hatch-vcs)



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

Comment 7 Ben Beasley 2022-04-22 13:27:28 UTC
Thanks for the review! Repository requested: https://pagure.io/releng/fedora-scm-requests/issue/43830

Comment 8 Gwyn Ciesla 2022-04-22 16:32:38 UTC
(fedscm-admin):  The Pagure repository was created at https://src.fedoraproject.org/rpms/python-hatch-vcs

Comment 9 Fedora Update System 2022-04-22 16:45:34 UTC
FEDORA-2022-8e0a821407 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-8e0a821407

Comment 10 Fedora Update System 2022-04-22 16:48:39 UTC
FEDORA-2022-8e0a821407 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2022-04-22 18:19:56 UTC
FEDORA-2022-f3ae4dbd0c has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-f3ae4dbd0c

Comment 12 Fedora Update System 2022-04-23 17:13:52 UTC
FEDORA-2022-f3ae4dbd0c has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2022-f3ae4dbd0c \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-f3ae4dbd0c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2022-05-01 18:12:13 UTC
FEDORA-2022-f3ae4dbd0c has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --advisory=FEDORA-2022-f3ae4dbd0c \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-f3ae4dbd0c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2022-05-08 03:06:37 UTC
FEDORA-2022-c144984c29 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-c144984c29`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-c144984c29

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2022-05-16 01:08:17 UTC
FEDORA-2022-c144984c29 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


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