Skip to content

Commit d1eeab0

Browse files
author
Mark W. Alexander
committed
add -I python-install's include directory. This also provides a place to drop
header files for linking with shared libraries.
1 parent 1b88f09 commit d1eeab0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pythonforandroid/archs.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ def get_env(self, with_flags_in_cc=True):
4949
sysroot = self.ctx.ndk_platform
5050
env['CFLAGS'] += ' -I{}'.format(self.ctx.ndk_platform)
5151
env['CFLAGS'] += ' -isysroot {} '.format(sysroot)
52+
env['CFLAGS'] += '-I' + join(self.ctx.get_python_install_dir(),
53+
'include/python{}'.format(
54+
self.ctx.python_recipe.version[0:3])
55+
)
56+
5257
env['LDFLAGS'] += '--sysroot {} '.format(self.ctx.ndk_platform)
5358

5459
env["CXXFLAGS"] = env["CFLAGS"]

0 commit comments

Comments
 (0)