(self, env, build_dir, filename)
| 1182 | '{}', ';', _env=env) |
| 1183 | |
| 1184 | def cythonize_file(self, env, build_dir, filename): |
| 1185 | short_filename = filename |
| 1186 | if filename.startswith(build_dir): |
| 1187 | short_filename = filename[len(build_dir) + 1:] |
| 1188 | info(u"Cythonize {}".format(short_filename)) |
| 1189 | cyenv = env.copy() |
| 1190 | if 'CYTHONPATH' in cyenv: |
| 1191 | cyenv['PYTHONPATH'] = cyenv['CYTHONPATH'] |
| 1192 | elif 'PYTHONPATH' in cyenv: |
| 1193 | del cyenv['PYTHONPATH'] |
| 1194 | if 'PYTHONNOUSERSITE' in cyenv: |
| 1195 | cyenv.pop('PYTHONNOUSERSITE') |
| 1196 | python_command = sh.Command("python{}".format( |
| 1197 | self.ctx.python_recipe.major_minor_version_string.split(".")[0] |
| 1198 | )) |
| 1199 | shprint(python_command, "-c" |
| 1200 | "import sys; from Cython.Compiler.Main import setuptools_main; sys.exit(setuptools_main());", |
| 1201 | filename, *self.cython_args, _env=cyenv) |
| 1202 | |
| 1203 | def cythonize_build(self, env, build_dir="."): |
| 1204 | if not self.cythonize: |
no test coverage detected