[SciPy-dev] mlabwrap scikit [Was: Re: scikits project]

Alexander Schmolck a.schmolck at gmx.net
Mon Apr 9 21:41:05 EDT 2007


Robert Kern <robert.kern at gmail.com> writes:

> >>>> If so it should also use numpy.distutils. Just make sure to import
> >>>> setuptools first.
> >>>>
> >>>>   import setuptools
> >>>>   from numpy.distutils.core import setup
> >>>>   ...
> >>> Is there a recipe/template for this somewhere? Googling "scipy setuptools"
> >>> comes up with
> >>>
> >>>  <http://projects.scipy.org/ipython/ipython/wiki/SetupTools>
> >>>
> >>> as the first hit, which seems to indicate that setuptools is still a bit alpha
> >>> and the docs can't be trusted if one wants something that actually works.
> >> Fernando's a curmudgeon, and that page is old. Ignore him.  :-)
> > 
> > OK, I'm going the``ez_setup.py`` way.
> 
> No, ez_setup.py is deprecated. That part of the setuptools docs is out of date.
> When the Cheeseshop comes back up read this page with up-to-date information
> about how to get going with setuptools:
> 
>   http://cheeseshop.python.org/pypi/setuptools

OK.

> > Surely there must be some way to write packages that depend on numpy but
> > can be installed automatically (and download numpy if required)?
> 
> Not really. The dependencies that you can specify are requirements for using the
> package after it is installed, not requirements for building the package. The
> structure of distutils setup.py files pretty much enforces this. setuptools
> doesn't really get to do anything until setup() is called, i.e. after you've
> used your dependencies.
> 
> You might be able to hack something together with
> pkg_resources.WorkingSet.resolve(), though.
> 
> http://peak.telecommunity.com/DevCenter/PkgResources#workingset-methods-and-attributes

Sometimes

> 
> > And why do I need to use
> > numpy.distutils in the first place?
> 
> <shrug> You don't strictly have to. numpy.get_include() is probably sufficient
> for you, but it has the same problem.
> 
> > Another thing: should ``scikits/__init__.py`` be really empty? From
> > 
> > <http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages>
> > 
> > it looks a bit to me like it should contain:
> > 
> >   __import__('pkg_resources').declare_namespace(__name__)
> > 
> > ?
> 
> Yes, apologies.

OK, I think the upshot of all this is that I'll figure out how to do a robust
and user-friendly setuptools-based package another time. I don't want to delay
the release of 1.0 any further so I'll release mlabwrap-1.0final on SF as a
distutils based install with the old (scikits-less) package structure. Since
post-1.0 mlabwrap will represent a break anyway (Numeric support will be
dropped, newer version of python and matlab might be required and the
interface might change in some not backwards-compatible ways), the need to
change the important statement is maybe not a bad thing.

> 
> > Finally, what is the preferred download url for scikits projects? Should I
> > continue to host the file-release on SF, or should they go somewhere else?
> 
> I recommend putting them on the Cheeseshop.

Thanks, will do.

> 
> > Same for the webpage.
> 
> scipy.org wiki if you can.

I could make http://www.scipy.org/MlabWrap the project webpage and move its
current (developer-only contents) into some subdir -- does that sound
reasonable?

> > So I think some kind of template for scikit authors would be useful and I'd
> > suggest that once I've got setup.py etc. ironed out I put some info for other
> > prospective scikit authors on a wikipage on scipy.org -- what would be a good
> > place?
> 
> http://projects.scipy.org/scipy/scikits

I tried to create a trac account ('aschmolck') there but it didn't work; a new
account seems to have been created (the name is taken) but I can't log into
it. Do I need some other type of account first in order to be able to create
the trac account? When I click on "create account" I get an authorization
dialog, but the just created login and password don't work (I verified by
going through the same process with login/passwd test_user).

thanks,

'as



More information about the SciPy-Dev mailing list