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)
| 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() |
no test coverage detected