Questions about updating the Python build tools for a patch

  • Open
  • quality assurance status badge
Details
One participant
  • King, Spencer
Owner
unassigned
Submitted by
King, Spencer
Severity
normal
K
K
King, Spencer wrote on 8 Oct 22:53 +0200
(name . King, Spencer via Guix-patches via)(address . guix-patches@gnu.org)
CH3PR02MB97467B47BD5504C18B1B6268907E2@CH3PR02MB9746.namprd02.prod.outlook.com
Hello,

I am working on a patch for an update to python-humanize, but I believe this is going to necessitate updating some packages in python-build. I would appreciate it if someone could give me some advice and let me know if this is even the right thing to be doing.

When trying to build python-humanize@4.11.0 I received the following error:

starting phase `build'
Using 'hatchling.build' to build wheels, auto-detected 'hatchling.build', override '#f'.
Traceback (most recent call last):
File "<string>", line 4, in <module>
File "/gnu/store/iafxd40mzizd2kndvla2inmkmjhnygrr-python-hatchling-1.14.0/lib/python3.10/site-packages/hatchling/build.py", line 56, in build_wheel
return os.path.basename(next(builder.build(wheel_directory, ['standard'])))
File "/gnu/store/iafxd40mzizd2kndvla2inmkmjhnygrr-python-hatchling-1.14.0/lib/python3.10/site-packages/hatchling/builders/plugin/interface.py", line 93, in build
self.metadata.validate_fields()
File "/gnu/store/iafxd40mzizd2kndvla2inmkmjhnygrr-python-hatchling-1.14.0/lib/python3.10/site-packages/hatchling/metadata/core.py", line 244, in validate_fields
self.core.validate_fields()
File "/gnu/store/iafxd40mzizd2kndvla2inmkmjhnygrr-python-hatchling-1.14.0/lib/python3.10/site-packages/hatchling/metadata/core.py", line 1325, in validate_fields
getattr(self, attribute)
File "/gnu/store/iafxd40mzizd2kndvla2inmkmjhnygrr-python-hatchling-1.14.0/lib/python3.10/site-packages/hatchling/metadata/core.py", line 978, in classifiers
raise ValueError(message)
ValueError: Unknown classifier in field `project.classifiers`: Programming Language :: Python :: 3.13

I believe this is due to python-hatchling being a little out of date. I updated python-hatchling, however this requires a more recent version of python-packaging. I see that the current package uses python-packaging-bootstrap, which cannot be updated without creating a circular dependency, shown below:

gnu/packages/python.scm:1171:4: error: python-toolchain@3.10.7: dependency cycle detected:
python-toolchain@3.10.7 -> python-packaging-bootstrap@24.1 -> python-pypa-build@0.7.0 -> python-toolchain@3.10.7 -> python-humanize@4.11.0

To resolve this, my plan was to change that dependency to python-packaging and update that package's version. However, when I try to add "#:use-module (gnu packages python-xyz)" like so:

(define-module (gnu packages python-build)
#:use-module (gnu packages)
#:use-module (gnu packages python-xyz)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix build-system python)
#:use-module (guix build-system pyproject)
#:use-module (guix gexp)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix packages))

I receive the following error:

ice-9/eval.scm:293:34: error: python-setuptools: unbound variable
hint: Did you forget a `use-modules' form?

Does anyone have any insight on what is happening here and if I am even on the right track to begin with?

Best,
Spencer
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 73711@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 73711
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch