]> xenbits.xensource.com Git - unikraft/libs/python3.git/commitdiff
Add support for the Shapely extension RELEASE-0.14.0
authorAndrei Tatar <andrei@unikraft.io>
Tue, 18 Jul 2023 21:02:19 +0000 (23:02 +0200)
committerUnikraft <monkey@unikraft.io>
Mon, 14 Aug 2023 19:23:03 +0000 (19:23 +0000)
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 <andrei@unikraft.io>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Maria Sfiraiala <maria.sfiraiala@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #17

Config.uk
modules_config.c

index f99fef23b866618105ae2cc44a8c4326900e261d..f8f55d6efa368c6e09580f62bded2801a76a821c 100644 (file)
--- 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
index 70a6d46095cb77484fdd6bc2314cd9af539def30..8e5529526016ef7702257cd3a98a79092d639f09 100644 (file)
@@ -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}
 };