-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[CORE UPDATE - PART I] Refactor python recipes + openssl + sqlite3 #1537
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
ecae875
dd2b402
883849e
4c487fd
e85969e
9fb72b0
c642482
fd99a30
71ba0fb
6cb1b20
f716a3a
de6808f
bc91696
1c365d9
f67c8f8
e11c4d1
6b60c62
56cb4cc
c8f7d0a
5d782e4
fc657c7
929f8fc
144c4a8
0e41ac7
70074bb
1063801
39bd03a
7075901
d2b7ba5
3ecf55c
d9eed72
0a797ed
1f47a69
f911677
00fe5ca
e94b765
2940c9a
54fa1d8
6a92b26
81066e2
3ac092d
6ceb46f
e91449f
d985f22
cdbf2ae
969cdc6
4083502
92f5493
2460d6e
2e6e256
1a4830b
fcac121
5c71a1a
c11f540
f4ce5b8
66d6394
c23cde6
c32741e
0fb5116
bd7d4c1
7a7d9f6
977a86d
dbbd3f8
bdd2b7c
99ee28b
5185b1e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -104,6 +104,10 @@ int main(int argc, char *argv[]) { | |
LOGP(env_argument); | ||
chdir(env_argument); | ||
|
||
#if PY_MAJOR_VERSION < 3 | ||
Py_NoSiteFlag=1; | ||
#endif | ||
|
||
Py_SetProgramName(L"android_python"); | ||
|
||
#if PY_MAJOR_VERSION >= 3 | ||
|
@@ -144,10 +148,6 @@ int main(int argc, char *argv[]) { | |
#if PY_MAJOR_VERSION >= 3 | ||
wchar_t *wchar_paths = Py_DecodeLocale(paths, NULL); | ||
Py_SetPath(wchar_paths); | ||
#else | ||
char *wchar_paths = paths; | ||
LOGP("Can't Py_SetPath in python2, so crystax python2 doesn't work yet"); | ||
exit(1); | ||
#endif | ||
|
||
LOGP("set wchar paths..."); | ||
|
@@ -161,6 +161,12 @@ int main(int argc, char *argv[]) { | |
Py_Initialize(); | ||
|
||
#if PY_MAJOR_VERSION < 3 | ||
// Can't Py_SetPath in python2 but we can set PySys_SetPath, which must | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm wondering if we should just omit this change, since SSL works with python 3 now and crystax becomes increasingly unnecessary. I think the better plan is to dump Crystax very soon. OpenSSL is as far as I know the only part remaining that doesn't work with @inclement 's new python 3 recipe, and you're fixing this right here in this pull request. Or is this also useful/necessary in some way for non-crystax builds? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we cannot remove this line because we need that for the new version of python2 which also use the |
||
// be applied after Py_Initialize rather than before like Py_SetPath | ||
#if PY_MICRO_VERSION >= 15 | ||
// Only for python native-build | ||
PySys_SetPath(paths); | ||
#endif | ||
PySys_SetArgv(argc, argv); | ||
#endif | ||
|
||
|
@@ -183,7 +189,9 @@ int main(int argc, char *argv[]) { | |
*/ | ||
PyRun_SimpleString("import sys, posix\n"); | ||
if (dir_exists("lib")) { | ||
/* If we built our own python, set up the paths correctly */ | ||
/* If we built our own python, set up the paths correctly. | ||
* This is only the case if we are using the python2legacy recipe | ||
*/ | ||
LOGP("Setting up python from ANDROID_APP_PATH"); | ||
PyRun_SimpleString("private = posix.environ['ANDROID_APP_PATH']\n" | ||
"argument = posix.environ['ANDROID_ARGUMENT']\n" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,9 +18,7 @@ LOCAL_CFLAGS := $(foreach D, $(APP_SUBDIRS), -I$(LOCAL_PATH)/$(D)) \ | |
-I$(LOCAL_PATH)/../jpeg \ | ||
-I$(LOCAL_PATH)/../intl \ | ||
-I$(LOCAL_PATH)/.. \ | ||
-I$(LOCAL_PATH)/../../../../other_builds/$(PYTHON2_NAME)/$(ARCH)/python2/python-install/include/python2.7 | ||
# -I$(LOCAL_PATH)/../../../../python-install/include/python2.7 | ||
# -I$(LOCAL_PATH)/../../../build/python-install/include/python2.7 | ||
-I$(LOCAL_PATH)/../../../../other_builds/$(MK_PYTHON_INCLUDE_ROOT) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think that we can replace them because the variables you propose are absolute paths, and we need them relative paths. |
||
|
||
|
||
LOCAL_CFLAGS += $(APPLICATION_ADDITIONAL_CFLAGS) | ||
|
@@ -40,7 +38,7 @@ LOCAL_LDLIBS := -lpython2.7 -lGLESv1_CM -ldl -llog -lz | |
|
||
# AND: Another hardcoded path that should be templated | ||
# AND: NOT TEMPALTED! We can use $ARCH | ||
LOCAL_LDFLAGS += -L$(LOCAL_PATH)/../../../../other_builds/$(PYTHON2_NAME)/$(ARCH)/python2/python-install/lib $(APPLICATION_ADDITIONAL_LDFLAGS) | ||
LOCAL_LDFLAGS += -L$(LOCAL_PATH)/../../../../other_builds/$(MK_PYTHON_LINK_ROOT) $(APPLICATION_ADDITIONAL_LDFLAGS) | ||
|
||
LIBS_WITH_LONG_SYMBOLS := $(strip $(shell \ | ||
for f in $(LOCAL_PATH)/../../libs/$ARCH/*.so ; do \ | ||
|
Uh oh!
There was an error while loading. Please reload this page.