@@ -160,13 +160,21 @@ def build_frontend_env_nouv(request: pytest.FixtureRequest) -> dict[str, str]:
160
160
return {"CIBW_BUILD_FRONTEND" : frontend }
161
161
162
162
163
- @pytest .fixture
164
- def build_frontend_env (build_frontend_env_nouv : dict [str , str ]) -> dict [str , str ]:
165
- frontend = build_frontend_env_nouv ["CIBW_BUILD_FRONTEND" ]
166
- if frontend != "build" or get_platform () == "pyodide" or find_uv () is None :
167
- return build_frontend_env_nouv
163
+ @pytest .fixture (params = ["pip" , "build" , "build[uv]" ])
164
+ def build_frontend_env (request : pytest .FixtureRequest ) -> dict [str , str ]:
165
+ frontend = request .param
166
+ platform = get_platform ()
167
+ if platform in {"pyodide" , "ios" , "android" } and frontend == "pip" :
168
+ pytest .skip ("Can't use pip as build frontend for pyodide/ios/android platform" )
169
+ if platform == "pyodide" and frontend == "build[uv]" :
170
+ pytest .skip ("Can't use uv with pyodide yet" )
171
+ uv_path = find_uv ()
172
+ if uv_path is None and frontend == "build[uv]" :
173
+ pytest .skip ("Can't find uv, so skipping uv tests" )
174
+ if uv_path is not None and frontend == "build" and platform not in {"android" , "ios" }:
175
+ pytest .skip ("No need to check build when uv is present" )
168
176
169
- return {"CIBW_BUILD_FRONTEND" : "build[uv]" }
177
+ return {"CIBW_BUILD_FRONTEND" : frontend }
170
178
171
179
172
180
@pytest .fixture
0 commit comments