#98 [epel9] Remove workarounds for old hatchling
Merged 20 days ago by music. Opened a month ago by music.
rpms/ music/python-virtualenv hatchling1-epel9  into  epel9

file modified
+6 -10
@@ -1,6 +1,6 @@ 

  Name:           python-virtualenv

  Version:        20.20.0

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Summary:        Tool to create isolated Python environments

  

  License:        MIT
@@ -88,17 +88,13 @@ 

  sed -i -e 's/distlib<1,>=0.3.6/distlib<1,>=0.3.2/' \

         -e 's/filelock<4,>=3.4.1/filelock<4,>=3.3.1/' \

         -e 's/platformdirs<4,>=2.4/platformdirs<4,>=2.3/' \

-        -e 's/hatchling>=1.12.2/hatchling>=0.25/' \

-        -e 's/hatch-vcs>=0.3/hatch-vcs>=0.2.1/' \

      pyproject.toml

  

  %generate_buildrequires

- # EPEL 9: old hatchling needs the -w option

- %pyproject_buildrequires -w

+ %pyproject_buildrequires

  

  %build

- # EPEL 9: %%pyproject_buildrequires -w makes this redundant

- # %%pyproject_wheel

+ %pyproject_wheel

  

  %install

  %pyproject_install
@@ -136,11 +132,11 @@ 

  %files -n python3-virtualenv -f %{pyproject_files}

  %doc README.md

  %{_bindir}/virtualenv

- # EPEL 9: old hatchling does not mark this as License-File automatically

- # (this will produce a "File listed twice" warning, ignore it)

- %license %{python3_sitelib}/virtualenv-%{version}.dist-info/license_files/LICENSE

  

  %changelog

+ * Thu Jul 27 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 20.20.0-2

+ - Remove workarounds for old hatchling

+ 

  * Wed Mar 01 2023 Lumír Balhar <lbalhar@redhat.com> - 20.20.0-1

  - Update to 20.20.0 (rhbz#2174221)

  

This adapts python-virtualenv for hatchling 1.x; some packaging changes are required in this case even though the update should generally be considered API-compatible.

To be merged and built in a side tag with:

See also https://bugzilla.redhat.com/show_bug.cgi?id=2158497.

A COPR impact check shows that other packages that depend on hatchling or hatch-vcs continue to build from source in EPEL9 without changes. Some enhancements may be desirable (dropping -w from %pyproject_buildrequires, ensuring license files are not duplicated...), but these can be done after the fact.

I will allow a couple of days for questions and nit-picks, then I will proceed with the hatchling/hatch-vcs update, merging this PR as a python-packagers-sig member.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/a55db318bd5140ff85ee93e7b383b2d0

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/3a53dcd2228c473ba49a0ec9af5aab54

Could you also please adjust this sed in %prep to not allow hatchling that is too old for the rest of the changes?

# Relax the upper bounds of some dependencies to their known available versions in EL 9
# We run tests and CI to verify nothing broke
sed -i -e 's/distlib<1,>=0.3.6/distlib<1,>=0.3.2/' \
       -e 's/filelock<4,>=3.4.1/filelock<4,>=3.3.1/' \
       -e 's/platformdirs<4,>=2.4/platformdirs<4,>=2.3/' \
       -e 's/hatchling>=1.12.2/hatchling>=0.25/' \
       -e 's/hatch-vcs>=0.3/hatch-vcs>=0.2.1/' \
    pyproject.toml

Could you also please adjust this sed in %prep to not allow hatchling that is too old for the rest of the changes?

Thanks for catching that. Adjusting as follows and force-pushing:

diff --git a/python-virtualenv.spec b/python-virtualenv.spec
index 05f384a..6aa83fb 100644
--- a/python-virtualenv.spec
+++ b/python-virtualenv.spec
@@ -88,8 +88,6 @@ test ! -f src/virtualenv/seed/embed/wheels/*.whl
 sed -i -e 's/distlib<1,>=0.3.6/distlib<1,>=0.3.2/' \
        -e 's/filelock<4,>=3.4.1/filelock<4,>=3.3.1/' \
        -e 's/platformdirs<4,>=2.4/platformdirs<4,>=2.3/' \
-       -e 's/hatchling>=1.12.2/hatchling>=0.25/' \
-       -e 's/hatch-vcs>=0.3/hatch-vcs>=0.2.1/' \
     pyproject.toml

 %generate_buildrequires

rebased onto 344753a

a month ago

Thanks. Feel free to ship this together with the hatchling update assuming it still builds.

Alternatively, ship hatchling first, and then we can see the CI results here. Whatever works for you more.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/0529d636097a40a689ff6c6a9b3457c5

Thanks. Feel free to ship this together with the hatchling update assuming it still builds.

They work together in COPR, so I’ll plan to do that.

Currently, I’m testing upgrading hatchling all the way to the latest version assuming python-trove-classifiers is branched for EPEL9, and checking to make sure none of this paints me into a corner with respect to hatch versions once python-filelock is updated in EPEL9 to allow packaging it.

Successful scratch build in epel9-build-side-70927: https://koji.fedoraproject.org/koji/taskinfo?taskID=104268147

Merging and building in that side tag; see also https://src.fedoraproject.org/rpms/hatch/pull-request/12.

Pull-Request has been merged by music

20 days ago
Metadata