@@ -191,21 +191,13 @@ def install_pypy(tmp: Path, url: str) -> Path:
191
191
return installation_path / "bin" / "pypy3"
192
192
193
193
194
- def can_use_uv (python_configuration : PythonConfiguration ) -> bool :
195
- conditions = (Version (python_configuration .version ) >= Version ("3.8" ),)
196
- return all (conditions )
197
-
198
-
199
194
def setup_python (
200
195
tmp : Path ,
201
196
python_configuration : PythonConfiguration ,
202
197
dependency_constraint_flags : Sequence [PathOrStr ],
203
198
environment : ParsedEnvironment ,
204
199
build_frontend : BuildFrontendName ,
205
200
) -> tuple [Path , dict [str , str ]]:
206
- if build_frontend == "build[uv]" and not can_use_uv (python_configuration ):
207
- build_frontend = "build"
208
-
209
201
uv_path = find_uv ()
210
202
use_uv = build_frontend == "build[uv]"
211
203
@@ -315,20 +307,19 @@ def setup_python(
315
307
)
316
308
env ["MACOSX_DEPLOYMENT_TARGET" ] = default_target
317
309
318
- if python_configuration .version not in {"3.6" , "3.7" }:
319
- if config_is_arm64 :
320
- # macOS 11 is the first OS with arm64 support, so the wheels
321
- # have that as a minimum.
322
- env .setdefault ("_PYTHON_HOST_PLATFORM" , "macosx-11.0-arm64" )
323
- env .setdefault ("ARCHFLAGS" , "-arch arm64" )
324
- elif config_is_universal2 :
325
- env .setdefault ("_PYTHON_HOST_PLATFORM" , "macosx-10.9-universal2" )
326
- env .setdefault ("ARCHFLAGS" , "-arch arm64 -arch x86_64" )
327
- elif python_configuration .identifier .endswith ("x86_64" ):
328
- # even on the macos11.0 Python installer, on the x86_64 side it's
329
- # compatible back to 10.9.
330
- env .setdefault ("_PYTHON_HOST_PLATFORM" , "macosx-10.9-x86_64" )
331
- env .setdefault ("ARCHFLAGS" , "-arch x86_64" )
310
+ if config_is_arm64 :
311
+ # macOS 11 is the first OS with arm64 support, so the wheels
312
+ # have that as a minimum.
313
+ env .setdefault ("_PYTHON_HOST_PLATFORM" , "macosx-11.0-arm64" )
314
+ env .setdefault ("ARCHFLAGS" , "-arch arm64" )
315
+ elif config_is_universal2 :
316
+ env .setdefault ("_PYTHON_HOST_PLATFORM" , "macosx-10.9-universal2" )
317
+ env .setdefault ("ARCHFLAGS" , "-arch arm64 -arch x86_64" )
318
+ elif python_configuration .identifier .endswith ("x86_64" ):
319
+ # even on the macos11.0 Python installer, on the x86_64 side it's
320
+ # compatible back to 10.9.
321
+ env .setdefault ("_PYTHON_HOST_PLATFORM" , "macosx-10.9-x86_64" )
322
+ env .setdefault ("ARCHFLAGS" , "-arch x86_64" )
332
323
333
324
building_arm64 = config_is_arm64 or config_is_universal2
334
325
if building_arm64 and get_macos_version () < (10 , 16 ) and "SDKROOT" not in env :
@@ -416,7 +407,7 @@ def build(options: Options, tmp_path: Path) -> None:
416
407
for config in python_configurations :
417
408
build_options = options .build_options (config .identifier )
418
409
build_frontend = build_options .build_frontend or BuildFrontendConfig ("pip" )
419
- use_uv = build_frontend .name == "build[uv]" and can_use_uv ( config )
410
+ use_uv = build_frontend .name == "build[uv]"
420
411
uv_path = find_uv ()
421
412
if use_uv and uv_path is None :
422
413
msg = "uv not found"
0 commit comments