(self, arch=None, with_flags_in_cc=True)
| 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 |
no test coverage detected