Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On Mac OS X 10.11.4, with both Python 2.7.11 and Python 3.5.1, and the requirements installed (Cython 0.23.5, NumPy 1.11.0, geos 3.5.0, proj 4.9.2):
We get:
Note the relevant
--include-dir
(-I
) flags above:-I/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/include
-I./lib/cartopy
-I-I/usr/local/Cellar/proj/4.9.2/include
-I/usr/local/Cellar/geos/3.5.0/include
-I/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/include/python2.7
We see that the directory
/usr/local/Cellar/proj/4.9.2/include
has-I
prepended twice.Also, upon further inspection,
proj_api.h
does in fact exist in that directory:Looking at line 260 of
setup.py
in the latest commit, we haveExecuting the command gives
And we find that we're able to install
cartopy
with no problems by supplying the following flags topip
:It definitely looks like
-I
is being prepended to all elements ofinclude_dirs
on line 372:and a look at the value of
geos_includes
(line 168) would confirm this:Perhaps this behaviour of
pkg-config
specific to Mac OS X?In any case, this PR would catch if the
-I
has been prepended and strip it first.