[SciPy-dev] setup.py vs. setup_foo.py

Pearu Peterson pearu at cens.ioc.ee
Fri Mar 21 23:06:32 CST 2003


On Fri, 21 Mar 2003, David Ascher wrote:

> I think I've missed a conversation re: the CVS reorg.  I find it weird 
> that there are setup_foo.py files in what (IMO) should be standalone 
> modules/packages such as kiva, traits, chaco, freetype.

setup_foo.py file must exist for a package foo that is supposed to
be installed by some parent setup file such as scipy setup.py,
for instance. 

Existence of setup_foo.py does not mean that the corresponding package foo
cannot be installed as _standalone_. There are number of packages in
scipy that can be installed standalone: scipy_distutils,
scipy_base, linalg, fftpack, special, weave, etc., including also packages
such as kiva, traits, chaco, freetype. 
On the other hand, some of them are installed _separately_
(scipy_distutils, scipy_base, kiva, traits, chaco, freetype, etc) and some
of them under the scipy (linalg, fftpack, special, etc).

> Furthermore, some modules have both (e.g. freetype, last time I checked).

Yes, this is an inconsistency that should be fixed. I'd drop setup.py
files since its functionality can be easily included into
setup_foo.py (just by three lines that call setup(..)).

(In principle, we could drop also setup_foo.py in favor of setup.py
but then parent setup.py files must implement some nasty (a 
bit nastier than in the current set up) import hacks to get all
configuration dictionaries of subpackages from their setup.py files.)

> Finally, is the scipy_distutils stuff which all of them require 
> available in a separate module/package, and if not, anyone have any 
> objection to making that separation. 

Sorry, I cannot follow what you are trying to say here.

> I'm packaging something based on chaco, which has more or less natural
> dependencies on traits, kiva and chaco (and freetype, although I'm not
> 100% sure I understand the latter yet).  It's frustrating to have to
> tell people to install "scipy" just to get traits/freetype/kiva/chaco
> to build.

People can `cvs checkout chaco_all` to get only those packages that
chaco requires. There is no need to install the whole scipy in order to
use chaco only.
Currently the same applies for the following packages (this list will grow
in future): 
  freetype, weave, linalg, fftpack, special, cow. 
That is, scipy CVS server defines additional modules freetype_all,
weave_all, linalg_all, etc. similar to chaco_all.

In addition, people can `cvs checkout scipy_core` to get scipy_base,
scipy_test, scipy_distutils in one package with a setup.py file that
installs the mentioned three packages in one call.

Pearu




More information about the Scipy-dev mailing list