This PR smooths out the OS X compilation procedure a bit more. Mainly this is for Conda Forge, but it should also be helpful for users compiling from source.
Here's how installation will work on OS X, once v0.4.2 is released:
Installing from Conda
Binaries on Conda Forge will automatically support multi-threading.
This is accomplished by including Conda Forge's clang and llvm-openmp packages as build and run requirements (see here).
Installing from Pip
Source bundles from Pip will not support multi-threading on OS X, unless the user follows the additional steps below.
This is because Pip installation will use the default OS X compiler tools, which don't support the OpenMP library that's used for multi-threading in Pandana.
Compiling locally with multi-threading support
This is simpler than before -- no more need to set environment variables.
Confirm that you have OS X command line tools installed:
xcode-select --install
Install the optional "macOS_SDK_headers" package:
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
Install the following Conda packages:
conda install llvm-openmp clang cython numpy
With that in place, any installation process involving local compilation will automatically give you the multi-threaded version: pip install pandana, python setup.py develop, etc.
This is accomplished by having the setup script check whether the default clang bas been replaced, and if so adding the multi-threading flags.
Coverage remained the same at 91.667% when pulling 191835ce3a16b0a070401d5ced83044c2e237242 on installation-improvements into 0e7af0769e64df07fa8eb65d48ad827f1ec6efaa on develop.
Coverage remained the same at 91.667% when pulling 191835ce3a16b0a070401d5ced83044c2e237242 on installation-improvements into 0e7af0769e64df07fa8eb65d48ad827f1ec6efaa on develop.
Coverage remained the same at 91.667% when pulling 191835ce3a16b0a070401d5ced83044c2e237242 on installation-improvements into 0e7af0769e64df07fa8eb65d48ad827f1ec6efaa on develop.
This PR smooths out the OS X compilation procedure a bit more. Mainly this is for Conda Forge, but it should also be helpful for users compiling from source.
Here's how installation will work on OS X, once v0.4.2 is released:
Installing from Conda
Binaries on Conda Forge will automatically support multi-threading.
This is accomplished by including Conda Forge's
clang
andllvm-openmp
packages as build and run requirements (see here).Installing from Pip
Source bundles from Pip will not support multi-threading on OS X, unless the user follows the additional steps below.
This is because Pip installation will use the default OS X compiler tools, which don't support the OpenMP library that's used for multi-threading in Pandana.
Compiling locally with multi-threading support
This is simpler than before -- no more need to set environment variables.
Confirm that you have OS X command line tools installed:
xcode-select --install
Install the optional "macOS_SDK_headers" package:
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
conda install llvm-openmp clang cython numpy
With that in place, any installation process involving local compilation will automatically give you the multi-threaded version:
pip install pandana
,python setup.py develop
, etc.This is accomplished by having the setup script check whether the default
clang
bas been replaced, and if so adding the multi-threading flags.