Robert Bradshaw wrote:
> On Apr 17, 2008, at 10:41 PM, Stefan Behnel wrote:
>> Hi,
>>
>> Robert Bradshaw wrote:
>>> I'd like to add this example to the automated testing infrastructure,
>>> but it seems unclear how to do so with the current runtests.py.
>> Hmm, sure it's a C++ example, so Cython/distutils will have to know  
>> that in
>> advance.
>>
>> I think that's the same problem as Py2/Py3 source code. It's  
>> actually a
>> different language that you want to target with your source (as a  
>> backend like
>> C/C++ or as a frontend like Py2/3), but there is no way to say so  
>> from within
>> your source file.
>>
>> But at least for the test suite, we could add a comment like "#c++"  
>> in the
>> first line, read the first few bytes of each test file and  
>> configure the
>> distutils Extension language option accordingly.
> 
> This is discussed a bit in
> 
> http://wiki.cython.org/enhancements/build
> 
> I think it would be nice to come up with a specification (like the  
> encoding one proposed for Python) to specify several things,  
> including c vs. c++, Python 2.x vs 3.0, libraries/extra c files  
> needed, etc. rather than having to put all this logic into setup.py.  
> For the Sage project, it seems that *every single person* who makes  
> their first .pyx file in the Sage library wonders why it doesn't get  
> compiled and loaded (because they didn't know they needed to add it  
> to our (massive) setup.py). Not that we should do away with setup.py,  
> but many of the options could be specified more locally.

Yes, I think that would be great since there are also some issues like 
that when using Cython from Sage's notebook interface. The wish to 
specific c99 for example has come up and moving all the build logic into 
pyx files would also make the coexistence of the new parallel build 
system in Sage by Gary with the old setup.py based code much easier.

> - Robert

Cheers,

Michael

> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
> 

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to