Fixes #74. This allows pandana to be installed on a system that does not already have numpy installed.
Because of calls to import numpy as np and np.get_include() the setup.py for this package has a hard dependency on numpy already being installed even though it lists it as a dependency as part of install_requires for the package. This change makes it so that numpy gets installed prior to it being imported.
Here's what happens on a Debian system with Python 3.5.2 when you try to install the package prior to this patch:
root@303f74e508c8:/code# pip install .
Processing /code
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-0tyxs_px-build/setup.py", line 11, in <module>
import numpy as np
ImportError: No module named 'numpy'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-0tyxs_px-build/
Coverage remained the same at 88.372% when pulling 57a47b547e483920f640801468782f0b66a04e43 on jalessio:handle-setup-dependencies into 3191ad367a769816231b2f16ccbaf862f7218481 on UDST:master.
Fixes #74. This allows
pandana
to be installed on a system that does not already havenumpy
installed.Because of calls to
import numpy as np
andnp.get_include()
thesetup.py
for this package has a hard dependency onnumpy
already being installed even though it lists it as a dependency as part ofinstall_requires
for the package. This change makes it so thatnumpy
gets installed prior to it being imported.Here's what happens on a Debian system with Python 3.5.2 when you try to install the package prior to this patch:
Here's what happens after this patch:
All credit for this fix goes to the author of this StackOverflow answer: http://stackoverflow.com/a/42163080