summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-01-06 03:29:16 (GMT)
committerGuido van Rossum <guido@python.org>2002-01-06 03:29:16 (GMT)
commit23105d5c24579ae0278ed4dcd3905565e15f34a3 (patch)
tree92239eac0ca60e5e0a7b5d0e619a0e295e15e17a
parent8a107fbfed5913e165804b056ffa0c329bfcaa24 (diff)
downloadcpython-23105d5c24579ae0278ed4dcd3905565e15f34a3.zip
cpython-23105d5c24579ae0278ed4dcd3905565e15f34a3.tar.gz
cpython-23105d5c24579ae0278ed4dcd3905565e15f34a3.tar.bz2
Checked in Sean Reifschneider's RPM spec file and patches. Bugfix candidate.
-rw-r--r--Misc/RPM/BeOpen-Python-Setup.patch178
-rw-r--r--Misc/RPM/Python-2.1-expat.patch22
-rw-r--r--Misc/RPM/Python-2.1-pythonpath.patch27
-rw-r--r--Misc/RPM/README21
-rw-r--r--Misc/RPM/Tkinter/setup.cfg4
-rw-r--r--Misc/RPM/Tkinter/setup.py27
-rw-r--r--Misc/RPM/beopen-python.spec175
-rwxr-xr-xMisc/RPM/make-spec.sh11
-rw-r--r--Misc/RPM/python-2.2.spec302
9 files changed, 355 insertions, 412 deletions
diff --git a/Misc/RPM/BeOpen-Python-Setup.patch b/Misc/RPM/BeOpen-Python-Setup.patch
deleted file mode 100644
index f9ae805..0000000
--- a/Misc/RPM/BeOpen-Python-Setup.patch
+++ /dev/null
@@ -1,178 +0,0 @@
-*** /src/python/dist/src/Modules/Setup.in Mon Oct 9 10:40:21 2000
---- Modules/Setup.in Mon Oct 9 16:27:33 2000
-***************
-*** 111,117 ****
- # modules are to be built as shared libraries (see above for more
- # detail; also note that *static* reverses this effect):
-
-! #*shared*
-
- # GNU readline. Unlike previous Python incarnations, GNU readline is
- # now incorporated in an optional module, configured in the Setup file
---- 111,117 ----
- # modules are to be built as shared libraries (see above for more
- # detail; also note that *static* reverses this effect):
-
-! *shared*
-
- # GNU readline. Unlike previous Python incarnations, GNU readline is
- # now incorporated in an optional module, configured in the Setup file
-***************
-*** 121,127 ****
- # it, depending on your system -- see the GNU readline instructions.
- # It's okay for this to be a shared library, too.
-
-! #readline readline.c -lreadline -ltermcap
-
-
- # Modules that should always be present (non UNIX dependent):
---- 121,127 ----
- # it, depending on your system -- see the GNU readline instructions.
- # It's okay for this to be a shared library, too.
-
-! readline readline.c -lreadline -ltermcap
-
-
- # Modules that should always be present (non UNIX dependent):
-***************
-*** 170,187 ****
- # Some more UNIX dependent modules -- off by default, since these
- # are not supported by all UNIX systems:
-
-! #nis nismodule.c -lnsl # Sun yellow pages -- not everywhere
-! #termios termios.c # Steen Lumholt's termios module
-! #resource resource.c # Jeremy Hylton's rlimit interface
-
-
- # Multimedia modules -- off by default.
- # These don't work for 64-bit platforms!!!
- # These represent audio samples or images as strings:
-
-! #audioop audioop.c # Operations on audio samples
-! #imageop imageop.c # Operations on images
-! #rgbimg rgbimgmodule.c # Read SGI RGB image files (but coded portably)
-
-
- # The md5 module implements the RSA Data Security, Inc. MD5
---- 170,187 ----
- # Some more UNIX dependent modules -- off by default, since these
- # are not supported by all UNIX systems:
-
-! nis nismodule.c -lnsl # Sun yellow pages -- not everywhere
-! termios termios.c # Steen Lumholt's termios module
-! resource resource.c # Jeremy Hylton's rlimit interface
-
-
- # Multimedia modules -- off by default.
- # These don't work for 64-bit platforms!!!
- # These represent audio samples or images as strings:
-
-! audioop audioop.c # Operations on audio samples
-! imageop imageop.c # Operations on images
-! rgbimg rgbimgmodule.c # Read SGI RGB image files (but coded portably)
-
-
- # The md5 module implements the RSA Data Security, Inc. MD5
-***************
-*** 255,261 ****
-
- # Linux specific modules -- off by default:
-
-! #linuxaudiodev linuxaudiodev.c
-
-
- # George Neville-Neil's timing module:
---- 255,261 ----
-
- # Linux specific modules -- off by default:
-
-! linuxaudiodev linuxaudiodev.c
-
-
- # George Neville-Neil's timing module:
-***************
-*** 311,317 ****
- # Lance Ellinghaus's modules:
-
- rotor rotormodule.c # enigma-inspired encryption
-! #syslog syslogmodule.c # syslog daemon interface
-
-
- # Curses support, requring the System V version of curses, often
---- 311,317 ----
- # Lance Ellinghaus's modules:
-
- rotor rotormodule.c # enigma-inspired encryption
-! syslog syslogmodule.c # syslog daemon interface
-
-
- # Curses support, requring the System V version of curses, often
-***************
-*** 319,325 ****
- # instead of -lcurses; on SunOS 4.1.3, insert -I/usr/5include
- # -L/usr/5lib before -lcurses).
-
-! #_curses _cursesmodule.c -lcurses -ltermcap
-
-
-
---- 319,325 ----
- # instead of -lcurses; on SunOS 4.1.3, insert -I/usr/5include
- # -L/usr/5lib before -lcurses).
-
-! _curses _cursesmodule.c -lcurses -ltermcap
-
-
-
-***************
-*** 349,355 ****
-
- # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
-
-! #gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm
-
-
- # Berkeley DB interface.
---- 349,355 ----
-
- # Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm:
-
-! gdbm gdbmmodule.c -I/usr/include -L/usr/lib -lgdbm
-
-
- # Berkeley DB interface.
-***************
-*** 406,412 ****
- # Andrew Kuchling's zlib module.
- # This require zlib 1.1.3 (or later).
- # See http://www.cdrom.com/pub/infozip/zlib/
-! #zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
-
- # Interface to the Expat XML parser
- #
---- 406,412 ----
- # Andrew Kuchling's zlib module.
- # This require zlib 1.1.3 (or later).
- # See http://www.cdrom.com/pub/infozip/zlib/
-! zlib zlibmodule.c -I/usr/include -L/usr/lib -lz
-
- # Interface to the Expat XML parser
- #
-***************
-*** 427,434 ****
- #
- # ar cr libexpat.a xmltok/*.o xmlparse/*.o
- #
-! #EXPAT_DIR=/usr/local/src/expat
-! #pyexpat pyexpat.c -I$(EXPAT_DIR)/xmlparse -L$(EXPAT_DIR) -lexpat
-
-
- # Example -- included for reference only:
---- 427,433 ----
- #
- # ar cr libexpat.a xmltok/*.o xmlparse/*.o
- #
-! pyexpat pyexpat.c -I/usr/local/include/xmlparse -L/usr/local/lib -lexpat
-
-
- # Example -- included for reference only:
diff --git a/Misc/RPM/Python-2.1-expat.patch b/Misc/RPM/Python-2.1-expat.patch
new file mode 100644
index 0000000..3686458
--- /dev/null
+++ b/Misc/RPM/Python-2.1-expat.patch
@@ -0,0 +1,22 @@
+--- Modules/pyexpat.c.old Tue Mar 6 02:30:48 2001
++++ Modules/pyexpat.c Tue Mar 6 02:31:15 2001
+@@ -12,7 +12,7 @@
+ #define EXPAT_VERSION 0x015f00
+ #endif
+ #else /* !defined(HAVE_EXPAT_H) */
+-#include "xmlparse.h"
++#include "expat/xmlparse.h"
+ /* Assume Expat 1.1 unless told otherwise */
+ #ifndef EXPAT_VERSION
+ #define EXPAT_VERSION 0x010100
+--- setup.py-orig Fri Feb 2 11:24:25 2001
++++ setup.py Wed Feb 14 18:13:15 2001
+@@ -445,7 +445,7 @@
+ # expat.h was found
+ expat_defs = [('HAVE_EXPAT_H', 1)]
+ else:
+- expat_incs = find_file('xmlparse.h', inc_dirs, [])
++ expat_incs = find_file('expat/xmlparse.h', inc_dirs, [])
+
+ if (expat_incs is not None and
+ self.compiler.find_library_file(lib_dirs, 'expat')):
diff --git a/Misc/RPM/Python-2.1-pythonpath.patch b/Misc/RPM/Python-2.1-pythonpath.patch
new file mode 100644
index 0000000..a628128
--- /dev/null
+++ b/Misc/RPM/Python-2.1-pythonpath.patch
@@ -0,0 +1,27 @@
+diff -ur Python-2.1a1.old/Lib/cgi.py Python-2.1a1/Lib/cgi.py
+--- Python-2.1a1.old/Lib/cgi.py Sat Jan 20 12:54:20 2001
++++ Python-2.1a1/Lib/cgi.py Fri Jan 26 01:07:57 2001
+@@ -1,4 +1,4 @@
+-#! /usr/local/bin/python
++#!/usr/bin/env python
+
+ """Support module for CGI (Common Gateway Interface) scripts.
+
+diff -ur Python-2.1a1.old/Tools/faqwiz/faqw.py Python-2.1a1/Tools/faqwiz/faqw.py
+--- Python-2.1a1.old/Tools/faqwiz/faqw.py Fri Apr 3 15:27:04 1998
++++ Python-2.1a1/Tools/faqwiz/faqw.py Fri Jan 26 01:08:07 2001
+@@ -1,4 +1,4 @@
+-#! /usr/local/bin/python
++#!/usr/bin/env python
+
+ """FAQ wizard bootstrap."""
+
+diff -ur Python-2.1a1.old/Tools/scripts/parseentities.py Python-2.1a1/Tools/scripts/parseentities.py
+--- Python-2.1a1.old/Tools/scripts/parseentities.py Wed Jan 17 01:48:39 2001
++++ Python-2.1a1/Tools/scripts/parseentities.py Fri Jan 26 01:08:16 2001
+@@ -1,4 +1,4 @@
+-#!/usr/local/bin/python
++#!/usr/bin/env python
+ """ Utility for parsing HTML entity definitions available from:
+
+ http://www.w3.org/ as e.g.
diff --git a/Misc/RPM/README b/Misc/RPM/README
index 56dcab3..5dbfccd 100644
--- a/Misc/RPM/README
+++ b/Misc/RPM/README
@@ -1,19 +1,6 @@
This directory contains support file used to build RPM releases of
-Python.
+Python. Its contents are maintained by Sean Reifschneider
+<jafo@tummy.com>.
-beopen-python.spec:
- Template for the spec file used to build Python. The make-spec.sh
- program below converts fills in the template with current release
- information.
-BeOpen-Python-Setup.patch:
- This patch modifies Setup.in to include many extension modules
- that compile cleanly on a generic Linux system.
-make-spec.sh:
- Copies the .spec and .patch files into /usr/src/redhat/SPECS and
- SOURCES respectively. The generated versions of these files have
- version numbers set from the source tree.
-Tkinter:
- The files in this directory are used to package the _tkinter
- extension module with distutils. The src subdirectory should
- contain copies of _tkinter.c and tkappinit.c from the Modules
- directory of the source tree.
+Note that the patches say "2.1" in the name -- they didn't need to be
+updated for 2.2.
diff --git a/Misc/RPM/Tkinter/setup.cfg b/Misc/RPM/Tkinter/setup.cfg
deleted file mode 100644
index ad23694..0000000
--- a/Misc/RPM/Tkinter/setup.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-[bdist_rpm]
-packager = Jeremy Hylton <jeremy@zope.com>
-vendor = PythonLabs
-release = 2
diff --git a/Misc/RPM/Tkinter/setup.py b/Misc/RPM/Tkinter/setup.py
deleted file mode 100644
index 730804c..0000000
--- a/Misc/RPM/Tkinter/setup.py
+++ /dev/null
@@ -1,27 +0,0 @@
-#! /usr/bin/env python
-"""Tkinter is the Python interface to the Tk GUI toolkit. Tk offers
-native look and feel on most major platforms, including Unix, Windows,
-and Macintosh. The Tkinter-2.0 RPM contains the Python C extension
-module for Python 2.0. The Python source files are distributed with
-the main Python distribution."""
-
-from distutils.core import setup, Extension
-
-setup(name="Tkinter-2.0",
- version="8.0",
- description="Python interface to Tk GUI toolkit",
- author="Python development team",
- author_email="pythoneers@zope.com",
- url="http://www.pythonlabs.com/products/python2.0/",
- licence="Modified CNRI Open Source License",
-
- ext_modules=[Extension("_tkinter",
- ["src/_tkinter.c", "src/tkappinit.c"],
- define_macros=[('WITH_APPINIT', None)],
- library_dirs=["/usr/X11R6/lib"],
- libraries=["tk8.0", "tcl8.0", "X11"],
- )],
-
- long_description = __doc__
- )
-
diff --git a/Misc/RPM/beopen-python.spec b/Misc/RPM/beopen-python.spec
deleted file mode 100644
index 631de1b..0000000
--- a/Misc/RPM/beopen-python.spec
+++ /dev/null
@@ -1,175 +0,0 @@
-%define name BeOpen-Python
-%define version 2.0
-%define release 1
-%define __prefix /usr/local
-
-Summary: An interpreted, interactive, object-oriented programming language.
-Name: %{name}
-Version: %{version}
-Release: %{release}
-Copyright: Modified CNRI Open Source License
-Group: Development/Languages
-Source: %{name}-%{version}.tar.bz2
-Source1: html-%{version}.tar.bz2
-Patch0: %{name}-%{version}-Setup.patch
-BuildRoot: /var/tmp/%{name}-%{version}-root
-Prefix: %{__prefix}
-URL: http://www.pythonlabs.com/
-Vendor: PythonLabs
-Packager: Jeremy Hylton <jeremy@zope.com>
-
-%description
-Python is an interpreted, interactive, object-oriented programming
-language. It incorporates modules, exceptions, dynamic typing, very high
-level dynamic data types, and classes. Python combines remarkable power
-with very clear syntax. It has interfaces to many system calls and
-libraries, as well as to various window systems, and is extensible in C or
-C++. It is also usable as an extension language for applications that need
-a programmable interface. Finally, Python is portable: it runs on many
-brands of UNIX, on PCs under Windows, MS-DOS, and OS/2, and on the
-Mac.
-
-%changelog
-* Mon Oct 9 2000 Jeremy Hylton <jeremy@beopen.com>
-- updated for 2.0c1
-- build audioop, imageop, and rgbimg extension modules
-- include xml.parsers subpackage
-- add test.xml.out to files list
-
-* Thu Oct 5 2000 Jeremy Hylton <jeremy@beopen.com>
-- added bin/python2.0 to files list (suggested by Martin v. Löwis)
-
-* Tue Sep 26 2000 Jeremy Hylton <jeremy@beopen.com>
-- updated for release 1 of 2.0b2
-- use .bz2 version of Python source
-
-* Tue Sep 12 2000 Jeremy Hylton <jeremy@beopen.com>
-- Version 2 of 2.0b1
-- Make the package relocatable. Thanks to Suchandra Thapa.
-- Exclude Tkinter from main RPM. If it is in a separate RPM, it is
- easier to track Tk releases.
-
-%prep
-%setup -n Python-%{version}
-%patch0
-%setup -D -T -a 1 -n Python-%{version}
-# This command drops the HTML files in the top-level build directory.
-# That's not perfect, but it will do for now.
-
-%build
-./configure
-make
-
-%install
-[ -d $RPM_BUILD_ROOT ] && rm -fr $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT%{__prefix}
-make prefix=$RPM_BUILD_ROOT%{__prefix} install
-
-%clean
-rm -fr $RPM_BUILD_ROOT
-
-%files
-%defattr(-, root, root)
-%{__prefix}/bin/python
-%{__prefix}/bin/python2.0
-%{__prefix}/man/man1/python.1
-%doc Misc/README Misc/HYPE Misc/cheatsheet Misc/unicode.txt Misc/Porting
-%doc LICENSE Misc/ACKS Misc/BLURB.* Misc/HISTORY Misc/NEWS
-%doc index.html modindex.html api dist doc ext inst lib mac ref tut icons
-
-%dir %{__prefix}/include/python2.0
-%{__prefix}/include/python2.0/*.h
-%dir %{__prefix}/lib/python2.0/
-%{__prefix}/lib/python2.0/*.py*
-%{__prefix}/lib/python2.0/pdb.doc
-%{__prefix}/lib/python2.0/profile.doc
-%dir %{__prefix}/lib/python2.0/config
-%{__prefix}/lib/python2.0/config/Makefile
-%{__prefix}/lib/python2.0/config/Makefile.pre.in
-%{__prefix}/lib/python2.0/config/Setup
-%{__prefix}/lib/python2.0/config/Setup.config
-%{__prefix}/lib/python2.0/config/Setup.local
-%{__prefix}/lib/python2.0/config/config.c
-%{__prefix}/lib/python2.0/config/config.c.in
-%{__prefix}/lib/python2.0/config/install-sh
-%{__prefix}/lib/python2.0/config/libpython2.0.a
-%{__prefix}/lib/python2.0/config/makesetup
-%{__prefix}/lib/python2.0/config/python.o
-%dir %{__prefix}/lib/python2.0/curses
-%{__prefix}/lib/python2.0/curses/*.py*
-%dir %{__prefix}/lib/python2.0/distutils
-%{__prefix}/lib/python2.0/distutils/*.py*
-%{__prefix}/lib/python2.0/distutils/README
-%dir %{__prefix}/lib/python2.0/distutils/command
-%{__prefix}/lib/python2.0/distutils/command/*.py*
-%{__prefix}/lib/python2.0/distutils/command/command_template
-%dir %{__prefix}/lib/python2.0/encodings
-%{__prefix}/lib/python2.0/encodings/*.py*
-%dir %{__prefix}/lib/python2.0/lib-dynload
-%dir %{__prefix}/lib/python2.0/lib-tk
-%{__prefix}/lib/python2.0/lib-tk/*.py*
-%{__prefix}/lib/python2.0/lib-dynload/_codecsmodule.so
-%{__prefix}/lib/python2.0/lib-dynload/_cursesmodule.so
-%{__prefix}/lib/python2.0/lib-dynload/_localemodule.so
-%{__prefix}/lib/python2.0/lib-dynload/arraymodule.so
-%{__prefix}/lib/python2.0/lib-dynload/audioop.so
-%{__prefix}/lib/python2.0/lib-dynload/binascii.so
-%{__prefix}/lib/python2.0/lib-dynload/cPickle.so
-%{__prefix}/lib/python2.0/lib-dynload/cStringIO.so
-%{__prefix}/lib/python2.0/lib-dynload/cmathmodule.so
-%{__prefix}/lib/python2.0/lib-dynload/errnomodule.so
-%{__prefix}/lib/python2.0/lib-dynload/fcntlmodule.so
-%{__prefix}/lib/python2.0/lib-dynload/gdbmmodule.so
-%{__prefix}/lib/python2.0/lib-dynload/grpmodule.so
-%{__prefix}/lib/python2.0/lib-dynload/imageop.so
-%{__prefix}/lib/python2.0/lib-dynload/linuxaudiodev.so
-%{__prefix}/lib/python2.0/lib-dynload/mathmodule.so
-%{__prefix}/lib/python2.0/lib-dynload/md5module.so
-%{__prefix}/lib/python2.0/lib-dynload/mmapmodule.so
-%{__prefix}/lib/python2.0/lib-dynload/newmodule.so
-%{__prefix}/lib/python2.0/lib-dynload/operator.so
-%{__prefix}/lib/python2.0/lib-dynload/parsermodule.so
-%{__prefix}/lib/python2.0/lib-dynload/pwdmodule.so
-%{__prefix}/lib/python2.0/lib-dynload/pyexpat.so
-%{__prefix}/lib/python2.0/lib-dynload/readline.so
-%{__prefix}/lib/python2.0/lib-dynload/resource.so
-%{__prefix}/lib/python2.0/lib-dynload/rgbimgmodule.so
-%{__prefix}/lib/python2.0/lib-dynload/rotormodule.so
-%{__prefix}/lib/python2.0/lib-dynload/selectmodule.so
-%{__prefix}/lib/python2.0/lib-dynload/shamodule.so
-%{__prefix}/lib/python2.0/lib-dynload/_socketmodule.so
-%{__prefix}/lib/python2.0/lib-dynload/stropmodule.so
-%{__prefix}/lib/python2.0/lib-dynload/structmodule.so
-%{__prefix}/lib/python2.0/lib-dynload/syslogmodule.so
-%{__prefix}/lib/python2.0/lib-dynload/termios.so
-%{__prefix}/lib/python2.0/lib-dynload/timemodule.so
-%{__prefix}/lib/python2.0/lib-dynload/ucnhash.so
-%{__prefix}/lib/python2.0/lib-dynload/unicodedata.so
-%{__prefix}/lib/python2.0/lib-dynload/zlibmodule.so
-%dir %{__prefix}/lib/python2.0/lib-old
-%{__prefix}/lib/python2.0/lib-old/*.py*
-%dir %{__prefix}/lib/python2.0/plat-linux2
-%{__prefix}/lib/python2.0/plat-linux2/*.py*
-%{__prefix}/lib/python2.0/plat-linux2/regen
-%dir %{__prefix}/lib/python2.0/site-packages
-%{__prefix}/lib/python2.0/site-packages/README
-%dir %{__prefix}/lib/python2.0/test
-%{__prefix}/lib/python2.0/test/*.py*
-%{__prefix}/lib/python2.0/test/README
-%{__prefix}/lib/python2.0/test/audiotest.au
-%{__prefix}/lib/python2.0/test/greyrgb.uue
-%{__prefix}/lib/python2.0/test/test.xml
-%{__prefix}/lib/python2.0/test/test.xml.out
-%{__prefix}/lib/python2.0/test/testimg.uue
-%{__prefix}/lib/python2.0/test/testimgr.uue
-%{__prefix}/lib/python2.0/test/testrgb.uue
-%dir %{__prefix}/lib/python2.0/test/output
-%{__prefix}/lib/python2.0/test/output/test_*
-%dir %{__prefix}/lib/python2.0/xml
-%{__prefix}/lib/python2.0/xml/*.py*
-%dir %{__prefix}/lib/python2.0/xml/dom
-%{__prefix}/lib/python2.0/xml/dom/*.py*
-%dir %{__prefix}/lib/python2.0/xml/parsers
-%{__prefix}/lib/python2.0/xml/parsers/*.py*
-%dir %{__prefix}/lib/python2.0/xml/sax
-%{__prefix}/lib/python2.0/xml/sax/*.py*
diff --git a/Misc/RPM/make-spec.sh b/Misc/RPM/make-spec.sh
deleted file mode 100755
index 449814e..0000000
--- a/Misc/RPM/make-spec.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/bash
-
-RPM_TOPDIR=/usr/src/redhat
-
-PY_VERSION=`perl -ne 'print "$1\n" if (/PY_VERSION\s*\"(.*)\"/o);' ../../Include/patchlevel.h`
-export PY_VERSION
-
-cp beopen-python.spec $RPM_TOPDIR/SPECS/beopen-python-$PY_VERSION.spec
-cp BeOpen-Python-Setup.patch $RPM_TOPDIR/SOURCES/BeOpen-Python-$PY_VERSION-Setup.patch
-
-perl -pi -e "s/(%define version).*/\$1 $PY_VERSION/;" $RPM_TOPDIR/SPECS/beopen-python-$PY_VERSION.spec
diff --git a/Misc/RPM/python-2.2.spec b/Misc/RPM/python-2.2.spec
new file mode 100644
index 0000000..db1ab47
--- /dev/null
+++ b/Misc/RPM/python-2.2.spec
@@ -0,0 +1,302 @@
+##########################
+# User-modifiable configs
+##########################
+
+# Is the resulting package and the installed binary named "python" or
+# "python2"?
+#WARNING: Commenting out doesn't work. Last line is what's used.
+%define config_binsuffix none
+%define config_binsuffix 2
+
+# Build tkinter? "auto" enables it if /usr/bin/wish exists.
+#WARNING: Commenting out doesn't work. Last line is what's used.
+%define config_tkinter no
+%define config_tkinter yes
+%define config_tkinter auto
+
+# Use pymalloc? The last line (commented or not) determines wether
+# pymalloc is used.
+#WARNING: Commenting out doesn't work. Last line is what's used.
+%define config_pymalloc yes
+%define config_pymalloc no
+
+# Enable IPV6?
+#WARNING: Commenting out doesn't work. Last line is what's used.
+%define config_ipv6 yes
+%define config_ipv6 no
+
+#################################
+# End of user-modifiable configs
+#################################
+
+%define name python
+%define version 2.2
+%define libvers 2.2
+%define release 2
+%define __prefix /usr
+
+# kludge to get around rpm <percent>define weirdness
+%define ipv6 %(if [ "%{config_ipv6}" = yes ]; then echo --enable-ipv6; else echo --disable-ipv6; fi)
+%define pymalloc %(if [ "%{config_pymalloc}" = yes ]; then echo --with-pymalloc; else echo --without-pymalloc; fi)
+%define binsuffix %(if [ "%{config_binsuffix}" = none ]; then echo ; else echo "%{config_binsuffix}"; fi)
+%define include_tkinter %(if [ \\( "%{config_tkinter}" = auto -a -f /usr/bin/wish \\) -o "%{config_tkinter}" = yes ]; then echo 1; else echo 0; fi)
+
+Summary: An interpreted, interactive, object-oriented programming language.
+Name: %{name}%{binsuffix}
+Version: %{version}
+Release: %{release}
+Copyright: Modified CNRI Open Source License
+Group: Development/Languages
+Source: Python-%{version}.tgz
+Source1: html-%{version}.tar.bz2
+Source2: info-%{version}.tar.bz2
+Patch0: Python-2.1-pythonpath.patch
+Patch1: Python-2.1-expat.patch
+BuildRoot: /var/tmp/%{name}-%{version}-root
+BuildPrereq: expat-devel
+BuildPrereq: db1-devel
+BuildPrereq: gdbm-devel
+Prefix: %{__prefix}
+Packager: Sean Reifschneider <jafo-rpms@tummy.com>
+
+%description
+Python is an interpreted, interactive, object-oriented programming
+language. It incorporates modules, exceptions, dynamic typing, very high
+level dynamic data types, and classes. Python combines remarkable power
+with very clear syntax. It has interfaces to many system calls and
+libraries, as well as to various window systems, and is extensible in C or
+C++. It is also usable as an extension language for applications that need
+a programmable interface. Finally, Python is portable: it runs on many
+brands of UNIX, on PCs under Windows, MS-DOS, and OS/2, and on the
+Mac.
+
+%package devel
+Summary: The libraries and header files needed for Python extension development.
+Prereq: python%{binsuffix} = %{PACKAGE_VERSION}
+Group: Development/Libraries
+
+%description devel
+The Python programming language's interpreter can be extended with
+dynamically loaded extensions and can be embedded in other programs.
+This package contains the header files and libraries needed to do
+these types of tasks.
+
+Install python-devel if you want to develop Python extensions. The
+python package will also need to be installed. You'll probably also
+want to install the python-docs package, which contains Python
+documentation.
+
+%if %{include_tkinter}
+%package tkinter
+Summary: A graphical user interface for the Python scripting language.
+Group: Development/Languages
+Prereq: python%{binsuffix} = %{PACKAGE_VERSION}-%{release}
+
+%description tkinter
+The Tkinter (Tk interface) program is an graphical user interface for
+the Python scripting language.
+
+You should install the tkinter package if you'd like to use a graphical
+user interface for Python programming.
+%endif
+
+%package tools
+Summary: A collection of development tools included with Python.
+Group: Development/Tools
+Prereq: python%{binsuffix} = %{PACKAGE_VERSION}-%{release}
+
+%description tools
+The Python package includes several development tools that are used
+to build python programs. This package contains a selection of those
+tools, including the IDLE Python IDE.
+
+Install python-tools if you want to use these tools to develop
+Python programs. You will also need to install the python and
+tkinter packages.
+
+%package docs
+Summary: Python-related documentation.
+Group: Development/Documentation
+
+%description docs
+Documentation relating to the Python programming language in HTML and info
+formats.
+
+%changelog
+* Sun Dec 23 2001 Sean Reifschneider <jafo-rpms@tummy.com>
+[Release 2.2-2]
+- Added -docs package.
+- Added "auto" config_tkinter setting which only enables tk if
+ /usr/bin/wish exists.
+
+* Sat Dec 22 2001 Sean Reifschneider <jafo-rpms@tummy.com>
+[Release 2.2-1]
+- Updated to 2.2.
+- Changed the extension to "2" from "2.2".
+
+* Tue Nov 18 2001 Sean Reifschneider <jafo-rpms@tummy.com>
+[Release 2.2c1-1]
+- Updated to 2.2c1.
+
+* Thu Nov 1 2001 Sean Reifschneider <jafo-rpms@tummy.com>
+[Release 2.2b1-3]
+- Changed the way the sed for fixing the #! in pydoc works.
+
+* Wed Oct 24 2001 Sean Reifschneider <jafo-rpms@tummy.com>
+[Release 2.2b1-2]
+- Fixed missing "email" package, thanks to anonymous report on sourceforge.
+- Fixed missing "compiler" package.
+
+* Mon Oct 22 2001 Sean Reifschneider <jafo-rpms@tummy.com>
+[Release 2.2b1-1]
+- Updated to 2.2b1.
+
+* Mon Oct 9 2001 Sean Reifschneider <jafo-rpms@tummy.com>
+[Release 2.2a4-4]
+- otto@balinor.mat.unimi.it mentioned that the license file is missing.
+
+* Sun Sep 30 2001 Sean Reifschneider <jafo-rpms@tummy.com>
+[Release 2.2a4-3]
+- Ignacio Vazquez-Abrams pointed out that I had a spruious double-quote in
+ the spec files. Thanks.
+
+* Wed Jul 25 2001 Sean Reifschneider <jafo-rpms@tummy.com>
+[Release 2.2a1-1]
+- Updated to 2.2a1 release.
+- Changed idle and pydoc to use binsuffix macro
+
+#######
+# PREP
+#######
+%prep
+%setup -n Python-%{version}
+%patch0 -p1
+%patch1
+
+########
+# BUILD
+########
+%build
+./configure %{ipv6} %{pymalloc} --prefix=%{__prefix}
+make
+
+##########
+# INSTALL
+##########
+%install
+# set the install path
+echo '[install_scripts]' >setup.cfg
+echo 'install_dir='"${RPM_BUILD_ROOT}/usr/bin" >>setup.cfg
+
+[ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT%{__prefix}/lib/python%{libvers}/lib-dynload
+make prefix=$RPM_BUILD_ROOT%{__prefix} install
+
+# REPLACE PATH IN PYDOC
+if [ ! -z "%{binsuffix}" ]
+then
+ (
+ cd $RPM_BUILD_ROOT%{__prefix}/bin
+ mv pydoc pydoc.old
+ sed 's|#!.*|#!/usr/bin/env python'%{binsuffix}'|' \
+ pydoc.old >pydoc
+ chmod 755 pydoc
+ rm -f pydoc.old
+ )
+fi
+
+# add the binsuffix
+if [ ! -z "%{binsuffix}" ]
+then
+ ( cd $RPM_BUILD_ROOT%{__prefix}/bin; rm -f python[0-9a-zA-Z]*;
+ mv -f python python"%{binsuffix}" )
+ ( cd $RPM_BUILD_ROOT%{__prefix}/man/man1; mv python.1 python%{binsuffix}.1 )
+ ( cd $RPM_BUILD_ROOT%{__prefix}/bin; mv -f pydoc pydoc"%{binsuffix}" )
+fi
+
+########
+# Tools
+echo '#!/bin/bash' >${RPM_BUILD_ROOT}%{_bindir}/idle%{binsuffix}
+echo 'exec %{_prefix}/bin/python%{binsuffix} /usr/lib/python%{libvers}/Tools/idle/idle.py' >>$RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix}
+chmod 755 $RPM_BUILD_ROOT%{_bindir}/idle%{binsuffix}
+cp -a Tools $RPM_BUILD_ROOT%{_prefix}/lib/python%{libvers}
+
+# MAKE FILE LISTS
+rm -f mainpkg.files
+find "$RPM_BUILD_ROOT""%{__prefix}"/lib/python%{libvers}/lib-dynload -type f |
+ sed "s|^${RPM_BUILD_ROOT}|/|" |
+ grep -v -e '_tkinter.so$' >mainpkg.files
+find "$RPM_BUILD_ROOT""%{__prefix}"/bin -type f |
+ sed "s|^${RPM_BUILD_ROOT}|/|" |
+ grep -v -e '/bin/idle%{binsuffix}$' >>mainpkg.files
+
+rm -f tools.files
+find "$RPM_BUILD_ROOT""%{__prefix}"/lib/python%{libvers}/Tools -type f |
+ sed "s|^${RPM_BUILD_ROOT}|/|" >tools.files
+echo "%{__prefix}"/bin/idle%{binsuffix} >>tools.files
+
+######
+# Docs
+mkdir -p "$RPM_BUILD_ROOT"/var/www/html/python
+(
+ cd "$RPM_BUILD_ROOT"/var/www/html/python
+ bunzip2 < %{SOURCE1} | tar x
+)
+mkdir -p "$RPM_BUILD_ROOT"/usr/share/info
+(
+ cd "$RPM_BUILD_ROOT"/usr/share/info
+ bunzip2 < %{SOURCE2} | tar x
+)
+
+########
+# CLEAN
+########
+%clean
+rm -fr $RPM_BUILD_ROOT
+rm -f mainpkg.files tools.files
+
+########
+# FILES
+########
+%files -f mainpkg.files
+%defattr(-,root,root)
+%doc Misc/README Misc/HYPE Misc/cheatsheet Misc/unicode.txt Misc/Porting
+%doc LICENSE Misc/ACKS Misc/BLURB.* Misc/HISTORY Misc/NEWS
+%{__prefix}/man/man1/python%{binsuffix}.1.gz
+
+%dir %{__prefix}/include/python%{libvers}
+%dir %{__prefix}/lib/python%{libvers}/
+%{__prefix}/lib/python%{libvers}/*.txt
+%{__prefix}/lib/python%{libvers}/*.py*
+%{__prefix}/lib/python%{libvers}/pdb.doc
+%{__prefix}/lib/python%{libvers}/profile.doc
+%{__prefix}/lib/python%{libvers}/curses
+%{__prefix}/lib/python%{libvers}/distutils
+%{__prefix}/lib/python%{libvers}/encodings
+%dir %{__prefix}/lib/python%{libvers}/lib-old
+%{__prefix}/lib/python%{libvers}/plat-linux2
+%{__prefix}/lib/python%{libvers}/site-packages
+%{__prefix}/lib/python%{libvers}/test
+%{__prefix}/lib/python%{libvers}/xml
+%{__prefix}/lib/python%{libvers}/email
+%{__prefix}/lib/python%{libvers}/compiler
+
+%files devel
+%defattr(-,root,root)
+%{__prefix}/include/python%{libvers}/*.h
+%{__prefix}/lib/python%{libvers}/config
+
+%files -f tools.files tools
+%defattr(-,root,root)
+
+%if %{include_tkinter}
+%files tkinter
+%defattr(-,root,root)
+%{__prefix}/lib/python%{libvers}/lib-tk
+%{__prefix}/lib/python%{libvers}/lib-dynload/_tkinter.so*
+%endif
+
+%files docs
+%defattr(-,root,root)
+/var/www/html/python
+/usr/share/info