[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#52684: [BUG] Multiple Packages Failing to Build
From: |
Christopher Rodriguez |
Subject: |
bug#52684: [BUG] Multiple Packages Failing to Build |
Date: |
Wed, 22 Dec 2021 14:59:09 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Icedove/78.15.0 |
I've been digging through the source, and it seems as though
`python-build-system` does not actually set the $GUIX_PYTHONPATH
variable in the environment. That variable seems to only be set by
`python-2.7` and its derivatives, including `python3.9`, during a step
after the install process.
I don't know if this is intended. If it is, that would mean that
(currently) there is no easy way to set the $GUIX_PYTHONPATH variable
outside of installing `python` in a profile. That would certainly be the
most expedient way forward (and how it would be done on traditional
distros).
Right now, beets is still calling the version of python in `/gnu/store`,
but since it isn't installed alongside `beets` as a propagated-input the
post-install step which sets that variable (which is called
`install-sitecustomize.py` and relies of the package version of the
python package being installed) is never run, and therefore the
environment variable remains unset in the profile.
Both `guix install python` and `export
GUIX_PYTHONPATH=/gnu/..../site-packages` work to allow the environment
variable to be set. But it might be better and more future-proof to just
install python in the profile as a dependency, since the program itself
actually depends on `python` anyway.
What do You think?
Here is the relevant code, from /gnu/packages/python.scm.
```scheme
;Top of file
(define* (customize-site version)
"Generate a install-sitecustomize.py phase, using VERSION."
`(lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(site-packages (string-append
out "/lib/python"
,(version-major+minor version)
"/site-packages"))
(sitecustomize.py (assoc-ref (or native-inputs inputs)
"sitecustomize.py"))
(dest (string-append site-packages "/sitecustomize.py")))
(mkdir-p site-packages)
(copy-file sitecustomize.py dest)
;; Set the correct permissions on the installed file, else the
byte
;; compilation phase fails with a permission denied error.
(chmod dest #o644))))
---8<-----------------------------------------------------------------
; python2.7 definition
...
...
(add-after 'install 'install-sitecustomize.py
,(customize-site version)))))
```
OpenPGP_0x1102102EBE7C3AE4.asc
Description: OpenPGP public key
OpenPGP_signature
Description: OpenPGP digital signature
- bug#52684: [BUG] Multiple Packages Failing to Build, (continued)
- bug#52684: [BUG] Multiple Packages Failing to Build, zimoun, 2021/12/20
- bug#52684: [BUG] Multiple Packages Failing to Build, Christopher Rodriguez, 2021/12/21
- bug#52684: [BUG] Multiple Packages Failing to Build, Christopher Rodriguez, 2021/12/21
- bug#52684: [BUG] Multiple Packages Failing to Build, Christopher Rodriguez, 2021/12/21
- bug#52684: [BUG] Multiple Packages Failing to Build, Christopher Rodriguez, 2021/12/22
- bug#52684: [BUG] Multiple Packages Failing to Build,
Christopher Rodriguez <=
- bug#52684: [BUG] Multiple Packages Failing to Build, Maxime Devos, 2021/12/22
- bug#52684: [BUG] Multiple Packages Failing to Build, Christopher Rodriguez, 2021/12/27
- bug#52684: [BUG] Multiple Packages Failing to Build, Christopher Rodriguez, 2021/12/27