This PR updates setup.py in order to support Pandana compilation in MacOS 10.15 Catalina, as discussed in issue #129. The system's C++ headers were moved, so the script now detects which version of the operating system is present and uses the appropriate header path. This PR also improves support for custom compilers on Mac.
New usage
Installing Pandana from Conda Forge gives you pre-compiled binaries. Installing from Pip or from source code requires local compilation. (Pip binaries are a lot harder for us to provide than Conda Forge binaries, so we had to drop them.)
Here's how local compilation works on Mac:
All Macs will need Xcode command line tools in order to do the local compilation.
xcode-select --install
At this point, you can do one of the following:
Use the system's default compiler. This is the easiest if you're not using Anaconda, but will not support multi-threading in Pandana.
pip install cython numpy
pip install -e . # or 'pip install pandana' for a production release
Use the Conda toolchain. This is what we recommend.
Use a compiler of your choice, if you want multi-threading support but don't like Anaconda. Homebrew is a common alternative. As of this PR, we now detect whether you've set a CC environment variable, and if so we use whichever compiler you specify.
Coverage remained the same at 89.873% when pulling db3c3d132a2db52cef37cb5cb26d47f74234914a on macos-catalina into 620281c02aeb68d1914d4e90614cbd4457c19001 on vectorized-shortest-path-length.
Coverage remained the same at 89.873% when pulling db3c3d132a2db52cef37cb5cb26d47f74234914a on macos-catalina into 620281c02aeb68d1914d4e90614cbd4457c19001 on vectorized-shortest-path-length.
This PR updates
setup.py
in order to support Pandana compilation in MacOS 10.15 Catalina, as discussed in issue #129. The system's C++ headers were moved, so the script now detects which version of the operating system is present and uses the appropriate header path. This PR also improves support for custom compilers on Mac.New usage
Installing Pandana from Conda Forge gives you pre-compiled binaries. Installing from Pip or from source code requires local compilation. (Pip binaries are a lot harder for us to provide than Conda Forge binaries, so we had to drop them.)
Here's how local compilation works on Mac:
All Macs will need Xcode command line tools in order to do the local compilation.
At this point, you can do one of the following:
CC
environment variable, and if so we use whichever compiler you specify.Testing
CC
set manually