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

Method install_python_package

pythonforandroid/recipe.py:1012–1029  ·  view source on GitHub ↗

Automate the installation of a Python package (or a cython package where the cython components are pre-built).

(self, arch, name=None, env=None, is_dir=True)

Source from the content-addressed store, hash-verified

1010 self.install_python_package(arch)
1011
1012 def install_python_package(self, arch, name=None, env=None, is_dir=True):
1013 '''Automate the installation of a Python package (or a cython
1014 package where the cython components are pre-built).'''
1015 # arch = self.filtered_archs[0] # old kivy-ios way
1016 if name is None:
1017 name = self.name
1018 if env is None:
1019 env = self.get_recipe_env(arch)
1020
1021 info('Installing {} into site-packages'.format(self.name))
1022
1023 hpenv = env.copy()
1024 with current_directory(self.get_build_dir(arch.arch)):
1025 shprint(self._host_recipe.pip, 'install', '.',
1026 '--compile', '--target',
1027 self.ctx.get_python_install_dir(arch.arch),
1028 _env=hpenv, *self.setup_extra_args
1029 )
1030
1031 def get_hostrecipe_env(self, arch=None):
1032 env = environ.copy()

Callers 3

build_archMethod · 0.95
build_archMethod · 0.45
build_archMethod · 0.45

Calls 6

get_recipe_envMethod · 0.95
current_directoryFunction · 0.90
shprintFunction · 0.90
formatMethod · 0.80
get_build_dirMethod · 0.45

Tested by

no test coverage detected