all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 7dc136ec4677c6c2c7200041e0898786a6df6233 832 bytes (raw)
name: gnu/packages/patches/trytond-add-guix_trytond_path.patch 	 # 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
 
Make trytond add all paths listed in GUIX_TRYTOND_MODULES_PATH to sys.path.

*** a/trytond/modules/__init__.py	1970-01-01 01:00:01.000000000 +0100
--- b/trytond/modules/__init__.py	2021-12-02 22:17:28.014612267 +0100
***************
*** 31,36 ****
--- 31,48 ----
  
  EGG_MODULES = {}
  
+ def __extend_python_path__():
+     tryton_python_path = os.environ.get("GUIX_TRYTOND_MODULES_PATH")
+     if tryton_python_path:
+         paths = [path[:-16]  # remove "/trytond/modules"
+                  for path in tryton_python_path.split(os.pathsep)]
+         sys.path.extend(paths)
+         # ensure new paths are in the pkg_resources WorkingSet
+         import pkg_resources
+         list(map(pkg_resources.working_set.add_entry, paths))
+ 
+ __extend_python_path__()
+ 
  
  def update_egg_modules():
      global EGG_MODULES
l

debug log:

solving 7dc136ec46 ...
found 7dc136ec46 in https://git.savannah.gnu.org/cgit/guix.git

(*) 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.