~ruther/guix-local

ref: 64668f7c15fa639831209f25e313c99a1047de7b guix-local/gnu/packages/patches/trytond-add-guix_trytond_path.patch -rw-r--r-- 601 bytes
64668f7c — Rutherther etc: release: Add spare space to the release VM image. a month 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