@@ -180,7 +180,6 @@ def unpack_and_build(self):
180
180
wheel_dir ,
181
181
ensure_dir (f"{ PYPI_DIR } /dist/{ normalize_name_pypi (self .package )} " ))
182
182
183
-
184
183
def parse_args (self ):
185
184
ap = argparse .ArgumentParser (add_help = False )
186
185
ap .add_argument ("--help" , action = "help" , help = argparse .SUPPRESS )
@@ -408,7 +407,8 @@ def create_host_env(self):
408
407
self .extract_target ()
409
408
410
409
for package , version in self .get_requirements ("host" ):
411
- dist_dir = f"{ PYPI_DIR } /dist/{ normalize_name_pypi (package )} "
410
+ dist_subdir = normalize_name_pypi (package )
411
+ dist_dir = f"{ PYPI_DIR } /dist/{ dist_subdir } "
412
412
matches = []
413
413
if exists (dist_dir ):
414
414
for filename in os .listdir (dist_dir ):
@@ -420,8 +420,10 @@ def create_host_env(self):
420
420
if match and (int (match ["api_level" ]) <= self .api_level ):
421
421
matches .append (match )
422
422
if not matches :
423
- raise CommandError (f"Couldn't find compatible wheel for { package } "
424
- f"{ version } in { dist_dir } " )
423
+ raise CommandError (
424
+ f"Couldn't find compatible wheel for { package } { version } . Try "
425
+ f"downloading it from https://chaquo.com/pypi-13.1/{ dist_subdir } / "
426
+ f"into { dist_dir } ." )
425
427
matches .sort (key = lambda match : int (match .group ("build_num" )))
426
428
wheel_filename = join (dist_dir , matches [- 1 ].group (0 ))
427
429
run (f"unzip -d { self .host_env } -q { wheel_filename } " )
@@ -563,7 +565,7 @@ def get_python_env_vars(self, env, pypi_env):
563
565
# complex.h functions were introduced between API levels 23 and 26. Make Cython
564
566
# use its own implementations instead.
565
567
if self .api_level < 26 :
566
- env ["CFLAGS" ] += f " -DCYTHON_CCOMPLEX=0"
568
+ env ["CFLAGS" ] += " -DCYTHON_CCOMPLEX=0"
567
569
568
570
env ["LDFLAGS" ] += f" -lpython{ self .python } "
569
571
0 commit comments