Skip to content
Myr

Merge pull request #4114 from cyberjacob/master

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Catch error if multiprocessing is not available or is unable to determine the number of CPUs

authored by Cory Benfield · committed by GitHub · parents d3a4d06, 98bbf8d · Browse files · 2 files+9 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+9 added−2 removed

  • other:+9 added−2 removed

2 files+9 added−2 removed

modified:HISTORY.rst+4 added
6 unmodified lines
7+++89**Bugfixes**1011- Resolve installation failure if multiprocessing is not available12- Resolve tests crash if multiprocessing is not able to determine the number of CPU cores1314152.17.3 (2017-05-29)16+++++++++++++++++++1718**Improvements**
1461 unmodified lines
modified:setup.py+5 added-2 removed
6 unmodified lines
7from codecs import open89from setuptools import setup10from setuptools.command.test import test as TestCommand11from multiprocessing import cpu_count1112here = os.path.abspath(os.path.dirname(__file__))1314class PyTest(TestCommand):15 user_options = [('pytest-args=', 'a', "Arguments to pass into py.test")]1617 def initialize_options(self):18 TestCommand.initialize_options(self)19 try:20 from multiprocessing import cpu_count20 self.pytest_args = ['-n', str(cpu_count()), '--boxed']21 self.pytest_args = ['-n', str(cpu_count()), '--boxed']22 except (ImportError, NotImplementedError):23 self.pytest_args = ['-n', '1', '--boxed']2425 def finalize_options(self):26 TestCommand.finalize_options(self)27 self.test_args = []
74 unmodified lines