python-peps/pep-0206.txt

137 lines
5.6 KiB
Plaintext
Raw Normal View History

PEP: 206
Title: 2.0 Batteries Included
Version: $Revision$
Author: moshez@zadka.site.co.il (Moshe Zadka)
Python-Version: 2.0
Status: Draft
Introduction
This PEP describes the `batteries included' proposal for Python
2.0, the fat distribution containing commonly used third party
extension modules. This PEP tracks the status and ownership of
this proposal, slated for introduction in Python 2.0. It contains
a description of the proposal and outlines how to support it.
Batteries Included Philosophy
The Python source distribution always maintained the philosophy of
"batteries included" -- having a rich and versatile standard
library which is immediately available, without making the user
download separate packages. This gives the Python language a head
start in many projects. However, the Python standard library
often relies on important Open Source libraries which might be
unavailable on many computers, so that the user has to separately
download and compile those. Some examples are the zlib
compression library, and the gmp number manipulation library.
The original coinage of the term "batteries included" can be found
here:
http://www.uk.research.att.com/~fms/ipc7/tr-1998-9.html
The Proposed Solution
The proposed solution is to maintain an alternate form of distribution,
nicknamed the "sumo" interpreter. It will be structured as a core
interpreter + extra useful libraries. In addition, the build procedure
will be changed to build those libraries by default, and build the Python
modules which rely on them linked against those libraries. Individual
users will still be able to link the Python modules against already
installed libraries, or disable them completely.
Additionally, some Open Source third-party Python modules will
also be distributed in the "sumo" distribution. The
difference between those and external libraries is that the former
are distributed in order to make the Python distribution self
contained, and the latter are added so there will be new
functionality in out-of-the-box Python.
Python Advanced Library
Since it is decided that the additions to the interpreter will live
in a seperate directory, they can even be distributed seperately,
as an additional library. This is called the "Python Advanced Library",
or PAL. This will also solve the problem of an advanced library module
failing -- the core interpreter will still be built, tested and installed.
Since the compilation of the other modules be helped by Python scripts,
it is quite possible that it will even install as many modules as it
can.
Suggested Libraries and Modules
Here is the tentative list of libraries which are proposed to be
dealt with in this manner, and where they can be downloaded:
zlib -- http://www.info-zip.org/pub/infozip/zlib/zlib.tar.gz
expat -- ftp://ftp.jclark.com/pub/xml/expat.zip
Tcl -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tcl8.3.1.tar.gz
Tk -- http://dev.scriptics.com:80/download/tcl/tcl8_3/tk8.3.1.tar.gz
PIL -- http://www.pythonware.com/downloads/Imaging-1.1.tar.gz
libjpeg -- ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
ncurses -- ftp://dickey.his.com/ncurses/ncurses.tar.gz
TBD, the following:
NumPy -- http://download.sourceforge.net/numpy/Numerical-15.3.tgz
Pmw -- ftp://ftp.dscpl.com.au/pub/pmw/Pmw.0.8.4.tar.gz
BLT -- ftp://ftp.tcltk.com/aa004735/pub/blt/BLT2.4u.tar.gz
piddle -- http://download.sourceforge.net/piddle/piddle-1.0b7.tgz
Connection to Distutils
Since Python 2.0 comes with a new mechanism of distributing Python
modules, called ``distutils'', we should be able to use it. Specificially,
since distutils has the capability or building Python modules in an
automatic fashion, it is hoped that some of the work will consist in
creating a new directory with the source, and having the ``super-make''
run "./setup --install" in those directories. This should at least take
care of PIL, NumPy and Pmw. In addition, it is hoped that this mechanism
will be easy enough to add other Python modules as user requests direct
us.
Software covered by the GNU General Public License
While many Python modules rely on software distributed under the
GNU General Public License and the GNU Lesser General Public
License, no such sources are proposed here to be added to the
sumo interpreter. Currently, the Python interpreter is
distributed under a closed-source-friendly license, which means
that it is possible to include it in a closed source product.
Making redistributers worry about which parts they need to remove
to make closed-source redistribution legal might cost more then
the benefits.
How It Is Implemented
Sumo-Python is basically be a set of scripts, which download
a Python source tarball, and source tarballs for all the modules.
Then it unpacks everything, modifies Setup.in (or whatever mechanism
will be in place by Python 2.1, and puts in a little
shell script which builds everything. Then it will repack it
into the huge tarball which will be a sumo-python-version.tar.gz,
which users can then download and install.
Inside the tarball, running the script
build-everything [--prefix ...]
Will compile and install a sumo interpreter into specified prefix.
Open Issues
ESR also mentioned libpng, but I don't know of a Python module
that uses it.
2001-01-23 06:33:04 -05:00
How to make PAL as easy to build as the whole Sumo Python?
Local Variables:
mode: indented-text
indent-tabs-mode: nil
End: