Accepting request 82515 from devel:languages:python:Factory

- update to 2.7.2:
  * Bug fix only release, see
  http://hg.python.org/cpython/raw-file/eb3c9b74884c/Misc/NEWS
  for details
- introduce a pre_checkin.sh file that synchronizes
  patches between python and python-base
- rediff patches for 2.7.2
- replace kernel3 patch with the upstream solution
- dropped newslist.py from demos because of bad license
  (bnc#718009)

OBS-URL: https://build.opensuse.org/request/show/82515
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python?expand=0&rev=74
This commit is contained in:
Lars Vogdt 2011-09-20 07:35:17 +00:00 committed by Git OBS Bridge
commit 82283822ce
16 changed files with 420 additions and 542 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:80e387bcf57eae8ce26726753584fd63e060ec11682d1145af921e85fd612292
size 11722546

3
Python-2.7.2.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5057eb067eb5b5a6040dbd0e889e06550bde9ec041dadaa855ee9490034cbdab
size 11754834

11
pre_checkin.sh Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
# This script is called automatically during autobuild checkin.
for spec in python.spec; do
{ sed -n -e '1,/COMMON-PATCH-BEGIN/p' $spec
sed -n -e '/COMMON-PATCH-BEGIN/,/COMMON-PATCH-END/p' python-base.spec
sed -n -e '/COMMON-PATCH-END/,/COMMON-PREP-BEGIN/p' $spec
sed -n -e '/COMMON-PREP-BEGIN/,/COMMON-PREP-END/p' python-base.spec
sed -n -e '/COMMON-PREP-END/,$p' $spec;
} | uniq > $spec.tmp && mv $spec.tmp $spec
done

View File

@ -1,106 +0,0 @@
# HG changeset patch
# User Guido van Rossum <guido@python.org>
# Date 1301428435 25200
# Node ID b2934d98dac1f7b13cc6cc280f06d1aec3f6e80d
# Parent 1a5aab273332a7a379e35ed6f88400a110b5de0c# Parent 9eeda8e3a13f107a698f10b0a45ffc2c6bd710fb
Merge issue 11662 from 2.6.
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -161,6 +161,20 @@ Content-Type: text/html; charset=iso-885
finally:
self.unfakehttp()
+ def test_invalid_redirect(self):
+ # urlopen() should raise IOError for many error codes.
+ self.fakehttp("""HTTP/1.1 302 Found
+Date: Wed, 02 Jan 2008 03:03:54 GMT
+Server: Apache/1.3.33 (Debian GNU/Linux) mod_ssl/2.8.22 OpenSSL/0.9.7e
+Location: file:README
+Connection: close
+Content-Type: text/html; charset=iso-8859-1
+""")
+ try:
+ self.assertRaises(IOError, urllib.urlopen, "http://python.org/")
+ finally:
+ self.unfakehttp()
+
def test_empty_socket(self):
# urlopen() raises IOError if the underlying socket does not send any
# data. (#1680230)
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -969,6 +969,27 @@ class HandlerTests(unittest.TestCase):
self.assertEqual(count,
urllib2.HTTPRedirectHandler.max_redirections)
+ def test_invalid_redirect(self):
+ from_url = "http://example.com/a.html"
+ valid_schemes = ['http', 'https', 'ftp']
+ invalid_schemes = ['file', 'imap', 'ldap']
+ schemeless_url = "example.com/b.html"
+ h = urllib2.HTTPRedirectHandler()
+ o = h.parent = MockOpener()
+ req = Request(from_url)
+
+ for scheme in invalid_schemes:
+ invalid_url = scheme + '://' + schemeless_url
+ self.assertRaises(urllib2.HTTPError, h.http_error_302,
+ req, MockFile(), 302, "Security Loophole",
+ MockHeaders({"location": invalid_url}))
+
+ for scheme in valid_schemes:
+ valid_url = scheme + '://' + schemeless_url
+ h.http_error_302(req, MockFile(), 302, "That's fine",
+ MockHeaders({"location": valid_url}))
+ self.assertEqual(o.req.get_full_url(), valid_url)
+
def test_cookie_redirect(self):
# cookies shouldn't leak into redirected requests
from cookielib import CookieJar
diff --git a/Lib/urllib.py b/Lib/urllib.py
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -644,6 +644,18 @@ class FancyURLopener(URLopener):
fp.close()
# In case the server sent a relative URL, join with original:
newurl = basejoin(self.type + ":" + url, newurl)
+
+ # For security reasons we do not allow redirects to protocols
+ # other than HTTP, HTTPS or FTP.
+ newurl_lower = newurl.lower()
+ if not (newurl_lower.startswith('http://') or
+ newurl_lower.startswith('https://') or
+ newurl_lower.startswith('ftp://')):
+ raise IOError('redirect error', errcode,
+ errmsg + " - Redirection to url '%s' is not allowed" %
+ newurl,
+ headers)
+
return self.open(newurl)
def http_error_301(self, url, fp, errcode, errmsg, headers, data=None):
diff --git a/Lib/urllib2.py b/Lib/urllib2.py
--- a/Lib/urllib2.py
+++ b/Lib/urllib2.py
@@ -578,6 +578,17 @@ class HTTPRedirectHandler(BaseHandler):
newurl = urlparse.urljoin(req.get_full_url(), newurl)
+ # For security reasons we do not allow redirects to protocols
+ # other than HTTP, HTTPS or FTP.
+ newurl_lower = newurl.lower()
+ if not (newurl_lower.startswith('http://') or
+ newurl_lower.startswith('https://') or
+ newurl_lower.startswith('ftp://')):
+ raise HTTPError(newurl, code,
+ msg + " - Redirection to url '%s' is not allowed" %
+ newurl,
+ headers, fp)
+
# XXX Probably want to forget about the state of the current
# request, although that might interact poorly with other
# handlers that also use handler-specific request attributes

View File

@ -1,37 +0,0 @@
diff -up Python-2.7/Makefile.pre.in.fix-parallel-make Python-2.7/Makefile.pre.in
--- Python-2.7/Makefile.pre.in.fix-parallel-make 2010-07-22 15:01:39.567996932 -0400
+++ Python-2.7/Makefile.pre.in 2010-07-22 15:47:02.437998509 -0400
@@ -207,6 +207,7 @@ SIGNAL_OBJS= @SIGNAL_OBJS@
##########################################################################
# Grammar
+GRAMMAR_STAMP= $(srcdir)/grammar-stamp
GRAMMAR_H= $(srcdir)/Include/graminit.h
GRAMMAR_C= $(srcdir)/Python/graminit.c
GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
@@ -530,10 +531,24 @@ Modules/getpath.o: $(srcdir)/Modules/get
Modules/python.o: $(srcdir)/Modules/python.c
$(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c
+# GNU "make" interprets rules with two dependents as two copies of the rule.
+#
+# In a parallel build this can lead to pgen being run twice, once for each of
+# GRAMMAR_H and GRAMMAR_C, leading to race conditions in which the compiler
+# reads a partially-overwritten copy of one of these files, leading to syntax
+# errors (or linker errors if the fragment happens to be syntactically valid C)
+#
+# See http://www.gnu.org/software/hello/manual/automake/Multiple-Outputs.html
+# for more information
+#
+# Introduce ".grammar-stamp" as a contrived single output from PGEN to avoid
+# this:
+$(GRAMMAR_H) $(GRAMMAR_C): $(GRAMMAR_STAMP)
-$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
+$(GRAMMAR_STAMP): $(PGEN) $(GRAMMAR_INPUT)
-@$(INSTALL) -d Include
-$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ touch $(GRAMMAR_STAMP)
$(PGEN): $(PGENOBJS)
$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)

View File

@ -1,21 +0,0 @@
Index: Python-3.2/Makefile.pre.in
===================================================================
--- Python-3.2.orig/Makefile.pre.in
+++ Python-3.2/Makefile.pre.in
@@ -554,7 +554,15 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
$(SIGNAL_OBJS) \
$(MODOBJS) \
$(srcdir)/Modules/getbuildinfo.c
- $(CC) -c $(PY_CFLAGS) -DSVNVERSION="\"`LC_ALL=C $(SVNVERSION)`\"" -o $@ $(srcdir)/Modules/getbuildinfo.c
+ $(CC) -c $(PY_CFLAGS) -DSVNVERSION="\"`LC_ALL=C $(SVNVERSION)`\"" \
+ -DDATE="\"`LC_ALL=C date -u -r Makefile.pre.in +"%b %d %Y"`\"" \
+ -DTIME="\"`LC_ALL=C date -u -r Makefile.pre.in +"%T"`\"" \
+ -o $@ $(srcdir)/Modules/getbuildinfo.c
+
+Python/getcompiler.o: $(srcdir)/Python/getcompiler.c Makefile
+ $(CC) -c $(PY_CFLAGS) \
+ -DCOMPILER='"[GCC]"' \
+ -o $@ $(srcdir)/Python/getcompiler.c
Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
$(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \

View File

@ -1,20 +0,0 @@
--- Python-2.7.1/setup.py 2011/07/10 23:56:34 1.1
+++ Python-2.7.1/setup.py 2011/07/10 23:57:47
@@ -1454,14 +1454,14 @@
# Platform-specific libraries
- if platform == 'linux2':
+ if (platform in ('linux2', 'linux3')):
# Linux-specific modules
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
else:
missing.append('linuxaudiodev')
- if (platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
- 'freebsd7', 'freebsd8')
+ if (platform in ('linux2', 'linux3', 'freebsd4', 'freebsd5',
+ 'freebsd6', 'freebsd7', 'freebsd8')
or platform.startswith("gnukfreebsd")):
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
else:

View File

@ -0,0 +1,12 @@
Index: Python-2.7.1/Lib/urllib.py
===================================================================
--- Python-2.7.1.orig/Lib/urllib.py
+++ Python-2.7.1/Lib/urllib.py
@@ -1350,6 +1350,7 @@ def proxy_bypass_environment(host):
hostonly, port = splitport(host)
# check if the host ends with any of the DNS suffixes
for name in no_proxy.split(','):
+ name = name.strip()
if name and (hostonly.endswith(name) or host.endswith(name)):
return 1
# otherwise, don't bypass

View File

@ -0,0 +1,18 @@
--- Makefile.pre.in
+++ Makefile.pre.in
@@ -524,8 +524,15 @@
-DHGVERSION="\"`LC_ALL=C $(HGVERSION)`\"" \
-DHGTAG="\"`LC_ALL=C $(HGTAG)`\"" \
-DHGBRANCH="\"`LC_ALL=C $(HGBRANCH)`\"" \
+ -DDATE="\"`LC_ALL=C date -u -r Makefile.pre.in +"%b %d %Y"`\"" \
+ -DTIME="\"`LC_ALL=C date -u -r Makefile.pre.in +"%T"`\"" \
-o $@ $(srcdir)/Modules/getbuildinfo.c
+Python/getcompiler.o: $(srcdir)/Python/getcompiler.c Makefile
+ $(CC) -c $(PY_CFLAGS) \
+ -DCOMPILER='"[GCC]"' \
+ -o $@ $(srcdir)/Python/getcompiler.c
+
Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
$(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
-DPREFIX='"$(prefix)"' \

21
python-2.7.2-linux3.patch Normal file
View File

@ -0,0 +1,21 @@
--- configure.in
+++ configure.in
@@ -293,6 +293,7 @@
MACHDEP="$ac_md_system$ac_md_release"
case $MACHDEP in
+ linux*) MACHDEP="linux2";;
cygwin*) MACHDEP="cygwin";;
darwin*) MACHDEP="darwin";;
atheos*) MACHDEP="atheos";;
--- Misc/NEWS
+++ Misc/NEWS
@@ -1,6 +1,8 @@
Python News
+++++++++++
+- Issue #12326: sys.platform is now always 'linux2' on Linux, even if Python
+ is compiled on Linux 3.
What's New in Python 2.7.2?
===========================

