File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ class BuildOptions(pydantic.BaseModel):
242242
243243 ::
244244
245- build_ext_parallel: False
245+ build_ext_parallel: False # DEPRECATED: ignored, will be removed
246246 cpu_cores_per_job: 1
247247 memory_per_job_gb: 1.0
248248 """
@@ -252,8 +252,10 @@ class BuildOptions(pydantic.BaseModel):
252252 build_ext_parallel : bool = False
253253 """Configure `build_ext[parallel]` in `DIST_EXTRA_CONFIG`
254254
255- This enables parallel builds of setuptools extensions. Incompatible
256- with some packages, e.g. numba 0.60.0.
255+ .. deprecated:: 0.72.0
256+ This option is deprecated and will be removed in a future release.
257+ The parallel build feature for extensions is unsafe due to race conditions.
258+ This option is now ignored and will emit a warning if set to True.
257259 """
258260
259261 cpu_cores_per_job : int = Field (default = 1 , ge = 1 )
Original file line number Diff line number Diff line change 77import shutil
88import sys
99import tempfile
10- import textwrap
1110import typing
1211import zipfile
1312
@@ -302,23 +301,13 @@ def build_wheel(
302301 build_env = build_env ,
303302 )
304303
305- if (
306- pbi .build_ext_parallel
307- and "DIST_EXTRA_CONFIG" not in extra_environ
308- and "MAX_JOBS" in extra_environ
309- ):
310- # configure setuptools to use parallel builds
311- # https://setuptools.pypa.io/en/latest/deprecated/distutils/configfile.html
312- dist_extra_cfg = build_env .path / "dist-extra.cfg"
313- dist_extra_cfg .write_text (
314- textwrap .dedent (
315- f"""
316- [build_ext]
317- parallel = { extra_environ ["MAX_JOBS" ]}
318- """
319- )
304+ if pbi .build_ext_parallel :
305+ logger .warning (
306+ "%s: build_ext_parallel is deprecated and will be removed in a "
307+ "future release. The parallel build feature for extensions is unsafe and "
308+ "can cause build failures or miscompiled wheels. This option is now ignored." ,
309+ req .name ,
320310 )
321- extra_environ ["DIST_EXTRA_CONFIG" ] = str (dist_extra_cfg )
322311
323312 overrides .find_and_invoke (
324313 req .name ,
You can’t perform that action at this time.
0 commit comments