Re-add Setup.local for Darwin (incl _ssl)
The change to add darwin/arm64 support accidentally dropped the Setup.local
configuration for Darwin, losing a few modules. Add them back in.
Test: on Mac, ./py3-cmd -c "import ssl"
Bug: 257239885
Change-Id: Id1ef437d82387f2b29e5f2e84374afbaabee3584
diff --git a/Android-darwin.bp b/Android-darwin.bp
index 023d371..d00a65c 100644
--- a/Android-darwin.bp
+++ b/Android-darwin.bp
@@ -19,6 +19,7 @@
"Modules/_ctypes/stgdict.c",
"Modules/_datetimemodule.c",
"Modules/_functoolsmodule.c",
+ "Modules/_hashopenssl.c",
"Modules/_heapqmodule.c",
"Modules/_io/_iomodule.c",
"Modules/_io/bufferedio.c",
@@ -32,6 +33,7 @@
"Modules/_lsprof.c",
"Modules/_math.c",
"Modules/_multiprocessing/multiprocessing.c",
+ "Modules/_multiprocessing/posixshmem.c",
"Modules/_multiprocessing/semaphore.c",
"Modules/_opcode.c",
"Modules/_operator.c",
@@ -39,6 +41,7 @@
"Modules/_posixsubprocess.c",
"Modules/_queuemodule.c",
"Modules/_randommodule.c",
+ "Modules/_scproxy.c",
"Modules/_sha3/sha3module.c",
"Modules/_sqlite/cache.c",
"Modules/_sqlite/connection.c",
@@ -50,6 +53,7 @@
"Modules/_sqlite/statement.c",
"Modules/_sqlite/util.c",
"Modules/_sre.c",
+ "Modules/_ssl.c",
"Modules/_stat.c",
"Modules/_statisticsmodule.c",
"Modules/_struct.c",
diff --git a/android/darwin/Setup.local b/android/darwin/Setup.local
new file mode 100644
index 0000000..336dc03
--- /dev/null
+++ b/android/darwin/Setup.local
@@ -0,0 +1,4 @@
+_posixshmem _multiprocessing/posixshmem.c
+_scproxy _scproxy.c
+_ssl _ssl.c
+_hashlib _hashopenssl.c
diff --git a/android/darwin/config.c b/android/darwin/config.c
index cf249dc..c122fa1 100644
--- a/android/darwin/config.c
+++ b/android/darwin/config.c
@@ -23,6 +23,10 @@ extern "C" {
#endif
+extern PyObject* PyInit__posixshmem(void);
+extern PyObject* PyInit__scproxy(void);
+extern PyObject* PyInit__ssl(void);
+extern PyObject* PyInit__hashlib(void);
extern PyObject* PyInit_array(void);
extern PyObject* PyInit_cmath(void);
extern PyObject* PyInit_math(void);
@@ -108,6 +112,10 @@ extern PyObject* PyInit__string(void);
struct _inittab _PyImport_Inittab[] = {
+ {"_posixshmem", PyInit__posixshmem},
+ {"_scproxy", PyInit__scproxy},
+ {"_ssl", PyInit__ssl},
+ {"_hashlib", PyInit__hashlib},
{"array", PyInit_array},
{"cmath", PyInit_cmath},
{"math", PyInit_math},