aboutsummaryrefslogtreecommitdiff
path: root/development
diff options
context:
space:
mode:
Diffstat (limited to 'development')
-rw-r--r--development/python3/patches/python3.pure64.diff32
-rw-r--r--development/python3/patches/python3.readline.set_pre_input_hook.diff12
-rw-r--r--development/python3/patches/python3.x86_64.diff164
-rw-r--r--development/python3/python3.SlackBuild38
-rw-r--r--development/python3/python3.info8
5 files changed, 231 insertions, 23 deletions
diff --git a/development/python3/patches/python3.pure64.diff b/development/python3/patches/python3.pure64.diff
new file mode 100644
index 0000000000000..9f34af18cbcbf
--- /dev/null
+++ b/development/python3/patches/python3.pure64.diff
@@ -0,0 +1,32 @@
+diff -uar Python-3.1.2.orig//Lib/distutils/command/install.py Python-3.1.2/Lib/distutils/command/install.py
+--- Python-3.1.2.orig//Lib/distutils/command/install.py 2010-05-30 21:01:34.000000000 +0300
++++ Python-3.1.2/Lib/distutils/command/install.py 2010-05-30 21:03:07.000000000 +0300
+@@ -46,14 +46,14 @@
+
+ INSTALL_SCHEMES = {
+ 'unix_prefix': {
+- 'purelib': '$base/lib/python$py_version_short/site-packages',
++ 'purelib': '$base/lib64/python$py_version_short/site-packages',
+ 'platlib': '$platbase/lib64/python$py_version_short/site-packages',
+ 'headers': '$base/include/python$py_version_short/$dist_name',
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+ },
+ 'unix_home': {
+- 'purelib': '$base/lib/python',
++ 'purelib': '$base/lib64/python',
+ 'platlib': '$base/lib64/python',
+ 'headers': '$base/include/python/$dist_name',
+ 'scripts': '$base/bin',
+diff -uar Python-3.1.2.orig//Lib/distutils/sysconfig.py Python-3.1.2/Lib/distutils/sysconfig.py
+--- Python-3.1.2.orig//Lib/distutils/sysconfig.py 2010-05-30 21:01:34.000000000 +0300
++++ Python-3.1.2/Lib/distutils/sysconfig.py 2010-05-30 21:03:41.000000000 +0300
+@@ -120,7 +120,7 @@
+ if plat_specific or standard_lib:
+ lib = "lib64"
+ else:
+- lib = "lib"
++ lib = "lib64"
+ libpython = os.path.join(prefix,
+ lib, "python" + get_python_version())
+ if standard_lib:
diff --git a/development/python3/patches/python3.readline.set_pre_input_hook.diff b/development/python3/patches/python3.readline.set_pre_input_hook.diff
new file mode 100644
index 0000000000000..6796c6007e3af
--- /dev/null
+++ b/development/python3/patches/python3.readline.set_pre_input_hook.diff
@@ -0,0 +1,12 @@
+--- ./Modules/readline.c.orig 2009-10-26 21:32:51.000000000 +0200
++++ ./Modules/readline.c 2010-05-30 14:07:10.000000000 +0300
+@@ -11,6 +11,9 @@
+ #include <errno.h>
+ #include <sys/time.h>
+
++/* This seems to be needed for set_pre_input_hook to work */
++#define HAVE_RL_PRE_INPUT_HOOK 1
++
+ #if defined(HAVE_SETLOCALE)
+ /* GNU readline() mistakenly sets the LC_CTYPE locale.
+ * This is evil. Only the user or the app's main() should do this!
diff --git a/development/python3/patches/python3.x86_64.diff b/development/python3/patches/python3.x86_64.diff
new file mode 100644
index 0000000000000..e18527292b990
--- /dev/null
+++ b/development/python3/patches/python3.x86_64.diff
@@ -0,0 +1,164 @@
+diff -uar Python-3.1.2.orig//Lib/distutils/command/install.py Python-3.1.2/Lib/distutils/command/install.py
+--- Python-3.1.2.orig//Lib/distutils/command/install.py 2009-06-04 10:39:50.000000000 +0300
++++ Python-3.1.2/Lib/distutils/command/install.py 2010-05-30 15:10:17.000000000 +0300
+@@ -47,14 +47,14 @@
+ INSTALL_SCHEMES = {
+ 'unix_prefix': {
+ 'purelib': '$base/lib/python$py_version_short/site-packages',
+- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
++ 'platlib': '$platbase/lib64/python$py_version_short/site-packages',
+ 'headers': '$base/include/python$py_version_short/$dist_name',
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+ },
+ 'unix_home': {
+ 'purelib': '$base/lib/python',
+- 'platlib': '$base/lib/python',
++ 'platlib': '$base/lib64/python',
+ 'headers': '$base/include/python/$dist_name',
+ 'scripts': '$base/bin',
+ 'data' : '$base',
+diff -uar Python-3.1.2.orig//Lib/distutils/sysconfig.py Python-3.1.2/Lib/distutils/sysconfig.py
+--- Python-3.1.2.orig//Lib/distutils/sysconfig.py 2009-06-11 11:31:17.000000000 +0300
++++ Python-3.1.2/Lib/distutils/sysconfig.py 2010-05-30 15:48:29.000000000 +0300
+@@ -117,8 +117,12 @@
+ prefix = plat_specific and EXEC_PREFIX or PREFIX
+
+ if os.name == "posix":
++ if plat_specific or standard_lib:
++ lib = "lib64"
++ else:
++ lib = "lib"
+ libpython = os.path.join(prefix,
+- "lib", "python" + get_python_version())
++ lib, "python" + get_python_version())
+ if standard_lib:
+ return libpython
+ else:
+diff -uar Python-3.1.2.orig//Lib/site.py Python-3.1.2/Lib/site.py
+--- Python-3.1.2.orig//Lib/site.py 2009-03-31 02:16:10.000000000 +0300
++++ Python-3.1.2/Lib/site.py 2010-05-30 16:26:34.000000000 +0300
+@@ -258,12 +258,16 @@
+ if sys.platform in ('os2emx', 'riscos'):
+ sitedirs.append(os.path.join(prefix, "Lib", "site-packages"))
+ elif os.sep == '/':
++ sitedirs.append(os.path.join(prefix, "lib64",
++ "python" + sys.version[:3],
++ "site-packages"))
+ sitedirs.append(os.path.join(prefix, "lib",
+ "python" + sys.version[:3],
+ "site-packages"))
+ sitedirs.append(os.path.join(prefix, "lib", "site-python"))
+ else:
+ sitedirs.append(prefix)
++ sitedirs.append(os.path.join(prefix, "lib64", "site-packages"))
+ sitedirs.append(os.path.join(prefix, "lib", "site-packages"))
+
+ if sys.platform == "darwin":
+diff -uar Python-3.1.2.orig//Makefile.pre.in Python-3.1.2/Makefile.pre.in
+--- Python-3.1.2.orig//Makefile.pre.in 2010-03-19 01:01:29.000000000 +0200
++++ Python-3.1.2/Makefile.pre.in 2010-05-30 16:27:59.000000000 +0300
+@@ -90,11 +90,11 @@
+
+ # Expanded directories
+ BINDIR= $(exec_prefix)/bin
+-LIBDIR= $(exec_prefix)/lib
++LIBDIR= $(exec_prefix)/lib64
+ MANDIR= @mandir@
+ INCLUDEDIR= @includedir@
+ CONFINCLUDEDIR= $(exec_prefix)/include
+-SCRIPTDIR= $(prefix)/lib
++SCRIPTDIR= $(prefix)/lib64
+
+ # Detailed destination directories
+ BINLIBDEST= $(LIBDIR)/python$(VERSION)
+diff -uar Python-3.1.2.orig//Modules/Setup.dist Python-3.1.2/Modules/Setup.dist
+--- Python-3.1.2.orig//Modules/Setup.dist 2009-06-04 12:30:30.000000000 +0300
++++ Python-3.1.2/Modules/Setup.dist 2010-05-30 16:31:29.000000000 +0300
+@@ -351,7 +351,7 @@
+ # Andrew Kuchling's zlib module.
+ # This require zlib 1.1.3 (or later).
+ # See http://www.gzip.org/zlib/
+-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
++#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
+
+ # Interface to the Expat XML parser
+ #
+diff -uar Python-3.1.2.orig//Modules/getpath.c Python-3.1.2/Modules/getpath.c
+--- Python-3.1.2.orig//Modules/getpath.c 2009-02-12 17:55:38.000000000 +0200
++++ Python-3.1.2/Modules/getpath.c 2010-05-30 16:46:30.000000000 +0300
+@@ -117,8 +117,8 @@
+ #endif
+
+ #ifndef PYTHONPATH
+-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
+- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
++#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \
++ EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload"
+ #endif
+
+ #ifndef LANDMARK
+@@ -129,7 +129,7 @@
+ static wchar_t exec_prefix[MAXPATHLEN+1];
+ static wchar_t progpath[MAXPATHLEN+1];
+ static wchar_t *module_search_path = NULL;
+-static wchar_t lib_python[] = L"lib/python" VERSION;
++static wchar_t lib_python[] = L"lib64/python" VERSION;
+
+ /* In principle, this should use HAVE__WSTAT, and _wstat
+ should be detected by autoconf. However, no current
+@@ -603,7 +603,7 @@
+ }
+ else
+ wcsncpy(zip_path, L"" PREFIX, MAXPATHLEN);
+- joinpath(zip_path, L"lib/python00.zip");
++ joinpath(zip_path, L"lib64/python00.zip");
+ bufsz = wcslen(zip_path); /* Replace "00" with version */
+ zip_path[bufsz - 6] = VERSION[0];
+ zip_path[bufsz - 5] = VERSION[2];
+@@ -613,7 +613,7 @@
+ fprintf(stderr,
+ "Could not find platform dependent libraries <exec_prefix>\n");
+ wcsncpy(exec_prefix, L"" EXEC_PREFIX, MAXPATHLEN);
+- joinpath(exec_prefix, L"lib/lib-dynload");
++ joinpath(exec_prefix, L"lib64/lib-dynload");
+ }
+ /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
+
+diff -uar Python-3.1.2.orig//setup.py Python-3.1.2/setup.py
+--- Python-3.1.2.orig//setup.py 2010-01-01 18:29:51.000000000 +0200
++++ Python-3.1.2/setup.py 2010-05-30 17:03:54.000000000 +0300
+@@ -295,7 +295,7 @@
+
+ def detect_modules(self):
+ # Ensure that /usr/local is always used
+- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
+ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+
+ # Add paths specified in the environment variables LDFLAGS and
+@@ -522,11 +522,11 @@
+ elif self.compiler.find_library_file(lib_dirs, 'curses'):
+ readline_libs.append('curses')
+ elif self.compiler.find_library_file(lib_dirs +
+- ['/usr/lib/termcap'],
++ ['/usr/lib64/termcap'],
+ 'termcap'):
+ readline_libs.append('termcap')
+ exts.append( Extension('readline', ['readline.c'],
+- library_dirs=['/usr/lib/termcap'],
++ library_dirs=['/usr/lib64/termcap'],
+ extra_link_args=readline_extra_link_args,
+ libraries=readline_libs) )
+ else:
+@@ -563,8 +563,8 @@
+ if krb5_h:
+ ssl_incs += krb5_h
+ ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
+- ['/usr/local/ssl/lib',
+- '/usr/contrib/ssl/lib/'
++ ['/usr/local/ssl/lib64',
++ '/usr/contrib/ssl/lib64/'
+ ] )
+
+ if (ssl_incs is not None and
diff --git a/development/python3/python3.SlackBuild b/development/python3/python3.SlackBuild
index 6461c9475564e..c51b4110d77c1 100644
--- a/development/python3/python3.SlackBuild
+++ b/development/python3/python3.SlackBuild
@@ -5,7 +5,7 @@
# Based on Patrick Volkerding's official build script for python
PRGNAM=python3
-VERSION=${VERSION:-3.1.1}
+VERSION=${VERSION:-3.1.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -33,7 +33,6 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
else
- SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
@@ -50,6 +49,16 @@ cd $TMP
rm -rf Python-$VERSION
tar xvf $CWD/Python-$VERSION.tar.bz2
cd Python-$VERSION
+
+patch -p1 < $CWD/patches/python3.readline.set_pre_input_hook.diff
+
+if [ "$ARCH" = "x86_64" ]; then
+ # Install to lib64 instead of lib:
+ patch -p1< $CWD/patches/python3.x86_64.diff
+ # Python must report /usr/lib64/python3.1/site-packages as python_lib_dir:
+ patch -p1 < $CWD/patches/python3.pure64.diff
+fi
+
chown -R root:root .
chmod -R u+w,go+r-w,a-s+X .
@@ -65,16 +74,8 @@ chmod -R u+w,go+r-w,a-s+X .
--with-computed-gotos \
--build=$ARCH-slackware-linux
-# --libdir seems to be ignored - Makefile.pre.in has it hardcoded as
-# LIBDIR = $(exec_prefix)/lib and besides, there's also a SCRIPTDIR
-# that should probably be /usr/lib64 as well
-make \
- LIBDIR=/usr/lib${LIBDIRSUFFIX} \
- SCRIPTDIR=/usr/lib${LIBDIRSUFFIX}
-make altinstall \
- LIBDIR=/usr/lib${LIBDIRSUFFIX} \
- SCRIPTDIR=/usr/lib${LIBDIRSUFFIX} \
- DESTDIR=$PKG
+make
+make altinstall DESTDIR=$PKG
# Install some python-demo files:
mkdir -p $PKG/usr/doc/python3-$VERSION
@@ -86,9 +87,7 @@ cp -a Tools/* $SITEPK
mkdir -p $PKG/usr/doc/python3-$VERSION
mv $SITEPK/README $PKG/usr/doc/python3-$VERSION/README.python-tools
-( cd $PKG/usr/doc/python3-$VERSION
- ln -sf $TOOLSDIR Tools
-)
+( cd $PKG/usr/doc/python3-$VERSION ; ln -sf $TOOLSDIR Tools )
# Install docs:
mkdir -p $PKG/usr/doc/python3-$VERSION
@@ -99,13 +98,14 @@ cp -a Doc $PKG/usr/doc/python3-$VERSION
# Python 2.6 already has this script.
rm -f $PKG/usr/bin/2to3
+# Create a symlink for convenience.
+( cd $PKG/usr/bin ; ln -sf python3.1 python3 )
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
-)
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/development/python3/python3.info b/development/python3/python3.info
index cec49a6385384..13ffdb1e6ce2c 100644
--- a/development/python3/python3.info
+++ b/development/python3/python3.info
@@ -1,10 +1,10 @@
PRGNAM="python3"
-VERSION="3.1.1"
+VERSION="3.1.2"
HOMEPAGE="http://python.org/"
-DOWNLOAD="http://python.org/ftp/python/3.1.1/Python-3.1.1.tar.bz2"
-MD5SUM="d1ddd9f16e3c6a51c7208f33518cd674"
+DOWNLOAD="http://python.org/ftp/python/3.1.2/Python-3.1.2.tar.bz2"
+MD5SUM="45350b51b58a46b029fb06c61257e350"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-MAINTAINER="Audrius Kazukauskas"
+MAINTAINER="Audrius Kažukauskas"
EMAIL="audrius@neutrino.lt"
APPROVED="rworkman"