On Tue, Jun 14, 2016 at 5:54 PM, Tom Swirly <
t...@swirly.com> wrote:
> On Tue, Jun 14, 2016 at 10:51 AM, Erik Bray <
erik....@gmail.com> wrote:
>>
>> Coincidentally, I was discussing this issue just the other day on
>> sage-devel:
>>
https://groups.google.com/d/msg/sage-devel/LIbAfzFWpOU/scrRQRPJDQAJ
>>
>> This has been a pet peeve of mine for a while. The current Cython docs,
>> which demonstrate how to use cythonize() in setup.py, are fine for getting
>> off the ground with Cython projects. But it's poor advice when it comes to
>> packaging and distribution of Cython projects. So I think the docs should
>> be supplemented to explain some of what I explained in the post linked
>> above, and to demonstrate a recipe for distributing Cython projects.
>
>
> Yes, agree 100%. I asked a question here earlier about this, but got it so
> wrong I didn't get applicable answers.
>
> There should be some nice template you can just paste into your code and go.
>
> Indeed - there should be a "sample empty Cython project" that has all the
> parts you'd need for almost any Cython project - but had a single function
> that returned "hello, world" and a Python unit test for that function! - so
> you can copy all the parts of this and start working immediately with a test
> framework.
For what it's worth the astropy package-template works quite well for
this purpose:
https://github.com/astropy/package-template
There's absolutely nothing Astronomy-specific about it, and the only
part that's really astropy-specific is the use, by default, of the
Astropy test runner (which itself is nothing special--just a wrapper
around py.test--and one day should be made a separate package).
I'm not necessarily advocating its use for packages that have nothing
to do with astropy, and it still has some bugs in it too that I've
been agitating about for a while. There's been talk about splitting
off a version of it that's less tied to astropy, but at the moment
there aren't enough resources to support such a thing. But it has the
right general idea.