|
27 | 27 | RECOMMENDED_NDK_API, RECOMMENDED_TARGET_API) |
28 | 28 |
|
29 | 29 |
|
30 | | -def get_cython_path(): |
31 | | - for cython_fn in ("cython", "cython3", "cython2", "cython-2.7"): |
32 | | - cython = sh.which(cython_fn) |
33 | | - if cython: |
34 | | - return cython |
35 | | - raise BuildInterruptingException('No cython binary found.') |
36 | | - |
37 | | - |
38 | 30 | def get_ndk_platform_dir(ndk_dir, ndk_api, arch): |
39 | 31 | ndk_platform_dir_exists = True |
40 | 32 | platform_dir = arch.platform_dir |
@@ -111,7 +103,6 @@ class Context(object): |
111 | 103 | use_setup_py = False |
112 | 104 |
|
113 | 105 | ccache = None # whether to use ccache |
114 | | - cython = None # the cython interpreter name |
115 | 106 |
|
116 | 107 | ndk_platform = None # the ndk platform directory |
117 | 108 |
|
@@ -374,7 +365,14 @@ def prepare_build_environment(self, |
374 | 365 | if not self.ccache: |
375 | 366 | info('ccache is missing, the build will not be optimized in the ' |
376 | 367 | 'future.') |
377 | | - self.cython = get_cython_path() |
| 368 | + try: |
| 369 | + subprocess.check_output([ |
| 370 | + "python3", "-m", "cython", "--help", |
| 371 | + ]) |
| 372 | + except subprocess.CalledProcessError: |
| 373 | + warning('Cython for python3 missing. If you are building for ' |
| 374 | + ' a python 3 target (which is the default)' |
| 375 | + ' then THINGS WILL BREAK.') |
378 | 376 |
|
379 | 377 | # This would need to be changed if supporting multiarch APKs |
380 | 378 | arch = self.archs[0] |
|
0 commit comments