Simplify parallel build configuration
setup.py command (now) natively supports parallel builds, which is well supported on all platforms, and configurable from the command line. This MR simplifies the
finesse build to use that, overloading the default to enable parallelism (rather than not, which is the upstream default), and removes the homebrewed process pool stuff.
This can be configured/disabled using the
CPU_COUNT environment variable (which is the variable that
conda build sets to define parallelism), e.g.
CPU_COUNT=0 python3 -m pip install .
CPU_COUNT=0 python3 setup.py build_ext
This has been tested on Linux and Windows with no reported issues.
Note: the disable value is
0 instead of
1 because both Cython and distutils test for 'truth' (i.e.
if parallel:) rather than 'multiple cores' (
if parallel > 1) - it seems that running
python setup.py build_ext -j1 or
cythonize(..., numthreads=1) will use a process pool with a single runner rather than just serial processing, which is a bit odd, but not my fault...