From: Wojtek Kosior via Guix-patches via <guix-patches@gnu.org>
To: 64573@debbugs.gnu.org
Cc: Wojtek Kosior <koszko@koszko.org>,
Lars-Dominik Braun <lars@6xq.net>, jgart <jgart@dismail.de>
Subject: [bug#64573] [PATCH 2/3] gnu: python-pip: Enable user site even with PYTHONNOUSERSITE
Date: Tue, 11 Jul 2023 20:14:39 +0200 [thread overview]
Message-ID: <6165ff7042c6d1269a471924e7e383be04f6c0da.1689093931.git.koszko@koszko.org> (raw)
In-Reply-To: <cover.1689093931.git.koszko@koszko.org>
* 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
next prev parent reply other threads:[~2023-07-11 19:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-11 18:12 [bug#64573] [PATCH 0/3] guix: build: python-build-system: Have applications by default ignore non-Guix libraries in user site dir Wojtek Kosior via Guix-patches via
2023-07-11 18:14 ` [bug#64573] [PATCH 1/3] guix: build: python-build-system: Don't process " Wojtek Kosior via Guix-patches via
2023-07-11 18:14 ` Wojtek Kosior via Guix-patches via [this message]
2023-07-11 18:14 ` [bug#64573] [PATCH 3/3] guix: build: python-build-system: Honor disable-user-site? argument Wojtek Kosior via Guix-patches via
2023-07-16 8:55 ` [bug#64573] [PATCH 0/3] guix: build: python-build-system: Have applications by default ignore non-Guix libraries in user site dir Lars-Dominik Braun
2023-07-17 14:23 ` Wojtek Kosior via Guix-patches via
2023-07-18 9:41 ` Lars-Dominik Braun
2023-07-18 12:55 ` Wojtek Kosior via Guix-patches via
2023-07-22 0:30 ` 宋文武 via Guix-patches via
2023-07-26 9:14 ` bug#64573: " Wojtek Kosior via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6165ff7042c6d1269a471924e7e383be04f6c0da.1689093931.git.koszko@koszko.org \
--to=guix-patches@gnu.org \
--cc=64573@debbugs.gnu.org \
--cc=jgart@dismail.de \
--cc=koszko@koszko.org \
--cc=lars@6xq.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.