Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 517cf61

Browse files
committed
Add support for the Shapely extension
This change only adds the necessary module registrations and Kconfig options. Shapely itself is provided by its own unikraft port. Signed-off-by: Andrei Tatar <[email protected]>
1 parent 2d070a4 commit 517cf61

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

Config.uk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,11 @@ config LIBPYTHON3_EXTENSION_NUMPY
8888
default y
8989
endif
9090

91+
if LIBPYTHON_SHAPELY
92+
config LIBPYTHON3_EXTENSION_SHAPELY
93+
bool "Shapely"
94+
default y
95+
endif
96+
9197
endif
9298
endif

modules_config.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,14 @@ extern PyObject* PyInit__umath_tests(void);
186186
/* Numpy end */
187187
#endif
188188

189+
#if CONFIG_LIBPYTHON3_EXTENSION_SHAPELY
190+
/* Shapely */
191+
extern PyObject* PyInit_lib(void);
192+
extern PyObject* PyInit__geometry_helpers(void);
193+
extern PyObject* PyInit__geos(void);
194+
/* Shapely end */
195+
#endif
196+
189197
struct _inittab _PyImport_Inittab[] = {
190198

191199
{"posix", PyInit_posix},
@@ -384,6 +392,12 @@ struct _inittab _PyImport_Inittab[] = {
384392
{"numpy_core__umath_tests", PyInit__umath_tests},
385393
#endif
386394

395+
#if CONFIG_LIBPYTHON3_EXTENSION_SHAPELY
396+
{"shapely_lib", PyInit_lib},
397+
{"shapely__geometry_helpers", PyInit__geometry_helpers},
398+
{"shapely__geos", PyInit__geos},
399+
#endif
400+
387401
/* Sentinel */
388402
{0, 0}
389403
};

0 commit comments

Comments
 (0)