2000-07-13 23:53:53 -04:00
|
|
|
PEP: 206
|
|
|
|
Title: 2.0 Batteries Included
|
|
|
|
Version: $Revision$
|
2000-12-11 18:08:11 -05:00
|
|
|
Author: moshez@zadka.site.co.il (Moshe Zadka)
|
2000-07-13 23:53:53 -04:00
|
|
|
Python-Version: 2.0
|
2000-07-14 10:21:51 -04:00
|
|
|
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.
|
|
|
|
|
2000-07-14 11:21:52 -04:00
|
|
|
The original coinage of the term "batteries included" can be found
|
|
|
|
here:
|
|
|
|
|
|
|
|
http://www.uk.research.att.com/~fms/ipc7/tr-1998-9.html
|
2000-07-14 10:21:51 -04:00
|
|
|
|
|
|
|
|
|
|
|
The Proposed Solution
|
|
|
|
|
2000-08-10 23:54:16 -04:00
|
|
|
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
|
2000-07-14 10:21:51 -04:00
|
|
|
installed libraries, or disable them completely.
|
|
|
|
|
2000-07-14 11:21:52 -04:00
|
|
|
Additionally, some Open Source third-party Python modules will
|
2000-08-10 23:54:16 -04:00
|
|
|
also be distributed in the "sumo" distribution. The
|
|
|
|
difference between those and external libraries is that the former
|
2000-07-14 11:21:52 -04:00
|
|
|
are distributed in order to make the Python distribution self
|
2000-08-10 23:54:16 -04:00
|
|
|
contained, and the latter are added so there will be new
|
2000-07-14 11:21:52 -04:00
|
|
|
functionality in out-of-the-box Python.
|
2000-07-14 10:21:51 -04:00
|
|
|
|
2000-08-10 23:54:16 -04:00
|
|
|
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
|
|
|
|
|
2000-07-14 11:21:52 -04:00
|
|
|
Here is the tentative list of libraries which are proposed to be
|
|
|
|
dealt with in this manner, and where they can be downloaded:
|
2000-07-14 10:21:51 -04:00
|
|
|
|
|
|
|
zlib -- http://www.info-zip.org/pub/infozip/zlib/zlib.tar.gz
|
2000-07-14 10:37:20 -04:00
|
|
|
expat -- ftp://ftp.jclark.com/pub/xml/expat.zip
|
2000-07-14 10:21:51 -04:00
|
|
|
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
|
2000-07-14 11:21:52 -04:00
|
|
|
libjpeg -- ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
|
2000-07-14 10:21:51 -04:00
|
|
|
ncurses -- ftp://dickey.his.com/ncurses/ncurses.tar.gz
|
|
|
|
|
2000-07-29 03:05:41 -04:00
|
|
|
TBD, the following:
|
2000-07-14 10:37:20 -04:00
|
|
|
|
|
|
|
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
|
2000-07-29 06:11:19 -04:00
|
|
|
piddle -- http://download.sourceforge.net/piddle/piddle-1.0b7.tgz
|
2000-07-14 10:37:20 -04:00
|
|
|
|
2000-07-29 03:05:41 -04:00
|
|
|
|
2000-07-15 19:52:40 -04:00
|
|
|
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.
|
|
|
|
|
2001-01-10 09:35:50 -05:00
|
|
|
Software covered by the GNU General Public License
|
2000-07-14 10:21:51 -04:00
|
|
|
|
2000-07-14 11:21:52 -04:00
|
|
|
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
|
2000-08-10 23:54:16 -04:00
|
|
|
sumo interpreter. Currently, the Python interpreter is
|
2000-07-14 11:21:52 -04:00
|
|
|
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.
|
2000-07-14 10:21:51 -04:00
|
|
|
|
2001-01-10 09:35:50 -05:00
|
|
|
How It Is Implemented
|
2000-07-14 10:21:51 -04:00
|
|
|
|
2001-01-10 09:35:50 -05:00
|
|
|
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.
|
2000-07-14 10:21:51 -04:00
|
|
|
|
2001-01-10 09:35:50 -05:00
|
|
|
Inside the tarball, running the script
|
2000-07-14 10:21:51 -04:00
|
|
|
|
2001-01-10 09:35:50 -05:00
|
|
|
build-everything [--prefix ...]
|
2000-07-14 10:21:51 -04:00
|
|
|
|
2001-01-10 09:35:50 -05:00
|
|
|
Will compile and install a sumo interpreter into specified prefix.
|
|
|
|
|
|
|
|
Open Issues
|
2000-07-14 10:21:51 -04:00
|
|
|
|
|
|
|
ESR also mentioned libpng, but I don't know of a Python module
|
|
|
|
that uses it.
|
2000-07-13 23:53:53 -04:00
|
|
|
|
2001-01-23 06:33:04 -05:00
|
|
|
How to make PAL as easy to build as the whole Sumo Python?
|
|
|
|
|
2000-07-13 23:53:53 -04:00
|
|
|
|
|
|
|
Local Variables:
|
|
|
|
mode: indented-text
|
|
|
|
indent-tabs-mode: nil
|
|
|
|
End:
|