@@ -1031,10 +1031,8 @@ def install_python_package(self, arch, name=None, env=None, is_dir=True):
10311031
10321032 def get_hostrecipe_env (self , arch = None ):
10331033 env = environ .copy ()
1034- _python_path = self ._host_recipe .get_path_to_python ()
1035- libdir = glob .glob (join (_python_path , "build" , "lib*" ))
1036- env ['PYTHONPATH' ] = self ._host_recipe .site_dir + ":" + join (
1037- _python_path , "Modules" ) + ":" + (libdir [0 ] if libdir else "" )
1034+ env ['PYTHONPATH' ] = ''
1035+ env ['HOME' ] = '/tmp'
10381036 return env
10391037
10401038 @property
@@ -1063,14 +1061,9 @@ def install_hostpython_prerequisites(self, packages=None, force_upgrade=True):
10631061 pip_options = [
10641062 "install" ,
10651063 * packages ,
1066- "--target" , self ._host_recipe .site_dir , "--python-version" ,
1067- self .ctx .python_recipe .version ,
1068- # Don't use sources, instead wheels
1069- "--only-binary=:all:" ,
10701064 ]
10711065 if force_upgrade :
10721066 pip_options .append ("--upgrade" )
1073- # Use system's pip
10741067 pip_env = self .get_hostrecipe_env ()
10751068 shprint (self ._host_recipe .pip , * pip_options , _env = pip_env )
10761069
@@ -1397,8 +1390,6 @@ def build_arch(self, arch):
13971390 # make build dir separately
13981391 sub_build_dir = join (build_dir , "p4a_android_build" )
13991392 ensure_dir (sub_build_dir )
1400- # copy hostpython to built python to ensure correct selection of libs and includes
1401- shprint (sh .cp , self .real_hostpython_location , self .ctx .python_recipe .python_exe )
14021393
14031394 build_args = [
14041395 "-m" ,
@@ -1411,7 +1402,7 @@ def build_arch(self, arch):
14111402 built_wheels = []
14121403 with current_directory (build_dir ):
14131404 shprint (
1414- sh .Command (self .ctx . python_recipe . python_exe ), * build_args , _env = env
1405+ sh .Command (self .real_hostpython_location ), * build_args , _env = env
14151406 )
14161407 built_wheels = [realpath (whl ) for whl in glob .glob ("dist/*.whl" )]
14171408 self .install_wheel (arch , built_wheels )
@@ -1523,8 +1514,6 @@ class RustCompiledComponentsRecipe(PyProjectRecipe):
15231514 "x86" : "i686-linux-android" ,
15241515 }
15251516
1526- call_hostpython_via_targetpython = False
1527-
15281517 def get_recipe_env (self , arch , ** kwargs ):
15291518 env = super ().get_recipe_env (arch , ** kwargs )
15301519
0 commit comments