mirror of
https://codeberg.org/guix/guix.git
synced 2026-01-25 03:55:08 -06:00
Discussion <https://codeberg.org/guix/guix/issues/1438> resulted in the decision to maintain the LTS version, which is 7.0. * gnu/packages/tryton.scm(tryton): Downgrade to 7.0.37. [arguments][#:phases][preperations]: Set DB_CACHE. [propagated-inputs] Add python-psycopg2. [native-inputs] Add python-html2text, remove python-wheel. [native-search-paths] Add guix-pythonpath-search-path. * gnu/packages/patches/trytond-add-guix_trytond_path.patch: Add modules in GUIX_TRYTOND_MODULES_PATH directly to trytond.modules.__path__. Delete helper function after it's done. Change-Id: Ib2902c8e204467f08135885c793371105aeed7e5
23 lines
601 B
Diff
23 lines
601 B
Diff
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
|