UDST / pandana

Pandas Network Analysis by UrbanSim: fast accessibility metrics and shortest paths, using contraction hierarchies :world_map:
http://udst.github.io/pandana
GNU Affero General Public License v3.0
386 stars 84 forks source link

More OS X compilation improvements #118

Closed smmaurer closed 5 years ago

smmaurer commented 5 years ago

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.

  1. Confirm that you have OS X command line tools installed: xcode-select --install

  2. Install the optional "macOS_SDK_headers" package:

open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

  1. 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.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 91.667% when pulling 191835ce3a16b0a070401d5ced83044c2e237242 on installation-improvements into 0e7af0769e64df07fa8eb65d48ad827f1ec6efaa on develop.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 91.667% when pulling 191835ce3a16b0a070401d5ced83044c2e237242 on installation-improvements into 0e7af0769e64df07fa8eb65d48ad827f1ec6efaa on develop.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 91.667% when pulling 191835ce3a16b0a070401d5ced83044c2e237242 on installation-improvements into 0e7af0769e64df07fa8eb65d48ad827f1ec6efaa on develop.