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,82 ----
# 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`).
+ for p in sys.path:
+ if p.startswith('/gnu/store/'):
+ PREFIXES.append(p[:p.find('/', 44)]) # 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
32b2b0330a3093a41b16f7699f29b9'>refslogtreecommitdiff
|
Age | Commit message (Expand) | Author |
2021-05-25 | guile: Leave 'scm_install_gmp_memory_functions' unchanged....Since the switch to Guile 3.0.7 using mini-GMP, we can leave
'scm_install_gmp_memory_functions' to its default value, which is to use
custom memory allocators; there is no interference with users of GMP
such as GnuTLS/Nettle.
* gnu/packages/aux-files/guile-launcher.c (main) [!SCM_ENABLE_MINI_GMP]:
Leave 'scm_install_gmp_memory_functions' unchanged.
| Ludovic Courtès |
2021-02-07 | guile: Do not install Guile/libgc allocators for GMP....Fixes <https://bugs.gnu.org/46330>.
* gnu/packages/aux-files/guile-launcher.c (main): Clear
'scm_install_gmp_memory_functions'.
| Ludovic Courtès |
2020-12-11 | guix: 'guile' executable ignores GUILE_LOAD_PATH during startup....When starting the 'guix' command, this ensures Guile modules are
immediately found instead of being search for in other directories.
This reduces the number of 'stat' calls during startup when
GUILE_LOAD_PATH is set to (almost) that of "env -i $(type -P guix)".
* gnu/packages/aux-files/guile-launcher.c (load_path)
(load_compiled_path): New variables.
(inner_main): Restore GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH and
set %load-path and %load-compiled-path accordingly.
(main): Save GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH and unset them.
| Ludovic Courtès |