From 939e3813d0520d56440009a6efd5444a88555e2f Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Thu, 2 Dec 2021 19:28:56 +0100 Subject: gnu: trytond: Fix import of trytond modules. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 76403bbdf9..0ed4dd607f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1845,6 +1845,7 @@ dist_patch_DATA = \ %D%/packages/patches/tor-sandbox-i686.patch \ %D%/packages/patches/transcode-ffmpeg.patch \ %D%/packages/patches/transmission-honor-localedir.patch \ + %D%/packages/patches/trytond-add-egg-modules-to-path.patch \ %D%/packages/patches/ttf2eot-cstddef.patch \ %D%/packages/patches/tup-unbundle-dependencies.patch \ %D%/packages/patches/tuxpaint-stamps-path.patch \ -- cgit 1.4.1