This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author a.badger
Recipients a.badger
Date 2008-11-19.23:52:15
SpamBayes Score 1.9516262e-09
Marked as misclassified No
Message-id <1227138737.98.0.796971482315.issue4359@psf.upfronthosting.co.za>
In-reply-to
Content
When using some distutils functions, distutils attempts to use buildtime
files like Makefile and pyconfig*.h as data sources.  For instance, this
snippet::

  from distutils.command.install import install
  from distutils.core import Distribution
  dist = Distribution({"name": "foopkg"})
  cmd = install(dist)
  cmd.ensure_finalized()

There's two reasons this should change.

1) Some Linux distributions separate the python runtime and buildtime
files and put the buildtime files in a -devel package.  Depending on
these buildtime files means that the -devel package can be needed for
running python scripts.  For instance, here's the traceback that occurs
when the previous commands are run without python-devel on Fedora Linux::

  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python2.5/distutils/cmd.py", line 117, in
ensure_finalized
      self.finalize_options()
    File "/usr/lib/python2.5/distutils/command/install.py", line 273, in
finalize_options
      (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
    File "/usr/lib/python2.5/distutils/sysconfig.py", line 493, in
get_config_vars
      func()
    File "/usr/lib/python2.5/distutils/sysconfig.py", line 352, in
_init_posix
      raise DistutilsPlatformError(my_msg)
  distutils.errors.DistutilsPlatformError: invalid Python installation:
unable to open /usr/lib/python2.5/config/Makefile (No such file or
directory)

2) keeping the information in a Makefile and *.h files and then having
regular expressions pull the information out is fragile and not what the
tools were meant for.  Using a defined data format is much better.

The variables necessary for building extensions should be placed in a
data file of some sort.  This can be built by the configure script at
the same time as it's substituting variables into the Makefile and
pyconfig files.

xml is good for interoperability and we have good modules in the std
library for that now.  .ini is less verbose and we have modules to deal
with that as well.
History
Date User Action Args
2008-11-19 23:52:18a.badgersetrecipients: + a.badger
2008-11-19 23:52:17a.badgersetmessageid: <1227138737.98.0.796971482315.issue4359@psf.upfronthosting.co.za>
2008-11-19 23:52:16a.badgerlinkissue4359 messages
2008-11-19 23:52:15a.badgercreate