Simon Tournier <[email protected]> writes:
> Hi,
>
> On Tue, 18 Feb 2025 at 17:51, Gary Johnson <[email protected]> wrote:
>
>> Okay, so it looks like all of the libraries I wanted were still built
>> against the `python` package because it is included by the
>> `python-build-system`, which is used in all of their package
>> definitions.
>
> Yes. All the Python packages are only built with the defautl Python
> interpreter.
>
>
>> Unfortunately, this crashes when attempting to build
>> `python-pytz`. Here's the relevant build error:
>
> Indeed, there is no guarantee that the recipe of one Python package
> builds equally for two different versions of the Python interpreter.
Unfortunately, this doesn't appear to be an issue with breaking
changes between Python versions but rather with the absence of
`python-setuptools` in the updated build pipeline.
>> Unfortunately, adding `python-setuptools` to the `guix shell`
>> invocation doesn't seem to work.
>
> Using Andreas explanations and patch, is it enough for your use case?
I understand why adding `python-setuptools` directly to the `guix
shell` invocation won't help because it's not updating the inputs
further down the dependency graph. Andreas' patch did not help me
unfortunately. By adding `python-setuptools` directly to the inputs of
`python-pytz`, this just leads to other packages failing to build for
the same reason.
I've tried using package transformation functions to add
`python-setuptools` to all of the packages in my tree, but I'm only
able to update the top-level ones. This currently leads to `meson`
(further down the tree) throwing the missing setuptools error that was
previously plaguing `python-pytz`.
Here's my current manifest script:
```
(use-modules
((gnu packages base) #:select (coreutils))
((gnu packages bash) #:select (bash))
((gnu packages build-tools) #:select (meson))
((gnu packages protobuf) #:select (python-protobuf))
((gnu packages python) #:select (python-toolchain python python-next))
((gnu packages python-build) #:select (python-setuptools))
((gnu packages rpc) #:select (python-grpcio))
((gnu packages time) #:select (python-dateutil python-pytz))
((gnu packages wget) #:select (wget))
((guix build-system python) #:select (pypi-uri python-build-system))
((guix download) #:select (url-fetch))
((guix licenses) #:select (expat))
((guix packages) #:select (package origin base32 package-inputs
modify-inputs package-input-rewriting))
((guix profiles) #:select (packages->manifest)))
(define (include-setuptools p)
(package
(inherit p)
(inputs (modify-inputs (package-inputs p)
(append python-setuptools)))))
(define use-python-next
(package-input-rewriting `((,python . ,python-next))))
(packages->manifest
(append
(list coreutils
bash
wget)
(map (compose use-python-next include-setuptools)
(list python-toolchain
python-grpcio
python-protobuf
python-dateutil
python-pytz))))
```
Thanks again for your help.
Cheers,
Gary
--
GPG Key ID: C4FBEDBD
Use `gpg --search-keys [email protected]' to find me
Protect yourself from surveillance: https://emailselfdefense.fsf.org
=======================================================================
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
Why is HTML email a security nightmare? See https://useplaintext.email/
Please avoid sending me MS-Office attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html