GNU bug report logs -
#64573
[PATCH 0/3] guix: build: python-build-system: Have applications by default ignore non-Guix libraries in user site dir
Previous Next
Reported by: Wojtek Kosior <koszko <at> koszko.org>
Date: Tue, 11 Jul 2023 18:13:01 UTC
Severity: normal
Tags: patch
Done: Wojtek Kosior <koszko <at> koszko.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
* gnu/packages/python-build.scm (python-pip): Patch pip to allow installing to
user site dir when PYTHONNOUSERSITE is set by Guix wrapper script to
'GUIX_WRAPPER' string.
---
gnu/packages/python-build.scm | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm
index 154c97e9e4..54d12f3fdc 100644
--- a/gnu/packages/python-build.scm
+++ b/gnu/packages/python-build.scm
@@ -269,7 +269,15 @@ (define-public python-pip
"0jnk639v9h7ghslm4jnlic6rj3v29nygflx1hgxxndg5gs4kk1a0"))))
(build-system python-build-system)
(arguments
- '(#:tests? #f)) ; there are no tests in the pypi archive.
+ `(#:tests? #f ;there are no tests in the pypi archive
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'allow-installing-to-user-site
+ (lambda _
+ (substitute* "src/pip/_internal/commands/install.py"
+ (("( *if not site\\.ENABLE_USER_SITE):" match if-clause)
+ (string-append if-clause
+ " and not os.environ['PYTHONNOUSERSITE'] == 'GUIX_WRAPPER':"))))))))
(home-page "https://pip.pypa.io/")
(synopsis "Package manager for Python software")
(description
--
2.40.1
This bug report was last modified 1 year and 301 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.