MCPcopy Index your code
hub / github.com/kivy/python-for-android / get_recipe_env

Method get_recipe_env

pythonforandroid/recipe.py:974–995  ·  view source on GitHub ↗
(self, arch=None, with_flags_in_cc=True)

Source from the content-addressed store, hash-verified

972 self.patch_shebang(_file, original_bin)
973
974 def get_recipe_env(self, arch=None, with_flags_in_cc=True):
975 if self._host_recipe is None:
976 self._host_recipe = Recipe.get_recipe("hostpython3", self.ctx)
977
978 env = super().get_recipe_env(arch, with_flags_in_cc)
979 # Set the LANG, this isn't usually important but is a better default
980 # as it occasionally matters how Python e.g. reads files
981 env['LANG'] = "en_GB.UTF-8"
982 env["PATH"] = self._host_recipe.local_bin + ":" + self._host_recipe.site_bin + ":" + env["PATH"]
983 host_env = self.get_hostrecipe_env(arch)
984 env['PYTHONPATH'] = host_env["PYTHONPATH"]
985
986 if not self.call_hostpython_via_targetpython:
987 env['CFLAGS'] += ' -I{}'.format(
988 self.ctx.python_recipe.include_root(arch.arch)
989 )
990 env['LDFLAGS'] += ' -L{} -lpython{}'.format(
991 self.ctx.python_recipe.link_root(arch.arch),
992 self.ctx.python_recipe.link_version,
993 )
994
995 return env
996
997 def should_build(self, arch):
998 name = self.folder_name

Callers 1

Calls 6

get_hostrecipe_envMethod · 0.95
get_recipeMethod · 0.80
formatMethod · 0.80
get_recipe_envMethod · 0.45
include_rootMethod · 0.45
link_rootMethod · 0.45

Tested by

no test coverage detected