[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/03: gnu: python-pip: Enable user site even with PYTHONNOUSERSITE
From: |
guix-commits |
Subject: |
02/03: gnu: python-pip: Enable user site even with PYTHONNOUSERSITE |
Date: |
Tue, 18 Jul 2023 05:38:49 -0400 (EDT) |
rekado pushed a commit to branch python-team
in repository guix.
commit da2cd0a1d58512387775db6d83ecc1dfa376821c
Author: Wojtek Kosior <koszko@koszko.org>
AuthorDate: Tue Jul 11 20:14:39 2023 +0200
gnu: python-pip: Enable user site even with PYTHONNOUSERSITE
* 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 @@ Included are implementations of:
"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