(self, arch)
| 1138 | self.install_python_package(arch) |
| 1139 | |
| 1140 | def build_cython_components(self, arch): |
| 1141 | info('Cythonizing anything necessary in {}'.format(self.name)) |
| 1142 | |
| 1143 | env = self.get_recipe_env(arch) |
| 1144 | |
| 1145 | with current_directory(self.get_build_dir(arch.arch)): |
| 1146 | hostpython = sh.Command(self.ctx.hostpython) |
| 1147 | shprint(hostpython, '-c', 'import sys; print(sys.path)', _env=env) |
| 1148 | debug('cwd is {}'.format(realpath(curdir))) |
| 1149 | info('Trying first build of {} to get cython files: this is ' |
| 1150 | 'expected to fail'.format(self.name)) |
| 1151 | |
| 1152 | manually_cythonise = False |
| 1153 | try: |
| 1154 | shprint(hostpython, 'setup.py', 'build_ext', '-v', _env=env, |
| 1155 | *self.setup_extra_args) |
| 1156 | except sh.ErrorReturnCode_1: |
| 1157 | print() |
| 1158 | info('{} first build failed (as expected)'.format(self.name)) |
| 1159 | manually_cythonise = True |
| 1160 | |
| 1161 | if manually_cythonise: |
| 1162 | self.cythonize_build(env=env) |
| 1163 | shprint(hostpython, 'setup.py', 'build_ext', '-v', _env=env, |
| 1164 | _tail=20, _critical=True, *self.setup_extra_args) |
| 1165 | else: |
| 1166 | info('First build appeared to complete correctly, skipping manual' |
| 1167 | 'cythonising.') |
| 1168 | |
| 1169 | if not self.ctx.with_debug_symbols: |
| 1170 | self.strip_object_files(arch, env) |
| 1171 | |
| 1172 | def strip_object_files(self, arch, env, build_dir=None): |
| 1173 | if build_dir is None: |
no test coverage detected