Re: [Cython] Static checker for cython extension dependencies?

2016-06-10 Thread Elizabeth A. Fischer
It's not clear to me what you're doing, but it all sounds too complicated to me. I have Cython extensions that depend on C++ code, and I don't have to resort to these kinds of contortions. One model that works well is to build your C code as a shared library. Make each Cython module in a single f

Re: [Cython] Static checker for cython extension dependencies?

2016-06-10 Thread Robert Bradshaw
https://bitbucket.org/yt_analysis/yt/pull-requests/2225/use-cythonize-to-manage-pxd-dependencies/diff On Fri, Jun 10, 2016 at 3:45 PM, Robert Bradshaw wrote: > On Fri, Jun 10, 2016 at 3:21 PM, Nathan Goldbaum > wrote: >> >> On Fri, Jun 10, 2016 at 5:04 PM, Robert Bradshaw wrote: >>> >>> On Fri

Re: [Cython] Static checker for cython extension dependencies?

2016-06-10 Thread Robert Bradshaw
On Fri, Jun 10, 2016 at 3:21 PM, Nathan Goldbaum wrote: > > On Fri, Jun 10, 2016 at 5:04 PM, Robert Bradshaw wrote: >> >> On Fri, Jun 10, 2016 at 1:18 PM, Nathan Goldbaum >> wrote: >> > Hmm, so I've looked into this a bit further, and it looks like the >> > metadata >> > isn't going to be useful

Re: [Cython] Static checker for cython extension dependencies?

2016-06-10 Thread Nathan Goldbaum
On Fri, Jun 10, 2016 at 5:04 PM, Robert Bradshaw wrote: > On Fri, Jun 10, 2016 at 1:18 PM, Nathan Goldbaum > wrote: > > Hmm, so I've looked into this a bit further, and it looks like the > metadata > > isn't going to be useful for us. Many of our extensions can't be > > autogenerated by cython b

Re: [Cython] Static checker for cython extension dependencies?

2016-06-10 Thread Robert Bradshaw
On Fri, Jun 10, 2016 at 1:18 PM, Nathan Goldbaum wrote: > Hmm, so I've looked into this a bit further, and it looks like the metadata > isn't going to be useful for us. Many of our extensions can't be > autogenerated by cython because they have non-trivial dependencies meaning? In my cursory glan

Re: [Cython] Static checker for cython extension dependencies?

2016-06-10 Thread Nathan Goldbaum
Hmm, so I've looked into this a bit further, and it looks like the metadata isn't going to be useful for us. Many of our extensions can't be autogenerated by cython because they have non-trivial dependencies or depend directly on C code. For these extensions, cythonize must be passed an instantiate

Re: [Cython] Static checker for cython extension dependencies?

2016-06-10 Thread Robert Bradshaw
We write metadata in the generated C files for just this reason. You can fall back to something like https://gist.github.com/robertwb/25ab9838cc2b9b21eed646834cf4a108 if cython is not available. On Fri, Jun 10, 2016 at 10:55 AM, Nathan Goldbaum wrote: > The reason we haven't done that is we woul

Re: [Cython] Static checker for cython extension dependencies?

2016-06-10 Thread Nathan Goldbaum
The reason we haven't done that is we would like our setup.py script to be runnable without cython being installed. I think cythonize is being invoked (or something similar to it) by setuptools, using a feature added in setuptools 18.0: https://setuptools.readthedocs.io/en/latest/history.html#id60

Re: [Cython] Static checker for cython extension dependencies?

2016-06-10 Thread Robert Bradshaw
You should be using cythonize rather than listing and maintaining the Extension definitions themselves. http://docs.cython.org/src/quickstart/build.html#building-a-cython-module-using-distutils https://github.com/cython/cython/wiki/enhancements-distutils_preprocessing On Fri, Jun 10, 2016 at 9:18

[Cython] Static checker for cython extension dependencies?

2016-06-10 Thread Nathan Goldbaum
Hi all, I'm working on a pretty large python/cython codebase (yt) that has many interdependent C extensions written in cython. I've found it to be pretty hit or miss to depend on contributors to manually update cython dependency information in our setup.py file. The dependency information seems t