all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 0ac0da46ce507a91f0de3f2c09e21321094f3117 1255 bytes (raw)
name: gnu/packages/patches/python-2.7-site-prefixes.patch.in 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 
Add all /gnu/store/ prefixes found in PYTHONPATH to the prefixes where
site-packages (and .pth files) are searched.

*** Python-2.7.11/Lib/site.py.orig	2016-10-17 23:27:23.746149690 +0200
--- Python-2.7.11/Lib/site.py	2016-10-17 23:44:51.930871644 +0200
***************
*** 65,70 ****
--- 65,85 ----
  
  # Prefixes for site-packages; add additional prefixes like /usr/local here
  PREFIXES = [sys.prefix, sys.exec_prefix]
+ # Guix: Add all /gnu/store-paths in PYTHONPATH--these are all
+ # "prefixes".  This is required to search .pth files in all python
+ # packages contained in /gnu/store which is required to make
+ # .pth-defined namespace packages work.
+ # This is necessary if the packages are not merged into a single
+ # `site-packages` directory (like when using `guix environment`) but
+ # listed in PYTHONPATH (like when running `guix build`).
+ guix_store = os.getenv("NIX_STORE")
+ if not guix_store:
+     guix_store = '@storedir@'
+ for p in sys.path:
+     if p.startswith(guix_store):
+         PREFIXES.append(p[:p.find('/', 34 + len(guix_store))]) # find first pathsep after hash
+ del p
+ 
  # Enable per user site-packages directory
  # set it to False to disable the feature or True to force the feature
  ENABLE_USER_SITE = None

debug log:

solving 0ac0da46ce ...
found 0ac0da46ce in https://yhetil.org/guix/87sgx0cvgm.fsf_-_@cune.org/
found 9e3066508f in https://git.savannah.gnu.org/cgit/guix.git
preparing index
index prepared:
100644 9e3066508f152f16a804b1951c6997b3a262197b	gnu/packages/patches/python-2.7-site-prefixes.patch

applying [1/1] https://yhetil.org/guix/87sgx0cvgm.fsf_-_@cune.org/
diff --git a/gnu/packages/patches/python-2.7-site-prefixes.patch b/gnu/packages/patches/python-2.7-site-prefixes.patch.in
similarity index 81%
rename from gnu/packages/patches/python-2.7-site-prefixes.patch
rename to gnu/packages/patches/python-2.7-site-prefixes.patch.in
index 9e3066508f..0ac0da46ce 100644

Checking patch gnu/packages/patches/python-2.7-site-prefixes.patch => gnu/packages/patches/python-2.7-site-prefixes.patch.in...
Applied patch gnu/packages/patches/python-2.7-site-prefixes.patch => gnu/packages/patches/python-2.7-site-prefixes.patch.in cleanly.

index at:
100644 0ac0da46ce507a91f0de3f2c09e21321094f3117	gnu/packages/patches/python-2.7-site-prefixes.patch.in

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

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.