fix compilation on Termux

This commit is contained in:
Lucy Phipps 2021-10-24 12:38:13 +01:00
parent 127315275f
commit e3c8ef980b
No known key found for this signature in database
GPG Key ID: 8F688A3DB7869BFE

View File

@ -561,7 +561,11 @@ class pil_build_ext(build_ext):
# headers are at $PREFIX/include
# user libs are at $PREFIX/lib
_add_directory(
library_dirs, os.path.join(os.environ["ANDROID_ROOT"], "lib")
library_dirs,
os.path.join(
os.environ["ANDROID_ROOT"],
"lib" if struct.calcsize("l") == 4 else "lib64"
)
)
elif sys.platform.startswith("netbsd"):