[Python-Dev] buildtime vs runtime in Distutils

Toshio Kuratomi a.badger at gmail.com
Mon Nov 16 20:15:04 CET 2009


On Sun, Nov 15, 2009 at 02:31:45PM +0100, Georg Brandl wrote:
> Antoine Pitrou schrieb:
> > Tarek Ziadé <ziade.tarek <at> gmail.com> writes:
> >> 
> >> This cannot work on all platforms, when our Makefile is not shipped
> >> with python but python-devel. (like Fedora)
> > 
> > This practice is stupid anyway, because it means you have to install
> > python-devel even to install pure Python packages with setuptools/distribute.
> > Just ask Fedora, Mandriva and friends to change their packaging practice
> > (Mandriva already has a bug open for that by the way).
> 
> +1.  They are the ones splitting what "make install" installs into several
> packages, so they are the ones who have to fix the resulting dependency
> problems.
> 
I agree with this, however, my point on the bug was more akin to this:

Tres Seaver wrote:
> Parsing the Makefile at runtime seems like an insane choice anyway to
> me:  +1 for your new module having constants generated at ./configure
> time.

Makefiles and C header files are not intended as general purpose data
formats.  Using them as such has a variety of disadvantages:

* If someone else wants to get at the data, they have to go through the API
  in distutils.  Any data that's not exposed by the API is unavailable.
* Since disturils doesn't implement a full parser for the make and C syntax
  it is possible to break distutils when making legitimate changes to those
  build files.

These are the reasons I opened the bug to get that information into a real
data file rather than parsing the Makefile and header files.

I'll also mention two further things:

The reason that python-devel was split off was to make it more useful for
livecds, olpc, embedded systems, and other places where disk space is at a
premimum.  Being able to combine an operating system that is used by people
beyond your immediate community is great for finding and fixing bugs before
your users run into them.  Being able to program in a high level language on
these platforms has benefits that I'm sure everyone here can appreciate.

I've brought the issue of Makefile and pyconfig.h being needed for distutils
to the attention of every new Fedora python maintainer since the package
split was made.  The current maintainer, David Malcolm, agrees that
distutils.sysconfig needs to be able to use this data and he has moved the
Makefile and header files into the main python package.  This doesn't change
the problems with using a Makefile and C header files as a data format for
python.

-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20091116/79dc1383/attachment.pgp>


More information about the Python-Dev mailing list