diff options
| author | Andre Caron <andre.caron@ubisoft.com> | 2017-05-18 13:06:42 -0400 |
|---|---|---|
| committer | Andre Caron <andre.caron@ubisoft.com> | 2017-06-27 12:21:39 -0400 |
| commit | 8cecf0c422f77c7948463b8c5d9ac6482d00d704 (patch) | |
| tree | e3f49aa7e81663c918e2a72c4b942680de022288 | |
| parent | cf1a1c00386ce42ff9c1d21744c1fab97853bc2c (diff) | |
| download | tox-git-8cecf0c422f77c7948463b8c5d9ac6482d00d704.tar.gz | |
Forward NUMBER_OF_PROCESSORS by default on Windows
This fixes `multiprocessing.cpu_count()` on Windows for Python versions prior
to 3.4.
| -rw-r--r-- | CHANGELOG | 2 | ||||
| -rw-r--r-- | tests/test_config.py | 1 | ||||
| -rwxr-xr-x | tox/config.py | 3 |
3 files changed, 6 insertions, 0 deletions
@@ -3,6 +3,8 @@ Not released yet - #474: Start using setuptools_scm for tag based versioning. - #506: With `-a`: do not show additional environments header if there are none +- #517: Forward NUMBER_OF_PROCESSORS by default on Windows to fix + `multiprocessor.cpu_count()`. 2.7.0 ----- diff --git a/tests/test_config.py b/tests/test_config.py index 4eac45e6..b9ae2e38 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -864,6 +864,7 @@ class TestConfigTestEnv: assert "COMSPEC" in envconfig.passenv assert "TEMP" in envconfig.passenv assert "TMP" in envconfig.passenv + assert "NUMBER_OF_PROCESSORS" in envconfig.passenv else: assert "TMPDIR" in envconfig.passenv assert "PATH" in envconfig.passenv diff --git a/tox/config.py b/tox/config.py index 406cc5de..fc1a3c3a 100755 --- a/tox/config.py +++ b/tox/config.py @@ -489,6 +489,9 @@ def tox_addoption(parser): passenv.add("COMSPEC") # needed for distutils cygwincompiler passenv.add("TEMP") passenv.add("TMP") + # for `multiprocessing.cpu_count()` on Windows + # (prior to Python 3.4). + passenv.add("NUMBER_OF_PROCESSORS") else: passenv.add("TMPDIR") for spec in value: |
