Skip to content

py2geom: Fix module initialization.

For a typical installation looking like:

$LIBDIR
├── lib2geom.so -> lib2geom.so.1.0.0
├── lib2geom.so.1.0.0
├── pkgconfig
│   └── 2geom.pc
└── python3.7
    └── site-packages
        └── py2geom
            ├── __init__.py
            └── _py2geom.so

The py2geom init.py must use an absolute import using the fully qualified module name to find the _py2geom library, else the following error would be raised:

from _py2geom import *
ModuleNotFoundError: No module named '_py2geom'

Merge request reports