Skip to content

Commit 494ed38

Browse files
committed
r32 as Python 3.6.2
- change revision number to r32. - check development tools in Makefile. - build succeed, but not tested with actual android devices. - reverted patch removed in 'Python/fileutils.c' - sysconfig file name was changed with empty platform string. (locale.patch) - disable Py_ASSERT in 'Modules/posixmodule.c'. - remove the not used file: Python-3.2.2-android.patch.
1 parent 592df78 commit 494ed38

10 files changed

+46
-159
lines changed

python3-alpha/LATEST_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
r31
1+
r32

python3-alpha/LATEST_VERSION_EXTRA

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
r31
1+
r32
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
r31
1+
r32

python3-alpha/Makefile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# build settings section 1 {{{1
88
VER_MAJ=3.6
99
VER_MAJ_NODOT=$(subst .,,$(VER_MAJ))
10-
VERSION=$(VER_MAJ).0
10+
VERSION=$(VER_MAJ).2
1111
# set -ex
1212
CWD := $(shell pwd)
1313
DEBUG=no
@@ -39,13 +39,22 @@ endif
3939
ifeq (x$(NDK_PATH),x)
4040
build: error
4141
else
42-
build: $(ZIP)
42+
build: .build_tools $(ZIP)
4343
endif
4444

4545
error:
4646
@echo please set NDK_PATH to android-ndk-r10d or later::
4747
@echo " $$ NDK_PATH=/path/to/android-ndk-r10d make build"
4848

49+
.build_tools:
50+
@echo "check zlib, if failed: apt install zlib-dev"
51+
python ../tools/check_zlib.py
52+
@echo "check makedepend command, if failed: apt install xutils-dev"
53+
makedepend
54+
@echo "check zip command, if failed: apt install zip"
55+
zip -v > /dev/null 2>&1
56+
touch .build_tools
57+
4958
# tools {{{2
5059
ndk_depends = $(NDK_PATH)/ndk-depends
5160
TAR := tar xfz
@@ -301,8 +310,8 @@ $(PYTHONTAR):
301310
make -C host-src Parser/pgen
302311
make -C host-src install
303312
cp host-src/Parser/pgen $(HOSTPYTHON)/bin/hostpgen
304-
cp host-src/Programs/_freeze_importlib \
305-
$(HOSTPYTHON)/bin/host_freeze_importlib
313+
# cp host-src/Programs/_freeze_importlib \
314+
# $(HOSTPYTHON)/bin/host_freeze_importlib
306315
touch .build_host
307316

308317
# python3: patching-configure-build {{{1
@@ -444,3 +453,4 @@ localinstall:
444453
adb push $(ZIPSCRIPTS) $(andpath)
445454

446455
# vi: ft=Makefile:fdm=marker
456+
# DO NOT DELETE

python3-alpha/Python-3.2.2-android.patch

Lines changed: 0 additions & 128 deletions
This file was deleted.

python3-alpha/openssl/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ $(OPENSSL_BIN_x86): .build_x86/Makefile
120120
.build_x86/Makefile: $(OPENSSL_SRC)
121121
rm -rf $(dir $@)
122122
tar xfz $(OPENSSL_SRC)
123-
mv $(OPENSSL_DIR) $(dir $@)
123+
mv $(OPENSSL_DIR) $(subst /,,$(dir $@))
124124

125125
.build_armeabi/Makefile: $(OPENSSL_SRC)
126126
rm -rf $(dir $@)
127127
tar xfz $(OPENSSL_SRC)
128-
mv $(OPENSSL_DIR) $(dir $@)
128+
mv $(OPENSSL_DIR) $(subst /,,$(dir $@))
129129

