File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed
pythonforandroid/recipes/pybind11 Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change 33
44
55class Pybind11Recipe (PythonRecipe ):
6+ """
7+ Recipe to build pybind11 for Android using cmake.
8+ """
69
7- version = '2.11.1'
8- url = 'https://github.com/pybind/pybind11/archive/refs/tags/v{version}.zip'
9- depends = ['setuptools' ]
10+ version = "2.11.1"
11+ url = "https://github.com/pybind/pybind11/archive/refs/tags/v{version}.zip"
12+
13+ # Make sure we depend on setuptools and cmake
14+ depends = ["setuptools" , "cmake" ]
15+ # Don’t let p4a try to run setup.py through targetpython
1016 call_hostpython_via_targetpython = False
17+ # Install into hostpython, because pybind11 is a header-only lib
1118 install_in_hostpython = True
1219
20+ def get_recipe_env (self , arch ):
21+ env = super ().get_recipe_env (arch )
22+ # Ensure cmake is found inside hostpython
23+ env ["PATH" ] = "/usr/bin:" + env .get ("PATH" , "" )
24+ return env
25+
1326 def get_include_dir (self , arch ):
14- return join (self .get_build_dir (arch .arch ), 'include' )
27+ """
28+ Return the directory where pybind11 headers will be located.
29+ """
30+ return join (self .get_build_dir (arch .arch ), "include" )
1531
1632
1733recipe = Pybind11Recipe ()
You can’t perform that action at this time.
0 commit comments