aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/tryton.scm
diff options
context:
space:
mode:
authorHartmut Goebel <h.goebel@crazy-compilers.com>2021-12-02 19:28:56 +0100
committerHartmut Goebel <h.goebel@crazy-compilers.com>2021-12-18 15:13:56 +0100
commit939e3813d0520d56440009a6efd5444a88555e2f (patch)
tree5bbae3ddaf201c2c204d85c585b6c29e82a854a3 /gnu/packages/tryton.scm
parent6eba17043a9eb01d04bf411fddc1f1699853ec8c (diff)
downloadguix-939e3813d0520d56440009a6efd5444a88555e2f.tar
guix-939e3813d0520d56440009a6efd5444a88555e2f.tar.gz
gnu: trytond: Fix import of trytond modules.
For adding modules, trytond uses entry-points, anyhow relying on the modules being named "trytond.modules.xxx" and being placed in the same filesystem path as "trytond.modules". The package "trytond.modules" is not a namespace module, anyhow trytond modules must be sub-modules of "trytond.modules". This works well if all packages are installed into the same filesystem path "…/trytond/modules": The Python importer will find all sub_modules at this place. Anyhow, in Guix, modules don't share the same filesystem path and the Python importer will not find them. Solution is to add all trytond module's locations to "trytond.modules._path__". This will make "trytond.module" behave much like a namespace module and the importer pick up the module. * gnu/packages/patches/trytond-add-egg-modules-to-path.patch: New file. * gnu/packages/tryton.scm (trytond): Use it. * gnu/local.mk (dist_patch_DATA): Add it
Diffstat (limited to 'gnu/packages/tryton.scm')
-rw-r--r--gnu/packages/tryton.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/packages/tryton.scm b/gnu/packages/tryton.scm
index 6ba7539b4a..0bd5ffcd5b 100644
--- a/gnu/packages/tryton.scm
+++ b/gnu/packages/tryton.scm
@@ -48,7 +48,8 @@
(method url-fetch)
(uri (pypi-uri "trytond" version))
(sha256
- (base32 "1jp5cadqpwkcnml8r1hj6aak5kc8an2d5ai62p96x77nn0dp3ny4"))))
+ (base32 "1jp5cadqpwkcnml8r1hj6aak5kc8an2d5ai62p96x77nn0dp3ny4"))
+ (patches (search-patches "trytond-add-egg-modules-to-path.patch"))))
(build-system python-build-system)
(propagated-inputs
(list python-dateutil