Merge pull request #2684 from wiredfool/termux

Basic support for Termux (android)
This commit is contained in:
wiredfool 2017-08-17 11:54:04 +01:00 committed by GitHub
commit d078eaf724
2 changed files with 13 additions and 0 deletions

5
depends/termux.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
pkg -y install python python-dev ndk-sysroot clang make \
libjpeg-turbo-dev

View File

@ -365,6 +365,14 @@ class pil_build_ext(build_ext):
# work ;-) # work ;-)
self.add_multiarch_paths() self.add_multiarch_paths()
# termux support for android.
# system libraries (zlib) are installed in /system/lib
# headers are at $PREFIX/include
# user libs are at $PREFIX/lib
if os.environ.get('ANDROID_ROOT', None):
_add_directory(library_dirs,
os.path.join(os.environ['ANDROID_ROOT'],'lib'))
elif sys.platform.startswith("gnu"): elif sys.platform.startswith("gnu"):
self.add_multiarch_paths() self.add_multiarch_paths()