[Distutils] Questions about distutils strategy
Paul F. Dubois
dubois1@llnl.gov
Thu, 2 Dec 1999 11:18:22 -0800
On Thu, 02 Dec 1999, Andrew M. Kuchling wrote:
>=20
> Is it really necessary for people to develop their code using
> Distutils, as opposed to developing in their preferred environment and
> then wrapping things up for distribution? If I was debugging a C
> module, I don't think I'd bother compiling it through the distutils;
> more likely I'd just write a Makefile.pre.in and Setup.in.
>=20
Absolutely. Using Distutils we have been able to automate the making of o=
ur
software. I have even just finished a little facility so that Pyfort can =
make a
Fortran extension (although I am going to need community help getting dat=
a for
the various Fortran compilers to flesh it out.)=20
The important point here is that people who are not NORMALLY developers c=
an BE
developers. Despite not having memorized the location of Makefile.pre.in,=
and
stie-packages, or even knowing that they exist, they can make and instal=
l
extensions.=20
For example, a user need only create a file like this:
pyf('rs.pyf', 'rs', '.')
name =3D 'eof_workbench'
directory =3D '.'
to make a Fortran extension using input file rs.pyf and loadling librs.a =
from
directory ., picking up .py files to go with it from . and installing it =
as
package eof_workbench. Assuming they call that file SETUP, they do
pyfort -s SETUP
python setup.py build_ext install
and they can immediately use the package eof_workbench.
Distutils doesn't have to be comprehensive. What Distutils does is lower =
the
bar for learning how to make extensions.