@@ -28,16 +28,16 @@ def run_distribute(self):
2828 with current_directory (self .dist_dir ):
2929 info ('Copying python distribution' )
3030
31- if not exists ('private' ) and not self .ctx .ndk_is_crystax :
31+ if not exists ('private' ) and not self .ctx .python_recipe . from_crystax :
3232 shprint (sh .mkdir , 'private' )
33- if not exists ('crystax_python' ) and self .ctx .ndk_is_crystax :
33+ if not exists ('crystax_python' ) and self .ctx .python_recipe . from_crystax :
3434 shprint (sh .mkdir , 'crystax_python' )
3535 shprint (sh .mkdir , 'crystax_python/crystax_python' )
3636 if not exists ('assets' ):
3737 shprint (sh .mkdir , 'assets' )
3838
3939 hostpython = sh .Command (self .ctx .hostpython )
40- if not self .ctx .ndk_is_crystax :
40+ if not self .ctx .python_recipe . from_crystax :
4141 shprint (hostpython , '-OO' , '-m' , 'compileall' ,
4242 self .ctx .get_python_install_dir (),
4343 _tail = 10 , _filterout = "^Listing" , _critical = True )
@@ -48,7 +48,7 @@ def run_distribute(self):
4848 self .distribute_aars (arch )
4949 self .distribute_javaclasses (self .ctx .javaclass_dir )
5050
51- if not self .ctx .ndk_is_crystax :
51+ if not self .ctx .python_recipe . from_crystax :
5252 info ('Filling private directory' )
5353 if not exists (join ('private' , 'lib' )):
5454 info ('private/lib does not exist, making' )
@@ -85,9 +85,10 @@ def run_distribute(self):
8585 # shprint(sh.rm, '-rf', 'lib-dynload/_ctypes_test.so')
8686 # shprint(sh.rm, '-rf', 'lib-dynload/_testcapi.so')
8787
88- else : # NDK *is* crystax
88+ else : # Python *is* loaded from crystax
8989 ndk_dir = self .ctx .ndk_dir
90- python_dir = join (ndk_dir , 'sources' , 'python' , '3.5' ,
90+ py_recipe = self .ctx .python_recipe
91+ python_dir = join (ndk_dir , 'sources' , 'python' , py_recipe .version ,
9192 'libs' , arch .arch )
9293
9394 shprint (sh .cp , '-r' , join (python_dir , 'stdlib.zip' ), 'crystax_python/crystax_python' )
0 commit comments