~ruther/guix-local

ref: version-1.5.0 guix-local/gnu/packages/patches/trytond-add-guix_trytond_path.patch -rw-r--r-- 601 bytes
2ae3c696 — Hilton Chain import: crate: Generate comments with ‘TODO REVIEW:’ prefix. 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Make trytond add all paths listed in GUIX_TRYTOND_MODULES_PATH to sys.path.

*** a/trytond/modules/__init__.py
--- b/trytond/modules/__init__.py
***************
*** 31,36 ****
--- 31,45 ----
  
  EGG_MODULES = {}
  
+ def __extend_python_path__():
+     trytond_modules_path = os.environ.get("GUIX_TRYTOND_MODULES_PATH")
+     if trytond_modules_path:
+         # make tryton.module behave like a namespace package
+         __path__.extend(trytond_modules_path.split(os.pathsep))
+ 
+ __extend_python_path__()
+ del __extend_python_path__
+ 
  
  def update_egg_modules():
      global EGG_MODULES
l