A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://python.github.io/peps/pep-0229/ below:

PEP 229 – Using Distutils to Build Python

PEP 229 – Using Distutils to Build Python
Author:
A.M. Kuchling <amk at amk.ca>
Status:
Final
Type:
Standards Track
Created:
16-Nov-2000
Python-Version:
2.1
Post-History:
Table of Contents Introduction

The Modules/Setup mechanism has some flaws:

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.

The patch was checked in for Python 2.1, and has been subsequently modified.

Implementation

Patch #102588 on SourceForge contains the proposed patch. Currently the patch tries to be conservative and to change as few files as possible, in order to simplify backing out the patch. For example, no attempt is made to rip out the existing build mechanisms. Such simplifications can wait for later in the beta cycle, when we’re certain the patch will be left in, or they can wait for Python 2.2.

The patch makes the following changes:

Unresolved Issues

Do we need to make it possible to disable the 3 hard-wired modules without manually hacking the Makefiles? [Answer: No.]

The Distutils always compile modules as shared libraries. How do we support compiling them statically into the resulting Python binary?

[Answer: building a Python binary with the Distutils should be feasible, though no one has implemented it yet. This should be done someday, but isn’t a pressing priority as messing around with the top-level Makefile.pre.in is good enough.]

Copyright

This document has been placed in the public domain.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4