Skip to content

Commit 23ed906

Browse files
committed
Removed default limit of 4
1 parent ecd264f commit 23ed906

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

docs/installation/building-from-source.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,10 +276,9 @@ Build options
276276

277277
* Config setting: ``-C parallel=n``. Can also be given
278278
with environment variable: ``MAX_CONCURRENCY=n``. Pillow can use
279-
multiprocessing to build the extension. Setting ``-C parallel=n``
279+
multiprocessing to build the extensions. Setting ``-C parallel=n``
280280
sets the number of CPUs to use to ``n``, or can disable parallel building by
281-
using a setting of 1. By default, it uses 4 CPUs, or if 4 are not
282-
available, as many as are present.
281+
using a setting of 1. By default, it uses as many CPUs as are present.
283282

284283
* Config settings: ``-C zlib=disable``, ``-C jpeg=disable``,
285284
``-C tiff=disable``, ``-C freetype=disable``, ``-C raqm=disable``,

setup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
_, key, value = sys.argv.pop().split("=", 2)
2929
configuration.setdefault(key, []).append(value)
3030

31-
default = int(configuration.get("parallel", ["4"])[-1])
31+
default = int(configuration.get("parallel", ["0"])[-1])
3232
ParallelCompile("MAX_CONCURRENCY", default).install()
3333

3434

@@ -394,9 +394,7 @@ def finalize_options(self) -> None:
394394
cpu_count = os.cpu_count()
395395
if cpu_count is not None:
396396
try:
397-
self.parallel = int(
398-
os.environ.get("MAX_CONCURRENCY", min(4, cpu_count))
399-
)
397+
self.parallel = int(os.environ.get("MAX_CONCURRENCY", cpu_count))
400398
except TypeError:
401399
pass
402400
for x in self.feature:

0 commit comments

Comments
 (0)