File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 33from os .path import join , exists
44import sh
55
6+ BUILD_SUBDIR = 'native-build'
7+
68
79class Hostpython3Recipe (Recipe ):
810 version = '3.7.1'
@@ -20,11 +22,14 @@ def get_build_dir(self, arch=None):
2022 # Unlike other recipes, the hostpython build dir doesn't depend on the target arch
2123 return join (self .get_build_container_dir (), self .name )
2224
25+ def get_path_to_python (self ):
26+ return join (self .get_build_dir (), BUILD_SUBDIR )
27+
2328 def build_arch (self , arch ):
2429 recipe_build_dir = self .get_build_dir (arch .arch )
2530
2631 # Create a subdirectory to actually perform the build
27- build_dir = join (recipe_build_dir , 'native-build' )
32+ build_dir = join (recipe_build_dir , BUILD_SUBDIR )
2833 ensure_dir (build_dir )
2934
3035 if not exists (join (build_dir , 'python' )):
Original file line number Diff line number Diff line change @@ -83,6 +83,10 @@ def build_arch(self, arch):
8383 env ['READELF' ] = READELF
8484 env ['STRIP' ] = STRIP
8585
86+ env ['PATH' ] = '{hostpython_dir}:{old_path}' .format (
87+ hostpython_dir = self .get_recipe ('hostpython3' , self .ctx ).get_path_to_python (),
88+ old_path = env ['PATH' ])
89+
8690 ndk_flags = ('--sysroot={ndk_sysroot} -D__ANDROID_API__={android_api} '
8791 '-isystem {ndk_android_host}' ).format (
8892 ndk_sysroot = join (self .ctx .ndk_dir , 'sysroot' ),
You can’t perform that action at this time.
0 commit comments