View File

@ -1,235 +1,6 @@
Index: Python-2.7.1/Include/pythonrun.h --- configure.in
=================================================================== +++ configure.in
--- Python-2.7.1.orig/Include/pythonrun.h @@ -629,6 +629,41 @@
+++ Python-2.7.1/Include/pythonrun.h
@@ -108,6 +108,8 @@ PyAPI_FUNC(char *) Py_GetPath(void);
/* In their own files */
PyAPI_FUNC(const char *) Py_GetVersion(void);
PyAPI_FUNC(const char *) Py_GetPlatform(void);
+PyAPI_FUNC(const char *) Py_GetArch(void);
+PyAPI_FUNC(const char *) Py_GetLib(void);
PyAPI_FUNC(const char *) Py_GetCopyright(void);
PyAPI_FUNC(const char *) Py_GetCompiler(void);
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
Index: Python-2.7.1/Lib/distutils/command/install.py
===================================================================
--- Python-2.7.1.orig/Lib/distutils/command/install.py
+++ Python-2.7.1/Lib/distutils/command/install.py
@@ -22,6 +22,8 @@ from site import USER_BASE
from site import USER_SITE
+libname = sys.lib
+
if sys.version < "2.2":
WINDOWS_SCHEME = {
'purelib': '$base',
@@ -42,7 +44,7 @@ else:
INSTALL_SCHEMES = {
'unix_prefix': {
'purelib': '$base/lib/python$py_version_short/site-packages',
- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
+ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
'headers': '$base/include/python$py_version_short/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
Index: Python-2.7.1/Lib/distutils/sysconfig.py
===================================================================
--- Python-2.7.1.orig/Lib/distutils/sysconfig.py
+++ Python-2.7.1/Lib/distutils/sysconfig.py
@@ -114,8 +114,11 @@ def get_python_lib(plat_specific=0, stan
prefix = plat_specific and EXEC_PREFIX or PREFIX
if os.name == "posix":
- libpython = os.path.join(prefix,
- "lib", "python" + get_python_version())
+ if plat_specific or standard_lib:
+ lib = sys.lib
+ else:
+ lib = "lib"
+ libpython = os.path.join(prefix, lib, "python" + get_python_version())
if standard_lib:
return libpython
else:
Index: Python-2.7.1/Lib/pydoc.py
===================================================================
--- Python-2.7.1.orig/Lib/pydoc.py
+++ Python-2.7.1/Lib/pydoc.py
@@ -349,7 +349,7 @@ class Doc:
docloc = os.environ.get("PYTHONDOCS",
"http://docs.python.org/library")
- basedir = os.path.join(sys.exec_prefix, "lib",
+ basedir = os.path.join(sys.exec_prefix, sys.lib,
"python"+sys.version[0:3])
if (isinstance(object, type(os)) and
(object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
Index: Python-2.7.1/Lib/site.py
===================================================================
--- Python-2.7.1.orig/Lib/site.py
+++ Python-2.7.1/Lib/site.py
@@ -290,13 +290,18 @@ def getsitepackages():
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
elif os.sep == '/':
- sitepackages.append(os.path.join(prefix, "lib",
+ sitepackages.append(os.path.join(prefix, sys.lib,
"python" + sys.version[:3],
"site-packages"))
- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
+ if sys.lib != "lib":
+ sitepackages.append(os.path.join(prefix, "lib",
+ "python" + sys.version[:3],
+ "site-packages"))
+ sitepackages.append(os.path.join(prefix, "lib", "site-python"))
else:
sitepackages.append(prefix)
- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
if sys.platform == "darwin":
# for framework builds *only* we add the standard Apple
# locations.
Index: Python-2.7.1/Lib/test/test_dl.py
===================================================================
--- Python-2.7.1.orig/Lib/test/test_dl.py
+++ Python-2.7.1/Lib/test/test_dl.py
@@ -5,10 +5,11 @@
import unittest
from test.test_support import verbose, import_module
dl = import_module('dl', deprecated=True)
+import sys
sharedlibs = [
- ('/usr/lib/libc.so', 'getpid'),
- ('/lib/libc.so.6', 'getpid'),
+ ('/usr/'+sys.lib+'/libc.so', 'getpid'),
+ ('/'+sys.lib+'/libc.so.6', 'getpid'),
('/usr/bin/cygwin1.dll', 'getpid'),
('/usr/lib/libc.dylib', 'getpid'),
]
Index: Python-2.7.1/Lib/trace.py
===================================================================
--- Python-2.7.1.orig/Lib/trace.py
+++ Python-2.7.1/Lib/trace.py
@@ -762,10 +762,10 @@ def main(argv=None):
# should I also call expanduser? (after all, could use $HOME)
s = s.replace("$prefix",
- os.path.join(sys.prefix, "lib",
+ os.path.join(sys.prefix, sys.lib,
"python" + sys.version[:3]))
s = s.replace("$exec_prefix",
- os.path.join(sys.exec_prefix, "lib",
+ os.path.join(sys.exec_prefix, sys.lib,
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
Index: Python-2.7.1/Makefile.pre.in
===================================================================
--- Python-2.7.1.orig/Makefile.pre.in
+++ Python-2.7.1/Makefile.pre.in
@@ -78,6 +78,8 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
+LIB= @LIB@
+ARCH= @ARCH@
# Install prefix for architecture-independent files
prefix= @prefix@
@@ -530,6 +532,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
+ -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' \
-o $@ $(srcdir)/Modules/getpath.c
Modules/python.o: $(srcdir)/Modules/python.c
@@ -561,7 +564,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
Python/getplatform.o: $(srcdir)/Python/getplatform.c
- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
+ $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
Index: Python-2.7.1/Modules/getpath.c
===================================================================
--- Python-2.7.1.orig/Modules/getpath.c
+++ Python-2.7.1/Modules/getpath.c
@@ -116,9 +116,11 @@
#define EXEC_PREFIX PREFIX
#endif
+#define LIB_PYTHON LIB "/python" VERSION
+
#ifndef PYTHONPATH
-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
+#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \
+ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
#endif
#ifndef LANDMARK
@@ -129,7 +131,7 @@ static char prefix[MAXPATHLEN+1];
static char exec_prefix[MAXPATHLEN+1];
static char progpath[MAXPATHLEN+1];
static char *module_search_path = NULL;
-static char lib_python[] = "lib/python" VERSION;
+static char lib_python[] = LIB_PYTHON;
static void
reduce(char *dir)
Index: Python-2.7.1/Python/getplatform.c
===================================================================
--- Python-2.7.1.orig/Python/getplatform.c
+++ Python-2.7.1/Python/getplatform.c
@@ -10,3 +10,23 @@ Py_GetPlatform(void)
{
return PLATFORM;
}
+
+#ifndef ARCH
+#define ARCH "unknown"
+#endif
+
+const char *
+Py_GetArch(void)
+{
+ return ARCH;
+}
+
+#ifndef LIB
+#define LIB "lib"
+#endif
+
+const char *
+Py_GetLib(void)
+{
+ return LIB;
+}
Index: Python-2.7.1/Python/sysmodule.c
===================================================================
--- Python-2.7.1.orig/Python/sysmodule.c
+++ Python-2.7.1/Python/sysmodule.c
@@ -1470,6 +1470,10 @@ _PySys_Init(void)
PyString_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
PyString_FromString(Py_GetPlatform()));
+ SET_SYS_FROM_STRING("arch",
+ PyString_FromString(Py_GetArch()));
+ SET_SYS_FROM_STRING("lib",
+ PyString_FromString(Py_GetLib()));
SET_SYS_FROM_STRING("executable",
PyString_FromString(Py_GetProgramFullPath()));
SET_SYS_FROM_STRING("prefix",
Index: Python-2.7.1/configure.in
===================================================================
--- Python-2.7.1.orig/configure.in
+++ Python-2.7.1/configure.in
@@ -636,6 +636,41 @@ SunOS*)
;; ;;
esac esac
@ -271,20 +42,275 @@ Index: Python-2.7.1/configure.in
AC_SUBST(LIBRARY) AC_SUBST(LIBRARY)
AC_MSG_CHECKING(LIBRARY) AC_MSG_CHECKING(LIBRARY)
Index: Python-2.7.1/setup.py --- Include/pythonrun.h
=================================================================== +++ Include/pythonrun.h
--- Python-2.7.1.orig/setup.py @@ -108,6 +108,8 @@
+++ Python-2.7.1/setup.py /* In their own files */
@@ -347,7 +347,7 @@ class PyBuildExt(build_ext): PyAPI_FUNC(const char *) Py_GetVersion(void);
PyAPI_FUNC(const char *) Py_GetPlatform(void);
+PyAPI_FUNC(const char *) Py_GetArch(void);
+PyAPI_FUNC(const char *) Py_GetLib(void);
PyAPI_FUNC(const char *) Py_GetCopyright(void);
PyAPI_FUNC(const char *) Py_GetCompiler(void);
PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
--- Lib/distutils/command/install.py
+++ Lib/distutils/command/install.py
@@ -22,6 +22,8 @@
from site import USER_SITE
+libname = sys.lib
+
if sys.version < "2.2":
WINDOWS_SCHEME = {
'purelib': '$base',
@@ -42,7 +44,7 @@
INSTALL_SCHEMES = {
'unix_prefix': {
'purelib': '$base/lib/python$py_version_short/site-packages',
- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
+ 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages',
'headers': '$base/include/python$py_version_short/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
--- Lib/distutils/sysconfig.py
+++ Lib/distutils/sysconfig.py
@@ -114,8 +114,11 @@
prefix = plat_specific and EXEC_PREFIX or PREFIX
if os.name == "posix":
- libpython = os.path.join(prefix,
- "lib", "python" + get_python_version())
+ if plat_specific or standard_lib:
+ lib = sys.lib
+ else:
+ lib = "lib"
+ libpython = os.path.join(prefix, lib, "python" + get_python_version())
if standard_lib:
return libpython
else:
--- Lib/pydoc.py
+++ Lib/pydoc.py
@@ -352,7 +352,7 @@
docloc = os.environ.get("PYTHONDOCS",
"http://docs.python.org/library")
- basedir = os.path.join(sys.exec_prefix, "lib",
+ basedir = os.path.join(sys.exec_prefix, sys.lib,
"python"+sys.version[0:3])
if (isinstance(object, type(os)) and
(object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
--- Lib/site.py
+++ Lib/site.py
@@ -300,13 +300,18 @@
if sys.platform in ('os2emx', 'riscos'):
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
elif os.sep == '/':
- sitepackages.append(os.path.join(prefix, "lib",
+ sitepackages.append(os.path.join(prefix, sys.lib,
"python" + sys.version[:3],
"site-packages"))
- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
+ if sys.lib != "lib":
+ sitepackages.append(os.path.join(prefix, "lib",
+ "python" + sys.version[:3],
+ "site-packages"))
+ sitepackages.append(os.path.join(prefix, "lib", "site-python"))
else:
sitepackages.append(prefix)
- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
if sys.platform == "darwin":
# for framework builds *only* we add the standard Apple
# locations.
--- Lib/sysconfig.py
+++ Lib/sysconfig.py
@@ -7,10 +7,10 @@
_INSTALL_SCHEMES = {
'posix_prefix': {
- 'stdlib': '{base}/lib/python{py_version_short}',
- 'platstdlib': '{platbase}/lib/python{py_version_short}',
+ 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}',
+ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}',
'purelib': '{base}/lib/python{py_version_short}/site-packages',
- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
+ 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
'include': '{base}/include/python{py_version_short}',
'platinclude': '{platbase}/include/python{py_version_short}',
'scripts': '{base}/bin',
@@ -65,10 +65,10 @@
'data' : '{userbase}',
},
'posix_user': {
- 'stdlib': '{userbase}/lib/python{py_version_short}',
- 'platstdlib': '{userbase}/lib/python{py_version_short}',
+ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
+ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
+ 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data' : '{userbase}',
--- Lib/test/test_dl.py
+++ Lib/test/test_dl.py
@@ -5,10 +5,11 @@
import unittest
from test.test_support import verbose, import_module
dl = import_module('dl', deprecated=True)
+import sys
sharedlibs = [
- ('/usr/lib/libc.so', 'getpid'),
- ('/lib/libc.so.6', 'getpid'),
+ ('/usr/'+sys.lib+'/libc.so', 'getpid'),
+ ('/'+sys.lib+'/libc.so.6', 'getpid'),
('/usr/bin/cygwin1.dll', 'getpid'),
('/usr/lib/libc.dylib', 'getpid'),
]
--- Lib/test/test_site.py
+++ Lib/test/test_site.py
@@ -227,12 +227,16 @@
wanted = os.path.join('xoxo', 'Lib', 'site-packages')
self.assertEqual(dirs[0], wanted)
elif os.sep == '/':
- self.assertEqual(len(dirs), 2)
wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
'site-packages')
- self.assertEqual(dirs[0], wanted)
+ self.assertTrue(wanted in dirs)
wanted = os.path.join('xoxo', 'lib', 'site-python')
- self.assertEqual(dirs[1], wanted)
+ self.assertTrue(wanted in dirs)
+ wanted = os.path.join('xoxo', sys.lib, 'python' + sys.version[:3],
+ 'site-packages')
+ self.assertTrue(wanted in dirs)
+ wanted = os.path.join('xoxo', sys.lib, 'site-python')
+ self.assertTrue(wanted in dirs)
else:
self.assertEqual(len(dirs), 2)
self.assertEqual(dirs[0], 'xoxo')
--- Lib/trace.py
+++ Lib/trace.py
@@ -762,10 +762,10 @@
# should I also call expanduser? (after all, could use $HOME)
s = s.replace("$prefix",
- os.path.join(sys.prefix, "lib",
+ os.path.join(sys.prefix, sys.lib,
"python" + sys.version[:3]))
s = s.replace("$exec_prefix",
- os.path.join(sys.exec_prefix, "lib",
+ os.path.join(sys.exec_prefix, sys.lib,
"python" + sys.version[:3]))
s = os.path.normpath(s)
ignore_dirs.append(s)
--- Makefile.pre.in
+++ Makefile.pre.in
@@ -81,6 +81,8 @@
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
+LIB= @LIB@
+ARCH= @ARCH@
# Install prefix for architecture-independent files
prefix= @prefix@
@@ -532,6 +534,7 @@
-DEXEC_PREFIX='"$(exec_prefix)"' \
-DVERSION='"$(VERSION)"' \
-DVPATH='"$(VPATH)"' \
+ -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' \
-o $@ $(srcdir)/Modules/getpath.c
Modules/python.o: $(srcdir)/Modules/python.c
@@ -566,7 +569,7 @@
Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
Python/getplatform.o: $(srcdir)/Python/getplatform.c
- $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c
+ $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c
Python/importdl.o: $(srcdir)/Python/importdl.c
$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
--- Modules/getpath.c
+++ Modules/getpath.c
@@ -116,9 +116,11 @@
#define EXEC_PREFIX PREFIX
#endif
+#define LIB_PYTHON LIB "/python" VERSION
+
#ifndef PYTHONPATH
-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
+#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \
+ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
#endif
#ifndef LANDMARK
@@ -129,7 +131,7 @@
static char exec_prefix[MAXPATHLEN+1];
static char progpath[MAXPATHLEN+1];
static char *module_search_path = NULL;
-static char lib_python[] = "lib/python" VERSION;
+static char lib_python[] = LIB_PYTHON;
static void
reduce(char *dir)
--- Python/getplatform.c
+++ Python/getplatform.c
@@ -10,3 +10,23 @@
{
return PLATFORM;
}
+
+#ifndef ARCH
+#define ARCH "unknown"
+#endif
+
+const char *
+Py_GetArch(void)
+{
+ return ARCH;
+}
+
+#ifndef LIB
+#define LIB "lib"
+#endif
+
+const char *
+Py_GetLib(void)
+{
+ return LIB;
+}
--- Python/sysmodule.c
+++ Python/sysmodule.c
@@ -1416,6 +1416,10 @@
PyString_FromString(Py_GetCopyright()));
SET_SYS_FROM_STRING("platform",
PyString_FromString(Py_GetPlatform()));
+ SET_SYS_FROM_STRING("arch",
+ PyString_FromString(Py_GetArch()));
+ SET_SYS_FROM_STRING("lib",
+ PyString_FromString(Py_GetLib()));
SET_SYS_FROM_STRING("executable",
PyString_FromString(Py_GetProgramFullPath()));
SET_SYS_FROM_STRING("prefix",
--- setup.py
+++ setup.py
@@ -369,7 +369,7 @@
def detect_modules(self): def detect_modules(self):
# Ensure that /usr/local is always used # 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/lib')
+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/' + sys.lib) + add_dir_to_list(self.compiler.library_dirs, '/usr/local/' + sys.lib)
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
self.add_multiarch_paths()
# Add paths specified in the environment variables LDFLAGS and @@ -427,8 +427,7 @@
@@ -404,8 +404,7 @@ class PyBuildExt(build_ext):
# if a file is found in one of those directories, it can # if a file is found in one of those directories, it can
# be assumed that no additional -I,-L directives are needed. # be assumed that no additional -I,-L directives are needed.
lib_dirs = self.compiler.library_dirs + [ lib_dirs = self.compiler.library_dirs + [
@ -294,7 +320,7 @@ Index: Python-2.7.1/setup.py
] ]
inc_dirs = self.compiler.include_dirs + ['/usr/include'] inc_dirs = self.compiler.include_dirs + ['/usr/include']
exts = [] exts = []
@@ -654,11 +653,11 @@ class PyBuildExt(build_ext): @@ -677,11 +676,11 @@
elif curses_library: elif curses_library:
readline_libs.append(curses_library) readline_libs.append(curses_library)
elif self.compiler.find_library_file(lib_dirs + elif self.compiler.find_library_file(lib_dirs +
@ -308,7 +334,7 @@ Index: Python-2.7.1/setup.py
extra_link_args=readline_extra_link_args, extra_link_args=readline_extra_link_args,
libraries=readline_libs) ) libraries=readline_libs) )
else: else:
@@ -1730,18 +1729,17 @@ class PyBuildExt(build_ext): @@ -1753,18 +1752,17 @@
# Check for various platform-specific directories # Check for various platform-specific directories
if platform == 'sunos5': if platform == 'sunos5':
include_dirs.append('/usr/openwin/include') include_dirs.append('/usr/openwin/include')
@ -331,59 +357,3 @@ Index: Python-2.7.1/setup.py
# If Cygwin, then verify that X is installed before proceeding # If Cygwin, then verify that X is installed before proceeding
if platform == 'cygwin': if platform == 'cygwin':
Index: Python-2.7.1/Lib/test/test_site.py
===================================================================
--- Python-2.7.1.orig/Lib/test/test_site.py
+++ Python-2.7.1/Lib/test/test_site.py
@@ -169,12 +169,16 @@ class HelperFunctionsTests(unittest.Test
wanted = os.path.join('xoxo', 'Lib', 'site-packages')
self.assertEqual(dirs[0], wanted)
elif os.sep == '/':
- self.assertEqual(len(dirs), 2)
wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
'site-packages')
- self.assertEqual(dirs[0], wanted)
+ self.assertTrue(wanted in dirs)
wanted = os.path.join('xoxo', 'lib', 'site-python')
- self.assertEqual(dirs[1], wanted)
+ self.assertTrue(wanted in dirs)
+ wanted = os.path.join('xoxo', sys.lib, 'python' + sys.version[:3],
+ 'site-packages')
+ self.assertTrue(wanted in dirs)
+ wanted = os.path.join('xoxo', sys.lib, 'site-python')
+ self.assertTrue(wanted in dirs)
else:
self.assertEqual(len(dirs), 2)
self.assertEqual(dirs[0], 'xoxo')
Index: Python-2.7.1/Lib/sysconfig.py
===================================================================
--- Python-2.7.1.orig/Lib/sysconfig.py
+++ Python-2.7.1/Lib/sysconfig.py
@@ -7,10 +7,10 @@ from os.path import pardir, realpath
_INSTALL_SCHEMES = {
'posix_prefix': {
- 'stdlib': '{base}/lib/python{py_version_short}',
- 'platstdlib': '{platbase}/lib/python{py_version_short}',
+ 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}',
+ 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}',
'purelib': '{base}/lib/python{py_version_short}/site-packages',
- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
+ 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages',
'include': '{base}/include/python{py_version_short}',
'platinclude': '{platbase}/include/python{py_version_short}',
'scripts': '{base}/bin',
@@ -65,10 +65,10 @@ _INSTALL_SCHEMES = {
'data' : '{userbase}',
},
'posix_user': {
- 'stdlib': '{userbase}/lib/python{py_version_short}',
- 'platstdlib': '{userbase}/lib/python{py_version_short}',
+ 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
+ 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}',
'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
+ 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages',
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data' : '{userbase}',

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Fri Aug 19 22:37:42 CEST 2011 - dmueller@suse.de
- update to 2.7.2:
* Bug fix only release, see
http://hg.python.org/cpython/raw-file/eb3c9b74884c/Misc/NEWS
for details
- introduce a pre_checkin.sh file that synchronizes
patches between python and python-base
- rediff patches for 2.7.2
- replace kernel3 patch with the upstream solution
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jul 22 13:03:49 UTC 2011 - idonmez@novell.com Fri Jul 22 13:03:49 UTC 2011 - idonmez@novell.com

View File

@ -29,8 +29,8 @@ Obsoletes: python-64bit
%endif %endif
# #
Summary: Python Interpreter base package Summary: Python Interpreter base package
Version: 2.7.1 Version: 2.7.2
Release: 4 Release: 1
%define tarversion %{version} %define tarversion %{version}
%define tarname Python-%{tarversion} %define tarname Python-%{tarversion}
Source0: %{tarname}.tar.bz2 Source0: %{tarname}.tar.bz2
@ -39,26 +39,28 @@ Source2: baselibs.conf
Source3: README.SUSE Source3: README.SUSE
Source4: distutils.cfg Source4: distutils.cfg
Source5: _local.pth Source5: _local.pth
# COMMON-PATCH-BEGIN
Patch1: python-2.7-dirs.patch Patch1: python-2.7-dirs.patch
Patch2: python-distutils-rpm-8.patch Patch2: python-distutils-rpm-8.patch
Patch3: python-2.7.1-multilib.patch Patch3: python-2.7.2-multilib.patch
Patch4: python-2.7rc2-canonicalize2.patch Patch4: python-2.5.1-sqlite.patch
Patch5: python-2.7rc2-configure.patch Patch5: python-2.7rc2-canonicalize2.patch
Patch6: python-2.6-gettext-plurals.patch Patch6: python-2.7rc2-configure.patch
Patch7: python-2.7.1-distutils_test_path.patch Patch7: python-2.6-gettext-plurals.patch
Patch8: sparc_longdouble.patch Patch8: python-2.6b3-curses-panel.patch
Patch9: python-2.7.1-distutils_test_path.patch
Patch10: sparc_longdouble.patch
Patch11: python-2.7.2-linux3.patch
Patch12: http://psf.upfronthosting.co.za/roundup/tracker/file19029/python-test_structmembers.patch Patch12: http://psf.upfronthosting.co.za/roundup/tracker/file19029/python-test_structmembers.patch
Patch13: python-2.7.1-fix_date_time_compiler.patch Patch13: python-2.7.2-fix_date_time_compiler.patch
Patch14: python-2.7-CVE-2011-1521-fileurl.patch Patch14: python-2.7.1-urllib-noproxy.patch
Patch15: python-2.7-fix-parallel-make.patch # COMMON-PATCH-END
Patch16: python-2.7.1-linux3.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define python_version %(echo %{version} | head -c 3) %define python_version %(echo %{version} | head -c 3)
Provides: %{name} = %{python_version} Provides: %{name} = %{python_version}
# explicitly, see bnc#697251 # explicitly, see bnc#697251
Requires: libpython2_7-1_0 = %{version}-%{release} Requires: libpython2_7-1_0 = %{version}-%{release}
%description %description
Python is an interpreted, object-oriented programming language, and is Python is an interpreted, object-oriented programming language, and is
@ -137,19 +139,22 @@ Authors:
%prep %prep
%setup -q -n %{tarname} %setup -q -n %{tarname}
# patching # patching
# COMMON-PREP-BEGIN
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3
%patch4 %patch4
%patch5 %patch5
%patch6 %patch6
%patch7 -p1 %patch7
%patch8 -p1 %patch8
%patch9 -p1
%patch10 -p1
%patch11
%patch12 %patch12
%patch13 -p1 %patch13
%patch14 -p1 %patch14 -p1
%patch15 -p1 # COMMON-PREP-END
%patch16 -p1
# drop Autoconf version requirement # drop Autoconf version requirement
sed -i 's/^version_required/dnl version_required/' configure.in sed -i 's/^version_required/dnl version_required/' configure.in
@ -162,9 +167,6 @@ autoreconf -f -i . # Modules/_ctypes/libffi
# provide a stable timestamp # provide a stable timestamp
touch -r %{S:0} Makefile.pre.in touch -r %{S:0} Makefile.pre.in
# Cheat for kernel 3.0
cp -r Lib/plat-linux2 Lib/plat-linux3
# prevent make from trying to rebuild asdl stuff, which requires existing # prevent make from trying to rebuild asdl stuff, which requires existing
# python installation # python installation
touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h
@ -246,7 +248,7 @@ rm -f $CLEANUP_DIR/lib-dynload/imageop.so
rm -f $CLEANUP_DIR/lib-dynload/audioop.so rm -f $CLEANUP_DIR/lib-dynload/audioop.so
# remove various things that don't need to be in python-base # remove various things that don't need to be in python-base
rm $RPM_BUILD_ROOT%{_bindir}/idle rm $RPM_BUILD_ROOT%{_bindir}/idle
rm -r $CLEANUP_DIR/{curses,bsddb,idlelib,lib-tk,sqlite3} rm -rf $CLEANUP_DIR/{curses,bsddb,idlelib,lib-tk,sqlite3}
rm $CLEANUP_DIR/ssl.py* rm $CLEANUP_DIR/ssl.py*
# does not work without _ssl.so anyway # does not work without _ssl.so anyway
# replace duplicate .pyo/.pyc with hardlinks # replace duplicate .pyo/.pyc with hardlinks

View File

@ -24,8 +24,8 @@ Group: Development/Languages/Python
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Additional Package Documentation for Python. Summary: Additional Package Documentation for Python.
Version: 2.7 Version: 2.7
Release: 12 Release: 5
%define pyver 2.7.1 %define pyver 2.7.2
BuildArch: noarch BuildArch: noarch
%define tarname Python-%{pyver} %define tarname Python-%{pyver}
%define pyname python %define pyname python

View File

@ -1,8 +1,20 @@
-------------------------------------------------------------------
Fri Sep 16 16:21:44 UTC 2011 - jmatejek@suse.com
- dropped newslist.py from demos because of bad license
(bnc#718009)
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jul 11 01:59:56 CEST 2011 - ro@suse.de Mon Jul 11 01:59:56 CEST 2011 - ro@suse.de
- fix build on factory: setup reports linux3 not linux2 now, - update to 2.7.2:
adapt checks * Bug fix only release, see
http://hg.python.org/cpython/raw-file/eb3c9b74884c/Misc/NEWS
for details
- introduce a pre_checkin.sh file that synchronizes
patches between python and python-base
- rediff patches for 2.7.2
- replace kernel3 patch with the upstream solution
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 24 14:30:10 UTC 2011 - jmatejek@novell.com Tue May 24 14:30:10 UTC 2011 - jmatejek@novell.com

View File

@ -15,8 +15,6 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: python Name: python
BuildRequires: db-devel fdupes gdbm-devel gmp-devel libbz2-devel libopenssl-devel ncurses-devel readline-devel sqlite-devel tk-devel xorg-x11-devel BuildRequires: db-devel fdupes gdbm-devel gmp-devel libbz2-devel libopenssl-devel ncurses-devel readline-devel sqlite-devel tk-devel xorg-x11-devel
#Requires: openssl >= 0.9.8e #Requires: openssl >= 0.9.8e
@ -31,8 +29,8 @@ Obsoletes: python-64bit
# #
Obsoletes: python-nothreads python21 python-elementtree python-sqlite Obsoletes: python-nothreads python21 python-elementtree python-sqlite
Summary: Python Interpreter Summary: Python Interpreter
Version: 2.7.1 Version: 2.7.2
Release: 11 Release: 5
Requires: python-base = %{version} Requires: python-base = %{version}
%define tarversion %{version} %define tarversion %{version}
%define tarname Python-%{tarversion} %define tarname Python-%{tarversion}
@ -43,18 +41,28 @@ Source3: python.sh
Source4: python.csh Source4: python.csh
#Source11: testfiles.tar.bz2 #Source11: testfiles.tar.bz2
# issues with copyrighted Unicode testing files # issues with copyrighted Unicode testing files
Patch1: python-2.7-dirs.patch
Patch2: python-2.7.1-multilib.patch
Patch3: python-2.7rc2-canonicalize2.patch
Patch4: python-2.5.1-sqlite.patch
Patch5: python-2.7rc2-configure.patch
Patch6: python-2.6b3-curses-panel.patch
Patch7: sparc_longdouble.patch
Patch9: python-2.7.1-fix_date_time_compiler.patch
Patch10: python-2.7-fix-parallel-make.patch
Patch11: python-2.7.1-linux3.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# !!!!!!!!!!!!!!
# do not add or edit patches here. please edit python-base.spec
# instead and run pre_checkin.sh
# !!!!!!!!!!!!!!
# COMMON-PATCH-BEGIN
Patch1: python-2.7-dirs.patch
Patch2: python-distutils-rpm-8.patch
Patch3: python-2.7.2-multilib.patch
Patch4: python-2.5.1-sqlite.patch
Patch5: python-2.7rc2-canonicalize2.patch
Patch6: python-2.7rc2-configure.patch
Patch7: python-2.6-gettext-plurals.patch
Patch8: python-2.6b3-curses-panel.patch
Patch9: python-2.7.1-distutils_test_path.patch
Patch10: sparc_longdouble.patch
Patch11: python-2.7.2-linux3.patch
Patch12: http://psf.upfronthosting.co.za/roundup/tracker/file19029/python-test_structmembers.patch
Patch13: python-2.7.2-fix_date_time_compiler.patch
Patch14: python-2.7.1-urllib-noproxy.patch
# COMMON-PATCH-END
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define python_version %(echo %{version} | head -c 3) %define python_version %(echo %{version} | head -c 3)
%define idle_name idle %define idle_name idle
Provides: %{name} = %{python_version} Provides: %{name} = %{python_version}
@ -68,8 +76,6 @@ of Python in the documentation and tutorials included in the python-doc
If you want to install third party modules using distutils, you need to If you want to install third party modules using distutils, you need to
install python-devel package. install python-devel package.
Authors: Authors:
-------- --------
Guido van Rossum <guido@python.org> Guido van Rossum <guido@python.org>
@ -87,8 +93,6 @@ It features a multi-window text editor with multiple undo, Python
colorizing, and many other things, as well as a Python shell window and colorizing, and many other things, as well as a Python shell window and
a debugger. a debugger.
Authors: Authors:
-------- --------
Guido van Rossum <guido@python.org> Guido van Rossum <guido@python.org>
@ -106,8 +110,6 @@ AutoReqProv: on
Various demonstrations of what you can do with Python and a number of Various demonstrations of what you can do with Python and a number of
programs that are useful for building or extending Python. programs that are useful for building or extending Python.
Authors: Authors:
-------- --------
Guido van Rossum <guido@python.org> Guido van Rossum <guido@python.org>
@ -128,8 +130,6 @@ AutoReqProv: on
Python interface to Tk. Tk is the GUI toolkit that comes with Tcl. The Python interface to Tk. Tk is the GUI toolkit that comes with Tcl. The
"xrpm" package uses this Python interface. "xrpm" package uses this Python interface.
Authors: Authors:
-------- --------
Guido van Rossum <guido@python.org> Guido van Rossum <guido@python.org>
@ -147,8 +147,6 @@ AutoReqProv: on
An easy to use interface to the (n)curses CUI library. CUI stands for An easy to use interface to the (n)curses CUI library. CUI stands for
Console User Interface. Console User Interface.
Authors: Authors:
-------- --------
Guido van Rossum <guido@python.org> Guido van Rossum <guido@python.org>
@ -166,29 +164,35 @@ AutoReqProv: on
An easy to use interface for GDBM databases. GDBM is the GNU An easy to use interface for GDBM databases. GDBM is the GNU
implementation of the standard Unix DBM databases. implementation of the standard Unix DBM databases.
Authors: Authors:
-------- --------
Guido van Rossum <guido@python.org> Guido van Rossum <guido@python.org>
%prep %prep
%setup -q -n %{tarname} %setup -q -n %{tarname}
# patching # COMMON-PREP-BEGIN
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 %patch3
%patch4 %patch4
%patch5 %patch5
%patch6 %patch6
%patch7 -p1 %patch7
%patch8
%patch9 -p1 %patch9 -p1
%patch10 -p1 %patch10 -p1
%patch11 -p1 %patch11
%patch12
%patch13
%patch14 -p1
# COMMON-PREP-END
# drop Autoconf version requirement # drop Autoconf version requirement
sed -i 's/^version_required/dnl version_required/' configure.in sed -i 's/^version_required/dnl version_required/' configure.in
# remove newslist.py because of bad license
rm Demo/scripts/newslist.*
%build %build
# necessary for correct linking with GDBM: # necessary for correct linking with GDBM:
export SUSE_ASNEEDED=0 export SUSE_ASNEEDED=0