-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ensure the setup.py directory is in sys.path because of PEP 517 #1273
Conversation
I signed the CLA. |
One thing to note is that even though, after the next [build-system]
requires = [
"setuptools >= 0.40.8",
"wheel",
"Cython >= 0.28",
"numpy >= 1.10",
]
build-backend="setuptools.build_meta" I recommend doing this in a separate PR, though. Your build is complicated enough that you should probably test the transition better than you need to test this. Note: I have not tested this, but I think that you can also add "versioneer" to your |
And I guess this isn't strictly necessary to build cartopy because |
I was looking into this recently and maybe the best course of action is to drop |
I think |
Thanks! I'll play with it in other projects I have more control and, once I feel comfortable with it, I'll send a PR here. (Unless someone beats me to it first.) |
I do like |
I've switched MetPy over to setuptools_scm (if for no other reason than it's alive and under the PyPA umbrella). So far, no complaints. The only gotcha is that it's actual main purpose in life is to include everything under source control in release tarballs; for MetPy this took some adjusting of things, but in the end I think the product was better. IIRC, the versioneer here is tweaked, so we'd have to look at either changing the versioning behavior or adjusting to something new. |
I looked at |
I've opened #1545 to switch to setuptools-scm. |
So I think we don't need this any more with the above PR merged. |
Rationale
Currently cartopy is failing to build on e.g. Travis with the following traceback:
The issue is that in the latest version of pip, they enabled PEP 517 and PEP 518 support, which means that the directory of setup.py is no longer included in
sys.path
. Since cartopy uses versioneer and we want that behavior, the fix is to explicitly add the path to thesetup.py
directory tosys.path
.This was suggested to me by @pganssle on IRC.
Implications
I think this is harmless for older setuptools and pip verisons, because
.
is already in sys.path.