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 3
3
from os .path import join , exists
4
4
import sh
5
5
6
+ BUILD_SUBDIR = 'native-build'
7
+
6
8
7
9
class Hostpython3Recipe (Recipe ):
8
10
version = '3.7.1'
@@ -20,11 +22,14 @@ def get_build_dir(self, arch=None):
20
22
# Unlike other recipes, the hostpython build dir doesn't depend on the target arch
21
23
return join (self .get_build_container_dir (), self .name )
22
24
25
+ def get_path_to_python (self ):
26
+ return join (self .get_build_dir (), BUILD_SUBDIR )
27
+
23
28
def build_arch (self , arch ):
24
29
recipe_build_dir = self .get_build_dir (arch .arch )
25
30
26
31
# 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 )
28
33
ensure_dir (build_dir )
29
34
30
35
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):
83
83
env ['READELF' ] = READELF
84
84
env ['STRIP' ] = STRIP
85
85
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
+
86
90
ndk_flags = ('--sysroot={ndk_sysroot} -D__ANDROID_API__={android_api} '
87
91
'-isystem {ndk_android_host}' ).format (
88
92
ndk_sysroot = join (self .ctx .ndk_dir , 'sysroot' ),
You can’t perform that action at this time.
0 commit comments