[SciPy-dev] requesting feedback on/editing of scikits wiki-page
Alexander Schmolck
a.schmolck@gmx....
Mon May 21 03:26:57 CDT 2007
David Cournapeau <david@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.
> 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 cannot make the proposed versioning scheme work, because
> pkg_resources.require('scikits') fails, even though I installed it (I
> can import it).
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?
> I guess I am doing something wrong in the scikits namespace, or for the
> installation, but I don't know what.
> * more generally, how to convert a distutils pkg to setuptools.
Changing from ``distutils import`` to from ``setuptools import`` should
be enough for a minimal conversion, I think.
If that works OK for you I suggest we add a subheading 'minimal conversion
from a distutils-based install', including the required
(``namespace_packages=['scikits']``) and recommended (``zip_safe=True|False,
url='...', download_url='...',test_suite``) additional setuptools flags
(unfortunatelly no one has yet expounded on where the 'homepages' of
individual scikits are meant to go).
cheers,
'as
More information about the Scipy-dev
mailing list