[SciPy-dev] requesting feedback on/editing of scikits wiki-page

David Cournapeau david at ar.media.kyoto-u.ac.jp
Mon May 21 05:05:31 EDT 2007


Alexander Schmolck wrote:
> David Cournapeau <david at ar.media.kyoto-u.ac.jp> writes:
>
>> I was thinking, why not providing a "fake" scikits package as an example ?
>
> There definitely should be some package that can serve as an example and the
> wiki-page should link to its svn-setuptools.py (one of the reasons I'd like to
> get mlabwrap into the official scikits svn soon). Fake packages share the same
> disadvantage over real code as comments and docs, though -- there's nothing to
> ensure they're up to date and accurate -- which is why I'd favor using a real
> package, unless there isn't anything that's both suitably simple and not
> completely trivial.
>
> I think it might even be best to eventually have 2 or 3 types of example
> packages:
>
>     1. A data-only package 
>     2. A python-only package
>     3. Something that builds a C-extension
>
> We should of course makes sure that the setup.py files of these packages do
> really implement 'best practices'; once these setup.py files look reasonable
> we could even see if people in distutils-sig might be willing to give them a
> quick glance.
>
Well, if we have one example with many options, I guess it should not be 
too difficult to make it up-to-date. For example, for the package I 
would like to submit to scikits, I have a makefile which builds the pdf 
doc using some python scripts, and try to run those scripts to make sure 
everything is updated.
>> I have mostly converted one project to scikits/setuptools, and the info 
>> I think may be useful are:
>>     * how to use numpy.distutils (in particular, system_info classes) ?
>
> Why do you want to use numpy.distutils? Doesn't setuptools provide the
> functionality you want (it might not, but I'd personally just avoid using
> numpy.distutils for everything for which it isn't strictly required)?
I am using the system_info scheme from distutils (to retrieve a shared 
library and its header). I could do without, but that would basically 
means reimplementing system_info, I guess.
>
> Hmm, why are your trying to require('scikits')? Scikits is just a namespace,
> so it doesn't really make sense to require it, I think (it doesn't make that
> much sense to import it *either*, but that's just how python's module system
> works).
>
> As I wrote on the wiki-page, you want to do:
>
>     from pkg_resources import require
>     __version__ = require('scikits.mlabwrap')[0].version 
>
> substituting your project name -- doesn't that work for you?
No, it does not. I assumed the problem was with scikits, because I do 
not have a .egg file for scikits when I install my package (whereas I 
have a pyaudiolab.egg). But I know nothing about eggs (I do not even 
know what they are used for).

The other problem I have is that python setup.py test does not work 
either. After some random investigation, it looks like setuptools do not 
call check_* functions, only test_*. Does that mean I have to use only 
check_* functions in my tests ?

David



More information about the SciPy-Dev mailing list