python3-alpha/patches/_sysconfigdata-linux-arm.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
--- python-src_arm/build/lib.linux-arm-3.6/_sysconfigdata_m_linux_arm-linux-androideabi.py 2017-01-20 04:10:36.871532034 +0900
2-
+++ host/lib/python3.6/_sysconfigdata_m_linux_arm-linux-androideabi.py 2017-01-20 04:13:45.625071251 +0900
1+
--- python-src_arm/build/lib.linux-arm-3.6/_sysconfigdata_m_linux_.py 2017-01-20 04:10:36.871532034 +0900
2+
+++ host/lib/python3.6/_sysconfigdata_m_linux_.py 2017-01-20 04:13:45.625071251 +0900
33
@@ -109,6 +109,7 @@
44
'ENSUREPIP': 'no',
55
'EXE': '',

python3-alpha/patches/_sysconfigdata-linux-i686.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
--- python-src_x86/build/lib.linux-i686-3.6/_sysconfigdata_m_linux_i686-linux-android.py 2017-01-20 07:46:04.726217475 +0900
2-
+++ host/lib/python3.6/_sysconfigdata_m_linux_i686-linux-android.py 2017-01-20 07:55:21.667754773 +0900
1+
--- python-src_x86/build/lib.linux-i686-3.6/_sysconfigdata_m_linux_.py 2017-01-20 07:46:04.726217475 +0900
2+
+++ host/lib/python3.6/_sysconfigdata_m_linux_.py 2017-01-20 07:55:21.667754773 +0900
33
@@ -109,6 +109,7 @@
44
'ENSUREPIP': 'no',
55
'EXE': '',

python3-alpha/patches/python-3.4.2-android-locale.patch

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -102,24 +102,6 @@ diff -ru Python-3.3.5/Python/fileutils.c Python-3.3.5-android/Python/fileutils.c
102102
extern wchar_t* _Py_DecodeUTF8_surrogateescape(const char *s, Py_ssize_t size);
103103
#endif
104104

105-
@@ -44,7 +44,7 @@
106-
Py_RETURN_NONE;
107-
}
108-
109-
-#if !defined(__APPLE__) && !defined(MS_WINDOWS)
110-
+#if !defined(__APPLE__) && !defined(__ANDROID__) && !defined(MS_WINDOWS)
111-
extern int _Py_normalize_encoding(const char *, char *, size_t);
112-
113-
/* Workaround FreeBSD and OpenIndiana locale encoding issue with the C locale.
114-
@@ -194,7 +194,7 @@
115-
}
116-
#endif /* !defined(__APPLE__) && !defined(MS_WINDOWS) */
117-
118-
-#if !defined(__APPLE__) && (!defined(MS_WINDOWS) || !defined(HAVE_MBRTOWC))
119-
+#if !defined(__APPLE__) && !defined(__ANDROID__) && (!defined(MS_WINDOWS) || !defined(HAVE_MBRTOWC))
120-
static wchar_t*
121-
decode_ascii_surrogateescape(const char *arg, size_t *size)
122-
{
123105
@@ -241,7 +241,7 @@
124106
wchar_t*
125107
_Py_char2wchar(const char* arg, size_t *size)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--- host-src/Modules/posixmodule.c 2017-07-08 12:33:27.000000000 +0900
2+
+++ python-src_arm/Modules/posixmodule.c 2017-08-31 16:04:39.609134000 +0900
3+
@@ -416,6 +416,11 @@
4+
}
5+
#endif
6+
7+
+/* Android doesn't expose AT_EACCESS - manually define it. */
8+
+#if !defined(AT_EACCESS) && defined(__ANDROID__)
9+
+#define AT_EACCESS 0x200
10+
+#endif
11+
+
12+
13+
#ifndef MS_WINDOWS
14+
PyObject *
15+
@@ -1937,7 +1942,7 @@
16+
PyStructSequence_SET_ITEM(v, 1,
17+
PyLong_FromUnsignedLongLong(st->st_ino));
18+
#else
19+
- Py_BUILD_ASSERT(sizeof(unsigned long) >= sizeof(st->st_ino));
20+
+ // Py_BUILD_ASSERT(sizeof(unsigned long) >= sizeof(st->st_ino));
21+
PyStructSequence_SET_ITEM(v, 1, PyLong_FromUnsignedLong(st->st_ino));
22+
#endif
23+
#ifdef MS_WINDOWS

0 commit comments

Comments
 (0)