all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 1baccfee1caa6ee7dc1a2741ebee2bd60537e80b 885 bytes (raw)
name: gnu/packages/patches/trytond-add-egg-modules-to-path.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
Work around trytond.module not being a real namespace module.

Solution is to add all trytond module's locations to
trytond.modules._path__. This will make trytond.module behave much
like a namespace module.
Adding to __path__ is done in update_egg_modules() to ensure __path__
is updated whenever the list of egg modules is updated.

*** a/trytond/modules/__init__.py	1970-01-01 01:00:01.000000000 +0100
--- b/trytond/modules/__init__.py	2021-12-02 18:12:15.385101986 +0100
***************
*** 38,43 ****
--- 38,46 ----
          import pkg_resources
          for ep in pkg_resources.iter_entry_points('trytond.modules'):
              EGG_MODULES[ep.name] = ep
+             path = os.path.join(ep.dist.location, 'trytond', 'modules')
+             if not path in __path__ and os.path.isdir(path):
+                 __path__.append(path)
      except ImportError:
          pass
  

debug log:

solving 1baccfee1c ...
found 1baccfee1c in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.