From: Andrei Tatar Date: Tue, 18 Jul 2023 21:02:19 +0000 (+0200) Subject: Add support for the Shapely extension X-Git-Tag: RELEASE-0.14.0 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=04fad4ffa4effd87d8eaf054b6fda35959204ef3;p=unikraft%2Flibs%2Fpython3.git 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 Reviewed-by: Stefan Jumarea Reviewed-by: Maria Sfiraiala Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #17 --- diff --git a/Config.uk b/Config.uk index f99fef2..f8f55d6 100644 --- a/Config.uk +++ b/Config.uk @@ -88,5 +88,11 @@ config LIBPYTHON3_EXTENSION_NUMPY default y endif +if LIBPYTHON_SHAPELY +config LIBPYTHON3_EXTENSION_SHAPELY + bool "Shapely" + default y +endif + endif endif diff --git a/modules_config.c b/modules_config.c index 70a6d46..8e55295 100644 --- a/modules_config.c +++ b/modules_config.c @@ -186,6 +186,14 @@ extern PyObject* PyInit__umath_tests(void); /* Numpy end */ #endif +#if CONFIG_LIBPYTHON3_EXTENSION_SHAPELY +/* Shapely */ +extern PyObject* PyInit_lib(void); +extern PyObject* PyInit__geometry_helpers(void); +extern PyObject* PyInit__geos(void); +/* Shapely end */ +#endif + struct _inittab _PyImport_Inittab[] = { {"posix", PyInit_posix}, @@ -384,6 +392,12 @@ struct _inittab _PyImport_Inittab[] = { {"numpy_core__umath_tests", PyInit__umath_tests}, #endif +#if CONFIG_LIBPYTHON3_EXTENSION_SHAPELY + {"shapely_lib", PyInit_lib}, + {"shapely__geometry_helpers", PyInit__geometry_helpers}, + {"shapely__geos", PyInit__geos}, +#endif + /* Sentinel */ {0, 0} };