Skip to content

Commit d5acffd

Browse files
committed
Added final prebuild
1 parent 5f6e0b0 commit d5acffd

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

recipes/python2/__init__.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11

22
from toolchain import Recipe, shprint
3+
from os.path import exists, join
4+
from os import uname
35
import sh
46

57
class Python2Recipe(Recipe):
@@ -9,6 +11,31 @@ class Python2Recipe(Recipe):
911

1012
depends = ['hostpython2']
1113

14+
def prebuild_armeabi(self):
15+
build_dir = self.get_build_dir('armeabi')
16+
if exists(join(build_dir, '.patched')):
17+
print('Python2 already patched, skipping.')
18+
return
19+
self.apply_patch(join('patches', 'Python-{}-xcompile.patch'.format(self.version)))
20+
self.apply_patch(join('patches', 'disable-modules.patch'))
21+
self.apply_patch(join('patches', 'fix-locale.patch'))
22+
self.apply_patch(join('patches', 'fix-gethostbyaddr.patch'))
23+
self.apply_patch(join('patches', 'fix-setup-flags.patch'))
24+
self.apply_patch(join('patches', 'fix-filesystemdefaultencoding.patch'))
25+
self.apply_patch(join('patches', 'fix-termios.patch'))
26+
self.apply_patch(join('patches', 'custom-loader.patch'))
27+
self.apply_patch(join('patches', 'verbose-compilation.patch'))
28+
self.apply_patch(join('patches', 'fix-remove-corefoundation.patch'))
29+
self.apply_patch(join('patches', 'fix-dynamic-lookup.patch'))
30+
self.apply_patch(join('patches', 'fix-dlfcn.patch'))
31+
32+
if uname()[0] == 'Linux':
33+
self.apply_patch(join('patches', 'fix-configure-darwin.patch'))
34+
self.apply_patch(join('patches', 'fix-distutils-darwin.patch'))
35+
36+
shprint(sh.touch, join(build_dir, 'patched'))
37+
38+
1239
def build_arch(self, arch):
1340
# shprint(sh.xcodebuild,
1441
# "ONLY_ACTIVE_ARCH=NO",

0 commit comments

Comments
 (0)