-
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
Always use cythonized files in sdist. #1264
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we ensure that the Cythonized files are included in the sdist?
License header failures though. |
If it didn't, the sdist would not be installable (as it would automatically replace Unfortunately this is having issues with py27 and the compilation step. |
Ah yes, you're right about It's not Python 2; it's Python 2 with old Cython and Python 3 with old-ish Cython (which seems to be triggering the error in #1253.) |
But why with this change, and not before... must be something odd with the way we setup the environment in travis. |
Interesting, a successful log has the following:
No further useful diagnostics, but I wonder if a newer version of cython is being installed even though Cython is already installed. |
That's also there in the failing build, though. A diff on the |
But I removed Cython from pyproject.toml's |
Ah right. The CRON job also started failing yesterday and I thought it was the same error, but it was actually the NumPy ufunc thing. |
.travis.yml
Outdated
- PYTHON_VERSION=3.5 | ||
PACKAGES="cython=0.23.1 numpy=1.10.0 matplotlib=1.5.1 nose proj4=4.9.1 scipy=0.16.0 libgfortran=1" | ||
PACKAGES="cython=0.* numpy=1.10.0 matplotlib=1.5.1 nose proj4=4.9.1 scipy=0.16.0 libgfortran=1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Future-proofing for Cython 3.
I think we need to pass |
Confirmed. An example log of pip installing build dependencies, even if they are installed (with decent stdout to see what is going on): https://circleci.com/gh/SciTools/cartopy/1277?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link Is there an issue somewhere in pip? scipy/scipy#8734 looks somewhat related. IMO It is quite unexpected that pip should re-install the build dependencies, even if they are already installed. |
…installs packages that are already installed. For example, if numpy is in [build-system]->requires, and numpy is *already installed* in the environment that is running pip, the *existing* version of numpy should be used to build cartopy, **not** the latest version found on pypi.
I just added a commit with the following description:
This should serve as a reference should we get future PRs adding a pyproject.toml - the situation must change with pip before cartopy will accept a pyproject.toml again. I fully recognise that this means that users who |
This should work to support 0.28 (as it seems there's no 0.29 for Python 3.5): diff --git a/lib/cartopy/trace.pyx b/lib/cartopy/trace.pyx
index c1d8d5a..065946a 100644
--- a/lib/cartopy/trace.pyx
+++ b/lib/cartopy/trace.pyx
@@ -170,7 +170,7 @@ cdef class LineAccumulator:
&geoms[0], geoms.size())
return geom
- cdef list[Line].size_type size(self):
+ cdef size_t size(self):
return self.lines.size() |
4fc71fa
to
51981c0
Compare
51981c0
to
02aed69
Compare
AppVeyor is queued, yet passed on the new SciTools one at https://ci.appveyor.com/project/SciTools/cartopy/builds/21631645/job/w1m0vd7bd74eo1ry. |
@QuLogic - would you mind merging when happy with the changes? I don't think the AppVeyor results are going to come back (I've started fixing #1221 and am afraid I've caused this to happen accidentally). With this merged we unblock the CI, have Cython 0.28 compatibility, and avoid needing Cython for users to install the sdist from pypi. 👍 |
I would keep the pins on Travis and AppVeyor, as I specifically put them in there to ensure it continued to work (even if that ended up being broken...) |
Rationale
In #1258 @scoder suggested that we should consider making recompilation of pyx files optional. I can see some pros/cons to this approach, but it does mean that Cython is removed as an installation dependency, and would close #1258. The approach I've taken mimics numpy's - it only recompiles the Cythonized c++/c if we are not in a sdist (i.e. there is no PKG-INFO).
Implications
setup.py
(no for github source, yes for sdist).