78 lines
2.3 KiB
Plaintext
78 lines
2.3 KiB
Plaintext
|
PEP: 229
|
|||
|
Title: Using Distutils to Build Python
|
|||
|
Version: $Revision$
|
|||
|
Author: akuchlin@mems-exchange.org (A.M. Kuchling)
|
|||
|
Status: Draft
|
|||
|
Type: Standards
|
|||
|
Created: 16-Nov-2000
|
|||
|
Post-History:
|
|||
|
|
|||
|
|
|||
|
Introduction
|
|||
|
|
|||
|
The Modules/Setup mechanism has some flaws:
|
|||
|
|
|||
|
* People have to remember to uncomment bits of Modules/Setup in
|
|||
|
order to get all the possible modules.
|
|||
|
|
|||
|
* Moving Setup to a new version of Python is tedious; new modules
|
|||
|
have been added, so you can't just copy the older version, but
|
|||
|
have to reconcile the two versions.
|
|||
|
|
|||
|
* Users have to figure out where the needed libraries, such as
|
|||
|
zlib, are installed.
|
|||
|
|
|||
|
|
|||
|
Proposal
|
|||
|
|
|||
|
Use the Distutils to build the modules that come with Python.
|
|||
|
|
|||
|
The changes can be broken up into several pieces:
|
|||
|
|
|||
|
1. The Distutils needs some Python modules to be able to build
|
|||
|
modules. Currently I believe the minimal list is posix, _sre,
|
|||
|
and string.
|
|||
|
|
|||
|
These modules will have to be built before the Distutils can be
|
|||
|
used, so they'll simply be hardwired into Modules/Makefile and
|
|||
|
be automatically built.
|
|||
|
|
|||
|
2. A top-level setup.py script will be written that checks the
|
|||
|
libraries installed on the system and compiles as many modules
|
|||
|
as possible.
|
|||
|
|
|||
|
3. Modules/Setup will be kept and settings in it will override
|
|||
|
setup.py's usual behavior, so you can disable a module known
|
|||
|
to be buggy, or specify particular compilation or linker flags.
|
|||
|
However, in the common case where setup.py works correctly,
|
|||
|
everything in Setup will remain commented out. The other
|
|||
|
Setup.* become unnecessary, since nothing will be generating
|
|||
|
Setup automatically.
|
|||
|
|
|||
|
|
|||
|
Unresolved Issues
|
|||
|
|
|||
|
Do we need to make it possible to disable the 3 hard-wired modules
|
|||
|
without manually hacking the Makefiles? If yes, perhaps a
|
|||
|
configure switch is sufficient.
|
|||
|
|
|||
|
The Distutils always compile modules as shared libraries. How do
|
|||
|
we support compiling them statically into the resulting Python
|
|||
|
binary?
|
|||
|
|
|||
|
makesetup and the other contents of $(LIBPL)/config need to be
|
|||
|
preserved for compatibility with existing modules; for how many
|
|||
|
versions do we need to keep them around?
|
|||
|
|
|||
|
|
|||
|
Copyright
|
|||
|
|
|||
|
This document has been placed in the public domain.
|
|||
|
|
|||
|
|
|||
|
|
|||
|
Local Variables:
|
|||
|
mode: indented-text
|
|||
|
indent-tabs-mode: nil
|
|||
|
End:
|