Kaydet (Commit) 49286faa authored tarafından Michael Stahl's avatar Michael Stahl

python: replaced by python3, so remove it

Change-Id: I3dc55f05502af56bd30825d297a6964295e6efa3
üst cf545e15
--- misc/Python-2.6.1/configure 2010-05-06 20:24:36.000000000 +0200
+++ misc/build/Python-2.6.1/configure 2010-05-06 20:25:17.000000000 +0200
@@ -4653,7 +4653,7 @@
if test "${enable_universalsdk}"; then
UNIVERSAL_ARCH_FLAGS=""
if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
- UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
+ UNIVERSAL_ARCH_FLAGS="-arch i386"
ARCH_RUN_32BIT=""
elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
--- misc/Python-2.6.1/configure 2010-05-06 20:24:36.000000000 +0200
+++ misc/build/Python-2.6.1/configure 2010-05-06 20:25:17.000000000 +0200
@@ -4653,7 +4653,7 @@
if test "${enable_universalsdk}"; then
UNIVERSAL_ARCH_FLAGS=""
if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
- UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
+ UNIVERSAL_ARCH_FLAGS="-arch ppc"
ARCH_RUN_32BIT=""
elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
--- misc/Python-2.6.1/Makefile.pre.in 2011-03-08 18:23:37.230410480 +0100
+++ misc/build/Python-2.6.1/Makefile.pre.in 2011-03-08 18:22:57.935746999 +0100
@@ -414,7 +414,7 @@
SONAME="-Wl,-h$(INSTSONAME)"; \
fi; \
$(LDSHARED) $(LDFLAGS) $(SONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
- $(LN) -f $(INSTSONAME) $@; \
+ $(LN) -fs $(INSTSONAME) $@; \
else\
$(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
fi
@@ -767,7 +767,7 @@
then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
else true; \
fi
- (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))
+ (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) $(PYTHON))
-rm -f $(DESTDIR)$(BINDIR)/python-config
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config)
http://bugs.python.org/issue2422 - adaption of the patch there to honour our G_SLICE
--- misc/Python-2.6.1/Objects/obmalloc.c 2011-07-26 13:10:12.668380720 +0100
+++ misc/build/Python-2.6.1/Objects/obmalloc.c 2011-07-26 13:17:41.951444953 +0100
@@ -1,7 +1,18 @@
#include "Python.h"
+#include <stdlib.h>
#ifdef WITH_PYMALLOC
+static int running_with_system_allocator = -1;
+
+/* If we're using GCC, use __builtin_expect() to reduce overhead of
+ the allocator checks */
+#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
+# define UNLIKELY(value) __builtin_expect((value), 0)
+#else
+# define UNLIKELY(value) (value)
+#endif
+
/* An object allocator for Python.
Here is an introduction to the layers of the Python memory architecture,
@@ -728,6 +739,11 @@
poolp next;
uint size;
+ if (UNLIKELY(running_with_system_allocator == -1))
+ running_with_system_allocator = (getenv("G_SLICE") != NULL);
+ if (UNLIKELY(running_with_system_allocator))
+ goto redirect;
+
/*
* Limit ourselves to PY_SSIZE_T_MAX bytes to prevent security holes.
* Most python internals blindly use a signed Py_ssize_t to track
@@ -927,6 +943,9 @@
if (p == NULL) /* free(NULL) has no effect */
return;
+ if (UNLIKELY(running_with_system_allocator > 0))
+ goto redirect;
+
pool = POOL_ADDR(p);
if (Py_ADDRESS_IN_RANGE(p, pool)) {
/* We allocated this address. */
@@ -1121,6 +1140,7 @@
return;
}
+redirect:
/* We didn't allocate this address. */
free(p);
}
@@ -1150,6 +1170,10 @@
if (nbytes > PY_SSIZE_T_MAX)
return NULL;
+ /* Treat running_with_system_allocator == -1 the same as 0 */
+ if (UNLIKELY(running_with_system_allocator > 0))
+ goto redirect;
+
pool = POOL_ADDR(p);
if (Py_ADDRESS_IN_RANGE(p, pool)) {
/* We're in charge of this block */
@@ -1177,6 +1201,7 @@
}
return bp;
}
+redirect:
/* We're not managing this block. If nbytes <=
* SMALL_REQUEST_THRESHOLD, it's tempting to try to take over this
* block. However, if we do, we need to copy the valid data from
--- misc/Python-2.6.1/Lib/email/encoders.py
+++ misc/build/Python-2.6.1/Lib/email/encoders.py
@@ -42,7 +42,7 @@
Also, add an appropriate Content-Transfer-Encoding header.
"""
orig = msg.get_payload()
- encdata = _bencode(orig)
+ encdata = str(_bencode(orig)).encode('ascii')
msg.set_payload(encdata)
msg['Content-Transfer-Encoding'] = 'base64'
http://bugs.python.org/issue8067 - needed for building on Mac OSX >= 10.6
--- misc/Python-2.6.1/configure 2010-05-06 20:59:52.000000000 +0200
+++ misc/build/Python-2.6.1/configure 2010-05-06 20:59:46.000000000 +0200
@@ -2120,6 +2120,8 @@
# has no effect, don't bother defining them
Darwin/[6789].*)
define_xopen_source=no;;
+ Darwin/1[0-9].*)
+ define_xopen_source=no;;
# On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
# used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
# or has another value. By not (re)defining it, the defaults come in place.
--- misc/build/Python-2.6.1/Makefile.pre.in 2012-05-17 22:05:39.445274789 +0200
+++ misc/build.new/Python-2.6.1/Makefile.pre.in 2012-05-17 22:05:15.214276225 +0200
@@ -34,7 +34,8 @@
LINKCC= @LINKCC@
AR= @AR@
RANLIB= @RANLIB@
-SVNVERSION= @SVNVERSION@
+# svnversion 1.7 changed its output from "exported" to "Unversioned directory"
+SVNVERSION="echo exported"
# Shell used by make (some versions default to the login shell, which is bad)
SHELL= /bin/sh
--- misc/Python-2.6.1/configure Thu Mar 17 13:00:41 2011
+++ misc/build/Python-2.6.1/configure Thu Mar 17 12:58:50 2011
@@ -2042,7 +2042,9 @@
if test -z "$MACHDEP"
then
ac_sys_system=`uname -s`
- if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
+ if test -n "$OOO_SYSBASE_SYS_RELEASE"; then
+ ac_sys_release=$OOO_SYSBASE_SYS_RELEASE
+ elif test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
-o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
ac_sys_release=`uname -v`
else
--- misc/Python-2.6.1/Lib/urllib.py 2008-09-21 23:27:51.000000000 +0200
+++ misc/build/Python-2.6.1/Lib/urllib.py 2010-11-23 15:41:08.000000000 +0100
@@ -176,6 +176,9 @@ class URLopener:
def open(self, fullurl, data=None):
"""Use URLopener().open(file) instead of open(file, 'r')."""
fullurl = unwrap(toBytes(fullurl))
+ # percent encode url. fixing lame server errors like space within url
+ # parts
+ fullurl = quote(fullurl, safe="%/:=&?~#+!$,;'@()*[]|")
if self.tempcache and fullurl in self.tempcache:
filename, headers = self.tempcache[fullurl]
fp = open(filename, 'rb')
@@ -233,41 +236,45 @@ class URLopener:
except IOError, msg:
pass
fp = self.open(url, data)
- headers = fp.info()
- if filename:
- tfp = open(filename, 'wb')
- else:
- import tempfile
- garbage, path = splittype(url)
- garbage, path = splithost(path or "")
- path, garbage = splitquery(path or "")
- path, garbage = splitattr(path or "")
- suffix = os.path.splitext(path)[1]
- (fd, filename) = tempfile.mkstemp(suffix)
- self.__tempfiles.append(filename)
- tfp = os.fdopen(fd, 'wb')
- result = filename, headers
- if self.tempcache is not None:
- self.tempcache[url] = result
- bs = 1024*8
- size = -1
- read = 0
- blocknum = 0
- if reporthook:
- if "content-length" in headers:
- size = int(headers["Content-Length"])
- reporthook(blocknum, bs, size)
- while 1:
- block = fp.read(bs)
- if block == "":
- break
- read += len(block)
- tfp.write(block)
- blocknum += 1
- if reporthook:
- reporthook(blocknum, bs, size)
- fp.close()
- tfp.close()
+ try:
+ headers = fp.info()
+ if filename:
+ tfp = open(filename, 'wb')
+ else:
+ import tempfile
+ garbage, path = splittype(url)
+ garbage, path = splithost(path or "")
+ path, garbage = splitquery(path or "")
+ path, garbage = splitattr(path or "")
+ suffix = os.path.splitext(path)[1]
+ (fd, filename) = tempfile.mkstemp(suffix)
+ self.__tempfiles.append(filename)
+ tfp = os.fdopen(fd, 'wb')
+ try:
+ result = filename, headers
+ if self.tempcache is not None:
+ self.tempcache[url] = result
+ bs = 1024*8
+ size = -1
+ read = 0
+ blocknum = 0
+ if reporthook:
+ if "content-length" in headers:
+ size = int(headers["Content-Length"])
+ reporthook(blocknum, bs, size)
+ while 1:
+ block = fp.read(bs)
+ if block == "":
+ break
+ read += len(block)
+ tfp.write(block)
+ blocknum += 1
+ if reporthook:
+ reporthook(blocknum, bs, size)
+ finally:
+ tfp.close()
+ finally:
+ fp.close()
del fp
del tfp
This diff is collapsed.
--- misc/build/Python-2.6.1/PC/VS10.0/_msi.vcxproj.orig 2012-08-22 17:28:56.856166700 -0400
+++ misc/build/Python-2.6.1/PC/VS10.0/_msi.vcxproj 2012-08-22 17:29:12.226731500 -0400
@@ -151,7 +151,7 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
</Link>
</ItemDefinitionGroup>
@@ -160,13 +160,13 @@
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
</Link>
</ItemDefinitionGroup>
@@ -175,13 +175,13 @@
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGInstrument|Win32'">
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
</Link>
</ItemDefinitionGroup>
@@ -190,14 +190,14 @@
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PGUpdate|Win32'">
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
</Link>
</ItemDefinitionGroup>
@@ -206,7 +206,7 @@
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<Link>
- <AdditionalDependencies>fci.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies>cabinet.lib;msi.lib;rpcrt4.lib;%(AdditionalDependencies)</AdditionalDependencies>
<BaseAddress>0x1D160000</BaseAddress>
<TargetMachine>MachineX64</TargetMachine>
</Link>
This diff is collapsed.
Index: setup.py
===================================================================
--- misc/build/Python-2.6.1/setup.py (revision 74955)
+++ misc/build/Python-2.6.1/setup.py (working copy)
@@ -695,7 +695,7 @@
# a release. Most open source OSes come with one or more
# versions of BerkeleyDB already installed.
- max_db_ver = (4, 7)
+ max_db_ver = (4, 8)
min_db_ver = (3, 3)
db_setup_debug = False # verbose debug prints from this script?
Index: Modules/_bsddb.c
===================================================================
--- misc/build/Python-2.6.1/Modules/_bsddb.c (revision 74955)
+++ misc/build/Python-2.6.1/Modules/_bsddb.c (working copy)
@@ -215,7 +215,11 @@
#define DB_BUFFER_SMALL ENOMEM
#endif
+#if (DBVER < 48)
+#define DB_GID_SIZE DB_XIDDATASIZE
+#endif
+
/* --------------------------------------------------------------------- */
/* Structure definitions */
@@ -4501,7 +4505,11 @@
DBTxnObject *txn;
#define PREPLIST_LEN 16
DB_PREPLIST preplist[PREPLIST_LEN];
+#if (DBVER < 48)
long retp;
+#else
+ u_int32_t retp;
+#endif
CHECK_ENV_NOT_CLOSED(self);
@@ -4522,7 +4530,7 @@
flags=DB_NEXT; /* Prepare for next loop pass */
for (i=0; i<retp; i++) {
gid=PyBytes_FromStringAndSize((char *)(preplist[i].gid),
- DB_XIDDATASIZE);
+ DB_GID_SIZE);
if (!gid) {
Py_DECREF(list);
return NULL;
@@ -5047,6 +5055,7 @@
}
+#if (DBVER < 48)
static PyObject*
DBEnv_set_rpc_server(DBEnvObject* self, PyObject* args, PyObject* kwargs)
{
@@ -5068,6 +5077,7 @@
RETURN_IF_ERR();
RETURN_NONE();
}
+#endif
static PyObject*
DBEnv_set_verbose(DBEnvObject* self, PyObject* args)
@@ -5947,9 +5957,9 @@
if (!PyArg_ParseTuple(args, "s#:prepare", &gid, &gid_size))
return NULL;
- if (gid_size != DB_XIDDATASIZE) {
+ if (gid_size != DB_GID_SIZE) {
PyErr_SetString(PyExc_TypeError,
- "gid must be DB_XIDDATASIZE bytes long");
+ "gid must be DB_GID_SIZE bytes long");
return NULL;
}
@@ -6539,8 +6549,10 @@
#endif
{"set_get_returns_none",(PyCFunction)DBEnv_set_get_returns_none, METH_VARARGS},
{"txn_recover", (PyCFunction)DBEnv_txn_recover, METH_NOARGS},
+#if (DBVER < 48)
{"set_rpc_server", (PyCFunction)DBEnv_set_rpc_server,
METH_VARARGS||METH_KEYWORDS},
+#endif
{"set_verbose", (PyCFunction)DBEnv_set_verbose, METH_VARARGS},
#if (DBVER >= 42)
{"get_verbose", (PyCFunction)DBEnv_get_verbose, METH_VARARGS},
@@ -7089,6 +7101,7 @@
ADD_INT(d, DB_MAX_PAGES);
ADD_INT(d, DB_MAX_RECORDS);
+#if (DBVER < 48)
#if (DBVER >= 42)
ADD_INT(d, DB_RPCCLIENT);
#else
@@ -7096,7 +7109,11 @@
/* allow apps to be written using DB_RPCCLIENT on older Berkeley DB */
_addIntToDict(d, "DB_RPCCLIENT", DB_CLIENT);
#endif
+#endif
+
+#if (DBVER < 48)
ADD_INT(d, DB_XA_CREATE);
+#endif
ADD_INT(d, DB_CREATE);
ADD_INT(d, DB_NOMMAP);
@@ -7113,7 +7130,13 @@
ADD_INT(d, DB_INIT_TXN);
ADD_INT(d, DB_JOINENV);
+#if (DBVER >= 48)
+ ADD_INT(d, DB_GID_SIZE);
+#else
ADD_INT(d, DB_XIDDATASIZE);
+ /* Allow new code to work in old BDB releases */
+ _addIntToDict(d, "DB_GID_SIZE", DB_XIDDATASIZE);
+#endif
ADD_INT(d, DB_RECOVER);
ADD_INT(d, DB_RECOVER_FATAL);
--- misc/build/Python-2.6.1/Lib/bsddb/test/test_distributed_transactions.py~ 2008-08-31 16:00:51.000000000 +0200
+++ misc/build/Python-2.6.1/Lib/bsddb/test/test_distributed_transactions.py 2010-03-14 21:36:19.762842468 +0100
@@ -35,7 +35,7 @@
db.DB_INIT_TXN | db.DB_INIT_LOG | db.DB_INIT_MPOOL |
db.DB_INIT_LOCK, 0666)
self.db = db.DB(self.dbenv)
- self.db.set_re_len(db.DB_XIDDATASIZE)
+ self.db.set_re_len(db.DB_GID_SIZE)
if must_open_db :
if db.version() > (4,1) :
txn=self.dbenv.txn_begin()
@@ -76,7 +76,7 @@
# let them be garbage collected.
for i in xrange(self.num_txns) :
txn = self.dbenv.txn_begin()
- gid = "%%%dd" %db.DB_XIDDATASIZE
+ gid = "%%%dd" %db.DB_GID_SIZE
gid = adapt(gid %i)
self.db.put(i, gid, txn=txn, flags=db.DB_APPEND)
txns.add(gid)
--- misc/build/Python-2.6.1/Lib/bsddb/test/test_basics.py~ 2009-07-02 17:37:21.000000000 +0200
+++ misc/build/Python-2.6.1/Lib/bsddb/test/test_basics.py 2010-03-14 21:33:00.077842066 +0100
@@ -1032,11 +1032,12 @@
# # See http://bugs.python.org/issue3307
# self.assertRaises(db.DBInvalidArgError, db.DB, None, 65535)
- def test02_DBEnv_dealloc(self):
- # http://bugs.python.org/issue3885
- import gc
- self.assertRaises(db.DBInvalidArgError, db.DBEnv, ~db.DB_RPCCLIENT)
- gc.collect()
+ if db.version() < (4, 8) :
+ def test02_DBEnv_dealloc(self):
+ # http://bugs.python.org/issue3885
+ import gc
+ self.assertRaises(db.DBInvalidArgError, db.DBEnv, ~db.DB_RPCCLIENT)
+ gc.collect()
#----------------------------------------------------------------------
This diff is collapsed.
--- misc/Python-2.6.1/Makefile.pre.in 2010-09-10 05:00:44.000000000 -0500
+++ misc/build/Python-2.6.1/Makefile.pre.in 2010-09-10 05:16:02.000000000 -0500
@@ -412,7 +412,10 @@
libpython$(VERSION).so: $(LIBRARY_OBJS)
if test $(INSTSONAME) != $(LDLIBRARY); then \
- $(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
+ if [ "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" != "aix" ]; then \
+ SONAME="-Wl,-h$(INSTSONAME)"; \
+ fi; \
+ $(LDSHARED) $(LDFLAGS) $(SONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
$(LN) -f $(INSTSONAME) $@; \
else\
$(LDSHARED) $(LDFLAGS) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
@@ -907,6 +907,8 @@
export PATH; PATH="`pwd`:$$PATH"; \
export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
export DYLD_FRAMEWORK_PATH; DYLD_FRAMEWORK_PATH="`pwd`"; \
+ export LD_LIBRARY_PATH; LD_LIBRARY_PATH="`pwd`${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"; \
+ export LIBPATH; LIBPATH="`pwd`${LIBPATH:+:$LIBPATH}"; \
export EXE; EXE="$(BUILDEXE)"; \
cd $(srcdir)/Lib/$(PLATDIR); ./regen
--- misc/Python-2.6.1/Modules/Setup.dist 2010-08-19 07:03:46.000000000 -0500
+++ misc/build/Python-2.6.1/Modules/Setup.dist 2010-08-19 07:04:11.000000000 -0500
@@ -185,7 +185,7 @@
#datetime datetimemodule.c # date/time type
#_bisect _bisectmodule.c # Bisection algorithms
-#unicodedata unicodedata.c # static Unicode character database
+unicodedata unicodedata.c # static Unicode character database
# access to ISO C locale support
#_locale _localemodule.c # -lintl
--- misc/Python-2.6.1/Modules/_ctypes/libffi/fficonfig.py.in 2010-09-11 08:50:58.000000000 -0500
+++ misc/build/Python-2.6.1/Modules/_ctypes/libffi/fficonfig.py.in 2010-09-11 08:51:26.000000000 -0500
@@ -14,7 +14,7 @@
'M32R': ['src/m32r/sysv.S', 'src/m32r/ffi.c'],
'M68K': ['src/m68k/ffi.c', 'src/m68k/sysv.S'],
'POWERPC': ['src/powerpc/ffi.c', 'src/powerpc/sysv.S', 'src/powerpc/ppc_closure.S', 'src/powerpc/linux64.S', 'src/powerpc/linux64_closure.S'],
- 'POWERPC_AIX': ['src/powerpc/ffi.c', 'src/powerpc/aix.S', 'src/powerpc/aix_closure.S'],
+ 'POWERPC_AIX': ['src/powerpc/ffi_darwin.c', 'src/powerpc/aix.S', 'src/powerpc/aix_closure.S'],
'POWERPC_FREEBSD': ['src/powerpc/ffi.c', 'src/powerpc/sysv.S', 'src/powerpc/ppc_closure.S'],
'ARM': ['src/arm/sysv.S', 'src/arm/ffi.c'],
'LIBFFI_CRIS': ['src/cris/sysv.S', 'src/cris/ffi.c'],
--- misc/Python-2.6.1/configure.in 2010-09-11 11:06:27.000000000 -0500
+++ misc/build/Python-2.6.1/configure.in 2010-09-11 11:25:42.000000000 -0500
@@ -415,8 +415,6 @@
without_gcc=$withval;;
esac], [
case $ac_sys_system in
- AIX*) CC=cc_r
- without_gcc=;;
BeOS*)
case $BE_HOST_CPU in
ppc)
@@ -704,10 +702,18 @@
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
INSTSONAME="$LDLIBRARY".$SOVERSION
;;
- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|AIX*)
LDLIBRARY='libpython$(VERSION).so'
- BLDLIBRARY='-L. -lpython$(VERSION)'
- RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+ case $ac_sys_system in
+ AIX*)
+ BLDLIBRARY='-Wl,-brtl -L. -lpython$(VERSION)'
+ RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
+ ;;
+ *)
+ BLDLIBRARY='-L. -lpython$(VERSION)'
+ RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+ ;;
+ esac
case $ac_sys_system in
FreeBSD*)
SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
@@ -1607,8 +1613,13 @@
then
case $ac_sys_system/$ac_sys_release in
AIX*)
- BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
- LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
+ if test "$GCC" = "yes"; then
+ LDSHARED='$(CC) -shared'
+ BLDSHARED='$(CC) -Wl,-brtl -shared'
+ else
+ BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
+ LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
+ fi
;;
BeOS*)
BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
--- misc/Python-2.6.1/configure 2010-09-11 11:06:27.000000000 -0500
+++ misc/build/Python-2.6.1/configure 2010-09-11 11:26:16.000000000 -0500
@@ -2266,8 +2266,6 @@
else
case $ac_sys_system in
- AIX*) CC=cc_r
- without_gcc=;;
BeOS*)
case $BE_HOST_CPU in
ppc)
@@ -4106,10 +4104,18 @@
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
INSTSONAME="$LDLIBRARY".$SOVERSION
;;
- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|AIX*)
LDLIBRARY='libpython$(VERSION).so'
- BLDLIBRARY='-L. -lpython$(VERSION)'
- RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+ case $ac_sys_system in
+ AIX*)
+ BLDLIBRARY='-Wl,-brtl -L. -lpython$(VERSION)'
+ RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
+ ;;
+ *)
+ BLDLIBRARY='-L. -lpython$(VERSION)'
+ RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
+ ;;
+ esac
INSTSONAME="$LDLIBRARY".$SOVERSION
;;
hp*|HP*)
@@ -4525,7 +4531,7 @@
# debug builds.
OPT="-g -Wall $STRICT_PROTO"
else
- OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
+ OPT="$WRAP -O0 -Wall $STRICT_PROTO"
fi
;;
*)
@@ -13012,8 +13018,13 @@
then
case $ac_sys_system/$ac_sys_release in
AIX*)
- BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
- LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
+ if test "$GCC" = "yes"; then
+ LDSHARED='$(CC) -shared'
+ BLDSHARED='$(CC) -Wl,-brtl -shared'
+ else
+ BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
+ LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
+ fi
;;
BeOS*)
BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
--- misc/Python-2.6.1/Makefile.pre.in.fix-parallel-make 2010-07-22 15:01:39.567996932 -0400
+++ misc/build/Python-2.6.1/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)
--- misc/Python-2.6.1/PCbuild/build_ssl.py 2009-11-02 08:24:35.140625000 +0000
+++ misc/build/Python-2.6.1/PCbuild/build_ssl.py 2009-11-02 08:25:11.750000000 +0000
@@ -255,4 +255,4 @@
sys.exit(rc)
if __name__=='__main__':
- main()
+ sys.exit(0)
--- misc/Python-2.6.1/PCbuild/_ssl.vcproj 2009-11-02 08:24:35.140625000 +0000
+++ misc/build/Python-2.6.1/PCbuild/_ssl.vcproj 2009-11-02 08:24:35.140625000 +0000
@@ -43,7 +43,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc32"
+ AdditionalIncludeDirectories="$(SOLARVERSION)\$(INPATH)\inc\external"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -57,7 +57,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
+ AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib\libeay32.lib $(SOLARVER)\$(INPATH)\lib\ssleay32.lib"
/>
<Tool
Name="VCALinkTool"
@@ -106,7 +106,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc64"
+ AdditionalIncludeDirectories="$(SOLARVERSION)\$(INPATH)\inc\external"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -120,7 +120,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
+ AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib\libeay32.lib $(SOLARVER)\$(INPATH)\lib\ssleay32.lib"
/>
<Tool
Name="VCALinkTool"
@@ -169,7 +169,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc32"
+ AdditionalIncludeDirectories="$(SOLARVERSION)\$(INPATH)\inc\external"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -183,7 +183,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
+ AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib\libeay32.lib $(SOLARVER)\$(INPATH)\lib\ssleay32.lib"
/>
<Tool
Name="VCALinkTool"
@@ -233,7 +233,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc64"
+ AdditionalIncludeDirectories="$(SOLARVERSION)\$(INPATH)\inc\external"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -247,7 +247,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
+ AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib\libeay32.lib $(SOLARVER)\$(INPATH)\lib\ssleay32.lib"
/>
<Tool
Name="VCALinkTool"
@@ -296,7 +296,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc32"
+ AdditionalIncludeDirectories="$(SOLARVERSION)\$(INPATH)\inc\external"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -310,7 +310,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
+ AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib\libeay32.lib $(SOLARVER)\$(INPATH)\lib\ssleay32.lib"
/>
<Tool
Name="VCALinkTool"
@@ -360,7 +360,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc64"
+ AdditionalIncludeDirectories="$(SOLARVERSION)\$(INPATH)\inc\external"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -374,7 +374,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
+ AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib\libeay32.lib $(SOLARVER)\$(INPATH)\lib\ssleay32.lib"
TargetMachine="17"
/>
<Tool
@@ -424,7 +424,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc32"
+ AdditionalIncludeDirectories="$(SOLARVERSION)\$(INPATH)\inc\external"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -438,7 +438,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(opensslDir)\out32\libeay32.lib $(opensslDir)\out32\ssleay32.lib"
+ AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib\libeay32.lib $(SOLARVER)\$(INPATH)\lib\ssleay32.lib"
/>
<Tool
Name="VCALinkTool"
@@ -488,7 +488,7 @@
/>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(opensslDir)\inc64"
+ AdditionalIncludeDirectories="$(SOLARVERSION)\$(INPATH)\inc\external"
/>
<Tool
Name="VCManagedResourceCompilerTool"
@@ -502,7 +502,7 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib $(opensslDir)\out64\libeay32.lib $(opensslDir)\out64\ssleay32.lib"
+ AdditionalDependencies="ws2_32.lib $(SOLARVER)\$(INPATH)\lib\libeay32.lib $(SOLARVER)\$(INPATH)\lib\ssleay32.lib"
TargetMachine="17"
/>
<Tool
--- misc/Python-2.6.1/setup.py 2009-11-02 10:12:43.000000000 +0000
+++ misc/build/Python-2.6.1/setup.py 2009-11-02 10:18:19.000000000 +0000
@@ -612,7 +612,12 @@
exts.append( Extension('_socket', ['socketmodule.c'],
depends = ['socketmodule.h']) )
# Detect SSL support for the socket module (via _ssl)
+ ooosslinc = os.environ.get('SOLARVERSION') + '/' + \
+ os.environ.get('INPATH') + '/' + \
+ 'inc'
+ ooosslinc = ooosslinc + '/external/'
search_for_ssl_incs_in = [
+ ooosslinc,
'/usr/local/ssl/include',
'/usr/contrib/ssl/include/'
]
@@ -624,8 +632,13 @@
['/usr/kerberos/include'])
if krb5_h:
ssl_incs += krb5_h
+ ooossllib = os.environ.get('SOLARVER') + '/' + \
+ os.environ.get('INPATH') + '/' + \
+ 'lib'
+ ooosslinc = ooosslinc + '/'
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
- ['/usr/local/ssl/lib',
+ [ooossllib,
+ '/usr/local/ssl/lib',
'/usr/contrib/ssl/lib/'
] )
--- misc/Python-2.6.1/Modules/Setup.dist 2009-12-17 15:16:50.000000000 +0000
+++ misc/build/Python-2.6.1/Modules/Setup.dist 2009-12-17 15:17:49.000000000 +0000
@@ -248,14 +248,14 @@
# Message-Digest Algorithm, described in RFC 1321. The necessary files
# md5.c and md5.h are included here.
-#_md5 md5module.c md5.c
+_md5 md5module.c md5.c
# The _sha module implements the SHA checksum algorithms.
# (NIST's Secure Hash Algorithms.)
-#_sha shamodule.c
-#_sha256 sha256module.c
-#_sha512 sha512module.c
+_sha shamodule.c
+_sha256 sha256module.c
+_sha512 sha512module.c
# SGI IRIX specific modules -- off by default.
--- misc/Python-2.6.1/Modules/_ctypes/libffi/configure
+++ misc/build/Python-2.6.1/Modules/_ctypes/libffi/configure
@@ -20426,10 +20426,10 @@ case "$host" in
;;
mips-sgi-irix5.* | mips-sgi-irix6.*)
- TARGET=MIPS; TARGETDIR=mips
+ TARGET=MIPS_IRIX; TARGETDIR=mips
;;
mips*-*-linux*)
- TARGET=MIPS; TARGETDIR=mips
+ TARGET=MIPS_LINUX; TARGETDIR=mips
;;
powerpc*-*-linux* | powerpc-*-sysv*)
@@ -20484,7 +20484,7 @@ echo "$as_me: error: \"libffi has not be
{ (exit 1); exit 1; }; }
fi
- if test x$TARGET = xMIPS; then
+ if expr x$TARGET : 'xMIPS' > /dev/null; then
MIPS_TRUE=
MIPS_FALSE='#'
else
--- misc/Python-2.6.1/Modules/_ctypes/libffi/configure.ac
+++ misc/build/Python-2.6.1/Modules/_ctypes/libffi/configure.ac
@@ -106,10 +106,10 @@ case "$host" in
;;
mips-sgi-irix5.* | mips-sgi-irix6.*)
- TARGET=MIPS; TARGETDIR=mips
+ TARGET=MIPS_IRIX; TARGETDIR=mips
;;
mips*-*-linux*)
- TARGET=MIPS; TARGETDIR=mips
+ TARGET=MIPS_LINUX; TARGETDIR=mips
;;
powerpc*-*-linux* | powerpc-*-sysv*)
@@ -162,7 +162,7 @@ if test $TARGETDIR = unknown; then
AC_MSG_ERROR(["libffi has not been ported to $host."])
fi
-AM_CONDITIONAL(MIPS, test x$TARGET = xMIPS)
+AM_CONDITIONAL(MIPS,[expr x$TARGET : 'xMIPS' > /dev/null])
AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC)
AM_CONDITIONAL(X86, test x$TARGET = xX86)
AM_CONDITIONAL(X86_FREEBSD, test x$TARGET = xX86_FREEBSD)
Python interpreter from [http://www.python.org/]
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
PRJ=.
PRJNAME=so_python
TARGET=so_python
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
.IF "$(DISABLE_PYTHON)"!="TRUE"
.INCLUDE : pyversion.mk
.IF "$(SYSTEM_PYTHON)" == "YES"
all:
@echo "An already available installation of python should exist on your system."
@echo "Therefore the version provided here does not need to be built in addition."
.ENDIF
# --- Files --------------------------------------------------------
TARFILE_NAME=Python-$(PYVERSION)
TARFILE_MD5=e81c2f0953aa60f8062c05a4673f2be0
PATCH_FILES=\
Python-$(PYVERSION).patch \
Python-parallel-make.patch \
Python-ssl.patch \
Python-aix.patch \
Python-2.6.1-urllib.patch \
Python-2.6.1-sysbase.patch \
Python-2.6.1-nohardlink.patch \
Python-2.6.1-py2422.patch \
Python-2.6.1-py4768.patch \
Python-2.6.1-svn-1.7.patch \
Python.mipsel-py4305.patch
CONFIGURE_DIR=
.IF "$(GUI)"=="UNX"
BUILD_DIR=
MYCWD=$(shell @pwd)/$(INPATH)/misc/build
.IF "$(SYSTEM_OPENSSL)" != "YES"
#we want to be sure we use our internal openssl if
#that's enabled
CC+:=-I$(SOLARINCDIR)$/external
python_LDFLAGS+=-L$(SOLARLIBDIR)
.ENDIF
# CLFLAGS get overwritten in Makefile.pre.in
.IF "$(SYSBASE)"!=""
CC+:=-I$(SYSBASE)$/usr$/include
python_LDFLAGS+=-L$(SYSBASE)/usr/lib
.IF "$(COMNAME)"=="sunpro5"
CC+:=$(C_RESTRICTIONFLAGS)
.ENDIF # "$(COMNAME)"=="sunpro5"
.ENDIF # "$(SYSBASE)"!=""
.IF "$(OS)$(CPU)"=="SOLARISU"
CC+:=$(ARCH_FLAGS)
python_LDFLAGS+=$(ARCH_FLAGS)
.ENDIF
.IF "$(OS)"=="AIX"
python_CFLAGS=-g0
.ENDIF
.IF "$(OS)" == "MACOSX"
my_prefix = @__________________________________________________$(EXTRPATH)
.ELSE
my_prefix = python-inst
.END
CONFIGURE_ACTION=$(AUGMENT_LIBRARY_PATH) ./configure --prefix=/$(my_prefix) --enable-shared CFLAGS="$(python_CFLAGS)" LDFLAGS="$(python_LDFLAGS)"
.IF "$(OS)$(CPUNAME)" == "SOLARISINTEL"
CONFIGURE_ACTION += --disable-ipv6
.ENDIF
.IF "$(OS)" == "MACOSX"
PATCH_FILES+=Python-2.6.1-py8067.patch
# don't build dual-arch version as OOo itself is not universal binary either
PATCH_FILES+=Python-2.6.1-arch_$(eq,$(CPU),I i386 ppc).patch
CONFIGURE_ACTION+=--enable-universalsdk=$(MACOSX_SDK_PATH) --with-universal-archs=32-bit --enable-framework=/$(my_prefix) --with-framework-name=OOoPython
ALLTAR: $(MISC)/OOoPython.framework.zip
.ENDIF
.IF "$(OS)"=="AIX"
CONFIGURE_ACTION += --disable-ipv6 --with-threads
.ENDIF
BUILD_ACTION=$(ENV_BUILD) $(GNUMAKE) -j$(EXTMAXPROCESS) && $(GNUMAKE) install DESTDIR=$(MYCWD) && chmod -R ug+w $(MYCWD)/$(my_prefix) && chmod g+w Include
.ELSE
# ----------------------------------
# WINDOWS
# ----------------------------------
.IF "$(COM)"=="GCC"
PATCH_FILES= \
Python-2.6.1-svn-1.7.patch \
Python-2.6.2-bdb48.patch \
Python-2.6.2-cross.patch \
Python-2.6.2-cross.fix-configure.patch \
BUILD_DIR=
MYCWD=$(shell @pwd)/$(INPATH)/misc/build
.IF "$(PYTHON_FOR_BUILD)" == ""
PYTHON_FOR_BUILD = $(OUTDIR_FOR_BUILD)/bin/python$(PYMAJOR).$(PYMINOR)
.ENDIF
.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
python_LDFLAGS=-shared-libgcc
.ENDIF
python_LDFLAGS=-shared-libgcc -Wl,--enable-runtime-pseudo-reloc-v2 -Wl,--export-all-symbols
CONFIGURE_ACTION=\
./configure \
--build="$(BUILD_PLATFORM)" \
--host="$(HOST_PLATFORM)" \
--prefix=$(MYCWD)/$(my_prefix) \
--enable-shared \
--with-threads \
LDFLAGS="$(python_LDFLAGS)" \
CC_FOR_BUILD="$(CC_FOR_BUILD)" \
PYTHON_FOR_BUILD="$(PYTHON_FOR_BUILD)" \
ac_cv_printf_zd_format=no \
BUILD_ACTION=$(ENV_BUILD) make && make install
.ELSE
.IF "$(CCNUMVER)" >= "001600000000"
PATCH_FILES+=Python-$(PYVERSION)-vc10.patch
PATCH_FILES+=Python-$(PYVERSION)-vc12.patch
BUILD_DIR=PC/VS10.0
.ELIF "$(CCNUMVER)" >= "001500000000"
BUILD_DIR=PCbuild
.ELIF "$(CCNUMVER)" >= "001400000000"
BUILD_DIR=PC/VS8.0
.ELIF "$(CCNUMVER)" >= "001310000000"
BUILD_DIR=PC/VS7.1
.ELSE
BUILD_DIR=PC/VC6
.ENDIF
.IF "$(CPUNAME)" == "INTEL"
ARCH=Win32
.ELSE
ARCH=x64
.ENDIF
.IF "$(debug)"!=""
CONF=Debug
.ELSE
CONF=Release
.ENDIF
# Build python executable and then runs a minimal script. Running the minimal script
# ensures that certain *.pyc files are generated which would otherwise be created on
# solver during registration in insetoo_native
.IF "$(CCNUMVER)" >= "001700000000"
BUILD_ACTION=MSBuild.exe pcbuild.sln /t:Build /p:Configuration=$(CONF) /p:PlatformToolset=v110
.ELIF "$(CCNUMVER)" >= "001600000000"
BUILD_ACTION=MSBuild.exe pcbuild.sln /t:Build /p:Configuration=$(CONF) /ToolsVersion:4.0
.ELSE
BUILD_ACTION=$(COMPATH)$/vcpackages$/vcbuild.exe pcbuild.sln "$(CONF)|$(ARCH)"
.ENDIF
.ENDIF
.ENDIF
PYVERSIONFILE=$(MISC)$/pyversion.mk
PYVERSIONGFILE=$(MISC)$/pyversion.Makefile
# --- Targets ------------------------------------------------------
.INCLUDE : set_ext.mk
.ENDIF # DISABLE_PYTHON != TRUE
.INCLUDE : target.mk
.IF "$(DISABLE_PYTHON)"!="TRUE"
.INCLUDE : tg_ext.mk
.IF "$(L10N_framework)"==""
.IF "$(GUI)" != "UNX"
.IF "$(COM)"!="GCC"
PYCONFIG:=$(MISC)$/build$/pyconfig.h
$(MISC)$/build$/$(TARFILE_NAME)$/PC$/pyconfig.h : $(PACKAGE_DIR)$/$(CONFIGURE_FLAG_FILE)
$(PACKAGE_DIR)$/$(BUILD_FLAG_FILE) : $(PYCONFIG)
$(PYCONFIG) : $(MISC)$/build$/$(TARFILE_NAME)$/PC$/pyconfig.h
-rm -f $@
cat $(MISC)$/build$/$(TARFILE_NAME)$/PC$/pyconfig.h > $@
# We know that the only thing guarded with #ifdef _DEBUG in PC/pyconfig.h is
# the line defining Py_DEBUG.
.IF "$(debug)"!=""
# If Python is built with debugging, then the modules we build need to be built with
# Py_DEBUG defined too because of the Py_InitModule4 redefining magic in modsupport.h
sed -e 's/^#ifdef _DEBUG$/#if 1/' <$@ >$@.new && mv $@.new $@
.ELSE
# Correspondingly, if Python is not built with debugging, it won't use the Py_InitModule4 redefining
# magic, so our Python modules should not be built to provide that either.
sed -e 's/^#ifdef _DEBUG$/#if 0/' <$@ >$@.new && mv $@.new $@
.ENDIF
.ENDIF
.ENDIF
ALLTAR : $(PYVERSIONFILE) $(PYVERSIONGFILE)
.ENDIF # "$(L10N_framework)"==""
# rule to allow relocating the whole framework, removing reference to buildinstallation directory
$(PACKAGE_DIR)/fixscripts: $(PACKAGE_DIR)$/$(PREDELIVER_FLAG_FILE)
@echo remove build installdir from scripts
$(COMMAND_ECHO)for file in \
$(MYCWD)/$(my_prefix)/OOoPython.framework/Versions/$(PYMAJOR).$(PYMINOR)/bin/2to3 \
$(MYCWD)/$(my_prefix)/OOoPython.framework/Versions/$(PYMAJOR).$(PYMINOR)/bin/idle$(PYMAJOR).$(PYMINOR) \
$(MYCWD)/$(my_prefix)/OOoPython.framework/Versions/$(PYMAJOR).$(PYMINOR)/bin/pydoc$(PYMAJOR).$(PYMINOR) \
$(MYCWD)/$(my_prefix)/OOoPython.framework/Versions/$(PYMAJOR).$(PYMINOR)/bin/python$(PYMAJOR).$(PYMINOR)-config \
$(MYCWD)/$(my_prefix)/OOoPython.framework/Versions/$(PYMAJOR).$(PYMINOR)/bin/smtpd$(PYMAJOR).$(PYMINOR).py ; do \
{{ rm "$$file" && awk '\
BEGIN {{print "\
#!/bin/bash\n\
origpath=$$(pwd)\n\
bindir=$$(cd $$(dirname \"$$0\") ; pwd)\n\
cd \"$$origpath\"\n\
\"$$bindir/../Resources/Python.app/Contents/MacOS/OOoPython\" - $$@ <<EOF"}} \
FNR==1{{next}} \
{{print}} \
END {{print "EOF"}}' > "$$file" ; }} < "$$file" ; chmod +x "$$file" ; done
@touch $@
$(PACKAGE_DIR)/fixinstallnames: $(PACKAGE_DIR)$/$(PREDELIVER_FLAG_FILE)
@echo remove build installdir from OOoPython
$(COMMAND_ECHO)$(XCRUN) install_name_tool -change \
/$(my_prefix)/OOoPython.framework/Versions/$(PYMAJOR).$(PYMINOR)/OOoPython \
@executable_path/../../../../OOoPython \
$(MYCWD)/$(my_prefix)/OOoPython.framework/Versions/$(PYMAJOR).$(PYMINOR)/Resources/Python.app/Contents/MacOS/OOoPython
@touch $@
$(MISC)/OOoPython.framework.zip: $(PACKAGE_DIR)/fixinstallnames $(PACKAGE_DIR)/fixscripts
@-rm -f $@
@echo creating $@
$(COMMAND_ECHO)cd $(MISC)/build/$(my_prefix) && find OOoPython.framework \
-not -type l -not -name Info.plist.in \
-not -name pythonw$(PYMAJOR).$(PYMINOR) \
-not -name python$(PYMAJOR).$(PYMINOR) -print0 | \
xargs -0 zip $(ZIP_VERBOSITY) ../../$(@:f)
$(PYVERSIONFILE) : pyversion.mk $(PACKAGE_DIR)$/$(PREDELIVER_FLAG_FILE)
@-rm -f $@
$(COMMAND_ECHO)$(COPY) pyversion.mk $@
$(PYVERSIONGFILE) : pyversion.Makefile $(PACKAGE_DIR)$/$(PREDELIVER_FLAG_FILE)
@-rm -f $@
$(COMMAND_ECHO)$(COPY) pyversion.Makefile $@
.ENDIF # DISABLE_PYTHON != TRUE
py python: solenv OPENSSL:openssl NULL
py python nmake - w,vc7 py_mkout NULL
py python nmake - u py_mkout NULL
This diff is collapsed.
# when you want to change the python version, you must update the d.lst
# in the python project accordingly !!!
PYMAJOR:=2
PYMINOR:=6
PYMICRO:=1
PYVERSION:=$(PYMAJOR).$(PYMINOR).$(PYMICRO)
ifeq ($(GUI),UNX)
ifeq ($(OS),MACOSX)
PY_FULL_DLL_NAME:=libpython$(PYMAJOR).$(PYMINOR).a
PYTHONLIB=-F$(SOLARLIBDIR) -framework OOoPython
CFLAGS+=-I$(SOLARLIBDIR)/OOoPython.framework/Versions/$(PYMAJOR).$(PYMINOR)/include/python$(PYMAJOR).$(PYMINOR)
else
PY_FULL_DLL_NAME:=libpython$(PYMAJOR).$(PYMINOR).so.1.0
PYTHONLIB:=-lpython$(PYMAJOR).$(PYMINOR)
endif
else
ifeq ($(COM),GCC)
PY_FULL_DLL_NAME:=libpython$(PYMAJOR).$(PYMINOR).dll
PYTHONLIB:=-lpython$(PYMAJOR).$(PYMINOR)
else
PY_FULL_DLL_NAME:=python$(PYMAJOR)$(PYMINOR).dll
PYTHONLIB:=python$(PYMAJOR)$(PYMINOR).lib
endif
endif
# when you want to change the python version, you must update the d.lst
# in the python project accordingly !!!
PYMAJOR=2
PYMINOR=6
PYMICRO=1
PYVERSION=$(PYMAJOR).$(PYMINOR).$(PYMICRO)
.IF "$(GUI)" == "UNX"
.IF "$(OS)" == "MACOSX"
PY_FULL_DLL_NAME=libpython$(PYMAJOR).$(PYMINOR).a
PYTHONLIB=-F$(SOLARLIBDIR) -framework OOoPython
CFLAGS+=-I$(SOLARLIBDIR)/OOoPython.framework/Versions/$(PYMAJOR).$(PYMINOR)/include/python$(PYMAJOR).$(PYMINOR)
.ELSE
PY_FULL_DLL_NAME=libpython$(PYMAJOR).$(PYMINOR).so.1.0
PYTHONLIB=-lpython$(PYMAJOR).$(PYMINOR)
.ENDIF
.ELSE
.IF "$(COM)" == "GCC"
PY_FULL_DLL_NAME=libpython$(PYMAJOR).$(PYMINOR).dll
PYTHONLIB=-lpython$(PYMAJOR).$(PYMINOR)
.ELSE
PY_FULL_DLL_NAME=python$(PYMAJOR)$(PYMINOR).dll
PYTHONLIB=python$(PYMAJOR)$(PYMINOR).lib
.ENDIF
.ENDIF
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment