mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
update to python-2.7.10
This commit is contained in:
parent
8638854cc8
commit
3117cc51af
@ -17,14 +17,14 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="Python"
|
||||
PKG_VERSION="2.7.3"
|
||||
PKG_VERSION="2.7.10"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="OSS"
|
||||
PKG_SITE="http://www.python.org/"
|
||||
PKG_URL="http://www.python.org/ftp/python/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.xz"
|
||||
PKG_DEPENDS_HOST="zlib:host"
|
||||
PKG_DEPENDS_TARGET="toolchain Python:host sqlite expat zlib bzip2 libressl libffi"
|
||||
PKG_DEPENDS_TARGET="toolchain sqlite expat zlib bzip2 libressl libffi Python:host"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="lang"
|
||||
PKG_SHORTDESC="python: The Python programming language"
|
||||
@ -48,6 +48,9 @@ PKG_CONFIGURE_OPTS_TARGET="ac_cv_file_dev_ptc=no \
|
||||
ac_cv_buggy_getaddrinfo=no \
|
||||
ac_cv_header_bluetooth_bluetooth_h=no \
|
||||
ac_cv_header_bluetooth_h=no \
|
||||
ac_cv_file__dev_ptmx=no \
|
||||
ac_cv_file__dev_ptc=no \
|
||||
ac_cv_have_long_long_format=yes \
|
||||
--with-threads \
|
||||
--enable-unicode=ucs4 \
|
||||
--enable-ipv6 \
|
||||
@ -72,19 +75,6 @@ make_host() {
|
||||
PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES"
|
||||
}
|
||||
|
||||
make_target() {
|
||||
make -j1 CC="$TARGET_CC" \
|
||||
HOSTPYTHON=$ROOT/$TOOLCHAIN/bin/python \
|
||||
HOSTPGEN=$ROOT/$TOOLCHAIN/bin/pgen \
|
||||
BLDSHARED="$CC -shared" \
|
||||
RUNSHARED="LD_LIBRARY_PATH=$ROOT/$TOOLCHAIN/lib:$LD_LIBRARY_PATH" \
|
||||
PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \
|
||||
CROSS_COMPILE="$TARGET_NAME" \
|
||||
CROSS_COMPILE_TARGET="yes" \
|
||||
PYTHON_MODULES_INCLUDE="$TARGET_INCDIR" \
|
||||
PYTHON_MODULES_LIB="$TARGET_LIBDIR"
|
||||
}
|
||||
|
||||
makeinstall_host() {
|
||||
make PYTHON_MODULES_INCLUDE="$HOST_INCDIR" \
|
||||
PYTHON_MODULES_LIB="$HOST_LIBDIR" \
|
||||
@ -103,33 +93,37 @@ makeinstall_host() {
|
||||
ln -s python2.7-config $ROOT/$TOOLCHAIN/bin/python-config
|
||||
}
|
||||
|
||||
pre_configure_target() {
|
||||
export PYTHON_FOR_BUILD=$ROOT/$TOOLCHAIN/bin/python
|
||||
export BLDSHARED="$CC -shared"
|
||||
export RUNSHARED="LD_LIBRARY_PATH=$ROOT/$TOOLCHAIN/lib:$LD_LIBRARY_PATH"
|
||||
}
|
||||
|
||||
make_target() {
|
||||
make -j1 CC="$TARGET_CC" \
|
||||
HOSTPGEN=$ROOT/$TOOLCHAIN/bin/pgen \
|
||||
PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \
|
||||
PYTHON_MODULES_INCLUDE="$TARGET_INCDIR" \
|
||||
PYTHON_MODULES_LIB="$TARGET_LIBDIR"
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
make -j1 CC="$TARGET_CC" \
|
||||
DESTDIR=$SYSROOT_PREFIX \
|
||||
HOSTPYTHON=$ROOT/$TOOLCHAIN/bin/python \
|
||||
HOSTPGEN=$ROOT/$TOOLCHAIN/bin/pgen \
|
||||
BLDSHARED="$CC -shared" \
|
||||
RUNSHARED="LD_LIBRARY_PATH=$ROOT/$TOOLCHAIN/lib:$LD_LIBRARY_PATH" \
|
||||
PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \
|
||||
CROSS_COMPILE="$TARGET_NAME" \
|
||||
CROSS_COMPILE_TARGET="yes" \
|
||||
PYTHON_MODULES_INCLUDE="$TARGET_INCDIR" \
|
||||
PYTHON_MODULES_LIB="$TARGET_LIBDIR" \
|
||||
install
|
||||
|
||||
# python distutils per default adds -L$LIBDIR when linking binary extensions
|
||||
# python distutils per default adds -L$LIBDIR when linking binary extensions
|
||||
sed -e "s|^LIBDIR=.*|LIBDIR= $SYSROOT_PREFIX/usr/lib|" \
|
||||
-i $SYSROOT_PREFIX/usr/lib/python*/config/Makefile
|
||||
|
||||
make -j1 CC="$TARGET_CC" \
|
||||
DESTDIR=$INSTALL \
|
||||
HOSTPYTHON=$ROOT/$TOOLCHAIN/bin/python \
|
||||
HOSTPGEN=$ROOT/$TOOLCHAIN/bin/pgen \
|
||||
BLDSHARED="$CC -shared" \
|
||||
RUNSHARED="LD_LIBRARY_PATH=$ROOT/$TOOLCHAIN/lib:$LD_LIBRARY_PATH" \
|
||||
PYTHON_DISABLE_MODULES="$PY_DISABLED_MODULES" \
|
||||
CROSS_COMPILE="$TARGET_NAME" \
|
||||
CROSS_COMPILE_TARGET="yes" \
|
||||
PYTHON_MODULES_INCLUDE="$TARGET_INCDIR" \
|
||||
PYTHON_MODULES_LIB="$TARGET_LIBDIR" \
|
||||
install
|
||||
@ -144,12 +138,6 @@ post_makeinstall_target() {
|
||||
python -Wi -t -B ../Lib/compileall.py $INSTALL/usr/lib/python*/ -f
|
||||
rm -rf `find $INSTALL/usr/lib/python*/ -name "*.py"`
|
||||
|
||||
rm -rf $INSTALL/usr/lib/python*/config/Setup*
|
||||
rm -rf $INSTALL/usr/lib/python*/config/config.*
|
||||
rm -rf $INSTALL/usr/lib/python*/config/install-sh
|
||||
rm -rf $INSTALL/usr/lib/python*/config/makesetup
|
||||
rm -rf $INSTALL/usr/lib/python*/config/python.o
|
||||
|
||||
if [ ! -f $INSTALL/usr/lib/python*/lib-dynload/_socket.so ]; then
|
||||
echo "sometimes Python dont build '_socket.so' for some reasons and continues without failing,"
|
||||
echo "let it fail here, to be sure '_socket.so' will be installed. A rebuild of Python fixes"
|
||||
@ -157,7 +145,7 @@ post_makeinstall_target() {
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# k0p
|
||||
rm -rf $INSTALL/usr/lib/python*/config
|
||||
rm -rf $INSTALL/usr/bin/2to3
|
||||
rm -rf $INSTALL/usr/bin/idle
|
||||
rm -rf $INSTALL/usr/bin/pydoc
|
||||
|
@ -0,0 +1,75 @@
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index bcd83bf..5e54a0d 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -191,6 +191,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
|
||||
|
||||
PYTHON= python$(EXE)
|
||||
BUILDPYTHON= python$(BUILDEXE)
|
||||
+HOSTPYTHON= ./$(BUILDPYTHON)
|
||||
|
||||
PYTHON_FOR_BUILD=@PYTHON_FOR_BUILD@
|
||||
_PYTHON_HOST_PLATFORM=@_PYTHON_HOST_PLATFORM@
|
||||
@@ -231,6 +232,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
|
||||
##########################################################################
|
||||
# Parser
|
||||
PGEN= Parser/pgen$(EXE)
|
||||
+HOSTPGEN= $(PGEN)
|
||||
|
||||
PSRCS= \
|
||||
Parser/acceler.c \
|
||||
@@ -461,6 +463,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt
|
||||
esac; \
|
||||
$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
|
||||
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
|
||||
+ PYTHONXCPREFIX='$(DESTDIR)$(prefix)' \
|
||||
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
|
||||
|
||||
# Build static library
|
||||
@@ -598,7 +601,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule
|
||||
$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
|
||||
@$(MKDIR_P) Include
|
||||
$(MAKE) $(PGEN)
|
||||
- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
|
||||
+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
|
||||
$(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
|
||||
$(MAKE) $(GRAMMAR_H)
|
||||
touch $(GRAMMAR_C)
|
||||
@@ -1142,7 +1145,9 @@ libainstall: all python-config
|
||||
# Install the dynamically loadable modules
|
||||
# This goes into $(exec_prefix)
|
||||
sharedinstall: sharedmods
|
||||
+ CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
|
||||
$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
|
||||
+ --skip-build \
|
||||
--prefix=$(prefix) \
|
||||
--install-scripts=$(BINDIR) \
|
||||
--install-platlib=$(DESTSHARED) \
|
||||
diff --git a/setup.py b/setup.py
|
||||
index a46bf35..528e9df 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -17,7 +17,7 @@
|
||||
from distutils.command.install_lib import install_lib
|
||||
from distutils.spawn import find_executable
|
||||
|
||||
-cross_compiling = "_PYTHON_HOST_PLATFORM" in os.environ
|
||||
+cross_compiling = ("_PYTHON_HOST_PLATFORM" in os.environ) or ('PYTHONXCPREFIX' in os.environ)
|
||||
|
||||
def get_platform():
|
||||
# cross build
|
||||
@@ -292,6 +292,14 @@ class PyBuildExt(build_ext):
|
||||
(ext.name, sys.exc_info()[1]))
|
||||
self.failed.append(ext.name)
|
||||
return
|
||||
+
|
||||
+ # Inport check will not work when cross-compiling.
|
||||
+ if os.environ.has_key('PYTHONXCPREFIX'):
|
||||
+ self.announce(
|
||||
+ 'WARNING: skipping inport check for cross-compiled: "%s"' %
|
||||
+ ext.name)
|
||||
+ return
|
||||
+
|
||||
# Workaround for Mac OS X: The Carbon-based modules cannot be
|
||||
# reliably imported into a command-line Python
|
||||
if 'Carbon' in ext.extra_link_args:
|
@ -1,13 +1,17 @@
|
||||
diff -Naur Python-2.7.2/setup.py Python-2.7.2.patch/setup.py
|
||||
--- Python-2.7.2/setup.py 2011-10-25 14:07:59.520264628 +0200
|
||||
+++ Python-2.7.2.patch/setup.py 2011-10-25 14:16:32.218793079 +0200
|
||||
@@ -380,10 +380,19 @@
|
||||
diff --git a/setup.py b/setup.py
|
||||
index d6ef5be..7a0d8f2 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -439,13 +439,19 @@ class PyBuildExt(build_ext):
|
||||
os.unlink(tmpfile)
|
||||
|
||||
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.include_dirs, '/usr/local/include')
|
||||
- if not cross_compiling:
|
||||
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
||||
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||
- if cross_compiling:
|
||||
- self.add_gcc_paths()
|
||||
- self.add_multiarch_paths()
|
||||
+ try:
|
||||
+ modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split()
|
||||
@ -25,7 +29,7 @@ diff -Naur Python-2.7.2/setup.py Python-2.7.2.patch/setup.py
|
||||
|
||||
# Add paths specified in the environment variables LDFLAGS and
|
||||
# CPPFLAGS for header and library files.
|
||||
@@ -419,17 +428,6 @@
|
||||
@@ -481,17 +487,6 @@ class PyBuildExt(build_ext):
|
||||
for directory in reversed(options.dirs):
|
||||
add_dir_to_list(dir_list, directory)
|
||||
|
||||
@ -43,17 +47,3 @@ diff -Naur Python-2.7.2/setup.py Python-2.7.2.patch/setup.py
|
||||
try:
|
||||
have_unicode = unicode
|
||||
except NameError:
|
||||
@@ -438,11 +436,8 @@
|
||||
# lib_dirs and inc_dirs are used to search for files;
|
||||
# if a file is found in one of those directories, it can
|
||||
# be assumed that no additional -I,-L directives are needed.
|
||||
- lib_dirs = self.compiler.library_dirs + [
|
||||
- '/lib64', '/usr/lib64',
|
||||
- '/lib', '/usr/lib',
|
||||
- ]
|
||||
- inc_dirs = self.compiler.include_dirs + ['/usr/include']
|
||||
+ lib_dirs = self.compiler.library_dirs
|
||||
+ inc_dirs = self.compiler.include_dirs
|
||||
exts = []
|
||||
missing = []
|
||||
|
@ -0,0 +1,16 @@
|
||||
diff --git a/setup.py b/setup.py
|
||||
index a46bf35..d6ef5be 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -33,7 +33,10 @@ host_platform = get_platform()
|
||||
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
|
||||
|
||||
# This global variable is used to hold the list of modules to be disabled.
|
||||
-disabled_module_list = []
|
||||
+try:
|
||||
+ disabled_module_list = os.environ["PYTHON_DISABLE_MODULES"].split()
|
||||
+except KeyError:
|
||||
+ disabled_module_list = []
|
||||
|
||||
def add_dir_to_list(dirlist, dir):
|
||||
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
|
@ -1,11 +1,11 @@
|
||||
diff -Naur Python-2.7.2/setup.py Python-2.7.2.patch/setup.py
|
||||
--- Python-2.7.2/setup.py 2011-10-26 01:53:16.014387508 +0200
|
||||
+++ Python-2.7.2.patch/setup.py 2011-10-26 02:20:08.236706196 +0200
|
||||
@@ -1877,12 +1877,18 @@
|
||||
ffi_configfile):
|
||||
from distutils.dir_util import mkpath
|
||||
mkpath(ffi_builddir)
|
||||
- config_args = []
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 07af0b6..6426b22 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -2030,10 +2030,18 @@ class PyBuildExt(build_ext):
|
||||
if not self.verbose:
|
||||
config_args.append("-q")
|
||||
|
||||
+
|
||||
+ #NOTE: best solution is to add to configure script
|
||||
+ # as config subdirectory and to exclude darwin
|
||||
@ -13,7 +13,7 @@ diff -Naur Python-2.7.2/setup.py Python-2.7.2.patch/setup.py
|
||||
+ #FIXME: lets for now pass all top configure arguments
|
||||
+ #and do not modify configure script.
|
||||
+ config_args = sysconfig.get_config_var("CONFIG_ARGS")
|
||||
|
||||
+
|
||||
# Pass empty CFLAGS because we'll just append the resulting
|
||||
# CFLAGS to Python's; -g or -O2 is to be avoided.
|
||||
cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \
|
@ -0,0 +1,29 @@
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 918f210..c82366c 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -1011,24 +1011,6 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
|
||||
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
|
||||
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
|
||||
fi
|
||||
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
- -d $(LIBDEST) -f \
|
||||
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
|
||||
- $(DESTDIR)$(LIBDEST)
|
||||
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
- -d $(LIBDEST) -f \
|
||||
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
|
||||
- $(DESTDIR)$(LIBDEST)
|
||||
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
- -d $(LIBDEST)/site-packages -f \
|
||||
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
||||
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
- -d $(LIBDEST)/site-packages -f \
|
||||
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
||||
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
|
||||
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
@ -0,0 +1,12 @@
|
||||
diff -Naur Python-2.7.10.orig/configure Python-2.7.10/configure
|
||||
--- Python-2.7.10.orig/configure 2015-08-18 12:24:03.016649265 -0700
|
||||
+++ Python-2.7.10/configure 2015-08-18 12:23:41.716695873 -0700
|
||||
@@ -14215,7 +14215,7 @@
|
||||
|
||||
# first curses configure check
|
||||
ac_save_cppflags="$CPPFLAGS"
|
||||
-CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
|
||||
+CPPFLAGS="$CPPFLAGS -I${prefix}/usr/include/ncursesw"
|
||||
|
||||
for ac_header in curses.h ncurses.h
|
||||
do :
|
@ -0,0 +1,34 @@
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index bf3aed7..7ff5c79 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -464,6 +464,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt
|
||||
$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
|
||||
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
|
||||
PYTHONXCPREFIX='$(DESTDIR)$(prefix)' \
|
||||
+ CONFIG_ARGS="$(CONFIG_ARGS)" \
|
||||
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
|
||||
|
||||
libpython$(VERSION).so: $(LIBRARY_OBJS)
|
||||
@@ -1104,6 +1105,7 @@ libainstall: all python-config
|
||||
# This goes into $(exec_prefix)
|
||||
sharedinstall: sharedmods
|
||||
CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
|
||||
+ CONFIG_ARGS="$(CONFIG_ARGS)" \
|
||||
$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
|
||||
--skip-build \
|
||||
--prefix=$(prefix) \
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 6426b22..d2776dd 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -32,6 +32,9 @@ host_platform = get_platform()
|
||||
# Were we compiled --with-pydebug or with #define Py_DEBUG?
|
||||
COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS"))
|
||||
|
||||
+sysconfig.get_config_vars()
|
||||
+sysconfig._CONFIG_VARS.update(os.environ)
|
||||
+
|
||||
# This global variable is used to hold the list of modules to be disabled.
|
||||
try:
|
||||
disabled_module_list = os.environ["PYTHON_DISABLE_MODULES"].split()
|
@ -1,7 +1,8 @@
|
||||
diff -up Python-2.6.4/Lib/distutils/unixccompiler.py.distutils-rpath Python-2.6.4/Lib/distutils/unixccompiler.py
|
||||
--- Python-2.6.4/Lib/distutils/unixccompiler.py.distutils-rpath 2009-09-09 04:34:06.000000000 -0400
|
||||
+++ Python-2.6.4/Lib/distutils/unixccompiler.py 2010-03-15 21:33:25.000000000 -0400
|
||||
@@ -142,6 +142,16 @@ class UnixCCompiler(CCompiler):
|
||||
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py
|
||||
index 2aa1cb1..529e2d4 100644
|
||||
--- a/Lib/distutils/unixccompiler.py
|
||||
+++ b/Lib/distutils/unixccompiler.py
|
||||
@@ -83,6 +83,16 @@ class UnixCCompiler(CCompiler):
|
||||
if sys.platform == "cygwin":
|
||||
exe_extension = ".exe"
|
||||
|
@ -1,7 +1,8 @@
|
||||
diff -Naur Python-2.7.2/Makefile.pre.in Python-2.7.2.patch/Makefile.pre.in
|
||||
--- Python-2.7.2/Makefile.pre.in 2011-10-25 16:20:40.178698198 +0200
|
||||
+++ Python-2.7.2.patch/Makefile.pre.in 2011-10-25 16:22:33.429160448 +0200
|
||||
@@ -398,7 +398,7 @@
|
||||
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
||||
index 918f210..eb9ee6b 100644
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -438,7 +438,7 @@ coverage:
|
||||
|
||||
|
||||
# Build the interpreter
|
||||
@ -10,9 +11,9 @@ diff -Naur Python-2.7.2/Makefile.pre.in Python-2.7.2.patch/Makefile.pre.in
|
||||
$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
|
||||
Modules/python.o \
|
||||
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
|
||||
@@ -414,18 +414,6 @@
|
||||
*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' PYTHONXCPREFIX='$(DESTDIR)$(prefix)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
|
||||
esac
|
||||
@@ -465,18 +465,6 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt
|
||||
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
|
||||
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build
|
||||
|
||||
-# Build static library
|
||||
-# avoid long command lines, same as LIBRARY_OBJS
|
||||
@ -29,7 +30,7 @@ diff -Naur Python-2.7.2/Makefile.pre.in Python-2.7.2.patch/Makefile.pre.in
|
||||
libpython$(VERSION).so: $(LIBRARY_OBJS)
|
||||
if test $(INSTSONAME) != $(LDLIBRARY); then \
|
||||
$(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
|
||||
@@ -997,18 +985,6 @@
|
||||
@@ -1090,18 +1078,6 @@ libainstall: all python-config
|
||||
else true; \
|
||||
fi; \
|
||||
done
|
||||
@ -48,4 +49,3 @@ diff -Naur Python-2.7.2/Makefile.pre.in Python-2.7.2.patch/Makefile.pre.in
|
||||
$(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c
|
||||
$(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
|
||||
$(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
|
||||
diff -Naur Python-2.7.2/Makefile.pre.in.orig Python-2.7.2.patch/Makefile.pre.in.orig
|
@ -0,0 +1,13 @@
|
||||
diff --git a/Python/compile.c b/Python/compile.c
|
||||
index 1cf53f9..25665b5 100644
|
||||
--- a/Python/compile.c
|
||||
+++ b/Python/compile.c
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "symtable.h"
|
||||
#include "opcode.h"
|
||||
|
||||
-int Py_OptimizeFlag = 0;
|
||||
+int Py_OptimizeFlag = 1;
|
||||
|
||||
#define DEFAULT_BLOCK_SIZE 16
|
||||
#define DEFAULT_BLOCKS 8
|
@ -1,135 +0,0 @@
|
||||
diff -Naur Python-2.7.3/configure Python-2.7.3.patch/configure
|
||||
--- Python-2.7.3/configure 2012-04-10 01:07:36.000000000 +0200
|
||||
+++ Python-2.7.3.patch/configure 2012-04-16 14:27:58.161470960 +0200
|
||||
@@ -13697,7 +13697,7 @@
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then :
|
||||
- ac_cv_have_long_long_format=no
|
||||
+ ac_cv_have_long_long_format="cross -- assuming yes"
|
||||
else
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
@@ -13749,7 +13749,7 @@
|
||||
$as_echo "$ac_cv_have_long_long_format" >&6; }
|
||||
fi
|
||||
|
||||
-if test "$ac_cv_have_long_long_format" = yes
|
||||
+if test "$ac_cv_have_long_long_format" != no
|
||||
then
|
||||
|
||||
$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
|
||||
diff -Naur Python-2.7.3/Makefile.pre.in Python-2.7.3.patch/Makefile.pre.in
|
||||
--- Python-2.7.3/Makefile.pre.in 2012-04-10 01:07:33.000000000 +0200
|
||||
+++ Python-2.7.3.patch/Makefile.pre.in 2012-04-16 14:30:27.753099115 +0200
|
||||
@@ -182,6 +182,7 @@
|
||||
|
||||
PYTHON= python$(EXE)
|
||||
BUILDPYTHON= python$(BUILDEXE)
|
||||
+HOSTPYTHON= ./$(BUILDPYTHON)
|
||||
|
||||
# The task to run while instrument when building the profile-opt target
|
||||
PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
|
||||
@@ -215,6 +216,8 @@
|
||||
# Parser
|
||||
PGEN= Parser/pgen$(EXE)
|
||||
|
||||
+HOSTPGEN= $(PGEN)
|
||||
+
|
||||
POBJS= \
|
||||
Parser/acceler.o \
|
||||
Parser/grammar1.o \
|
||||
@@ -408,8 +411,8 @@
|
||||
# Build the shared modules
|
||||
sharedmods: $(BUILDPYTHON)
|
||||
@case $$MAKEFLAGS in \
|
||||
- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
|
||||
- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
|
||||
+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' PYTHONXCPREFIX='$(DESTDIR)$(prefix)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
|
||||
+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' PYTHONXCPREFIX='$(DESTDIR)$(prefix)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
|
||||
esac
|
||||
|
||||
# Build static library
|
||||
@@ -543,7 +546,7 @@
|
||||
$(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
|
||||
Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
|
||||
-@$(INSTALL) -d Include
|
||||
- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
|
||||
+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
|
||||
-touch Parser/pgen.stamp
|
||||
|
||||
$(PGEN): $(PGENOBJS)
|
||||
@@ -938,26 +941,26 @@
|
||||
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
|
||||
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
|
||||
fi
|
||||
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
+ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
-d $(LIBDEST) -f \
|
||||
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
|
||||
$(DESTDIR)$(LIBDEST)
|
||||
- PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
+ -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
+ $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
-d $(LIBDEST) -f \
|
||||
-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
|
||||
$(DESTDIR)$(LIBDEST)
|
||||
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
+ $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
-d $(LIBDEST)/site-packages -f \
|
||||
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
||||
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
+ $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
-d $(LIBDEST)/site-packages -f \
|
||||
-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
||||
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
|
||||
+ $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
|
||||
|
||||
# Create the PLATDIR source directory, if one wasn't distributed..
|
||||
$(srcdir)/Lib/$(PLATDIR):
|
||||
@@ -1062,7 +1065,9 @@
|
||||
# Install the dynamically loadable modules
|
||||
# This goes into $(exec_prefix)
|
||||
sharedinstall: sharedmods
|
||||
- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
|
||||
+ CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
|
||||
+ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
|
||||
+ --skip-build \
|
||||
--prefix=$(prefix) \
|
||||
--install-scripts=$(BINDIR) \
|
||||
--install-platlib=$(DESTSHARED) \
|
||||
diff -Naur Python-2.7.3/setup.py Python-2.7.3.patch/setup.py
|
||||
--- Python-2.7.3/setup.py 2012-04-10 01:07:36.000000000 +0200
|
||||
+++ Python-2.7.3.patch/setup.py 2012-04-16 14:27:58.164471010 +0200
|
||||
@@ -23,6 +23,10 @@
|
||||
# This global variable is used to hold the list of modules to be disabled.
|
||||
disabled_module_list = []
|
||||
|
||||
+# _ctypes fails to cross-compile due to the libffi configure script.
|
||||
+#if os.environ.has_key('PYTHONXCPREFIX'):
|
||||
+# disabled_module_list.append('_ctypes')
|
||||
+
|
||||
def add_dir_to_list(dirlist, dir):
|
||||
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
|
||||
1) 'dir' is not already in 'dirlist'
|
||||
@@ -278,6 +282,14 @@
|
||||
(ext.name, sys.exc_info()[1]))
|
||||
self.failed.append(ext.name)
|
||||
return
|
||||
+
|
||||
+ # Inport check will not work when cross-compiling.
|
||||
+ if os.environ.has_key('PYTHONXCPREFIX'):
|
||||
+ self.announce(
|
||||
+ 'WARNING: skipping inport check for cross-compiled: "%s"' %
|
||||
+ ext.name)
|
||||
+ return
|
||||
+
|
||||
# Workaround for Mac OS X: The Carbon-based modules cannot be
|
||||
# reliably imported into a command-line Python
|
||||
if 'Carbon' in ext.extra_link_args:
|
@ -1,38 +0,0 @@
|
||||
diff -Naur Python-2.6.6/setup.py Python-2.6.6.patch/setup.py
|
||||
--- Python-2.6.6/setup.py 2010-11-03 00:17:10.403608974 +0100
|
||||
+++ Python-2.6.6.patch/setup.py 2010-11-03 00:23:31.624025348 +0100
|
||||
@@ -18,7 +18,14 @@
|
||||
from distutils.spawn import find_executable
|
||||
|
||||
# This global variable is used to hold the list of modules to be disabled.
|
||||
-disabled_module_list = []
|
||||
+try:
|
||||
+ disabled_module_list = os.environ["PYTHON_DISABLE_MODULES"].split()
|
||||
+except KeyError:
|
||||
+ disabled_module_list = []
|
||||
+try:
|
||||
+ disable_ssl = os.environ["PYTHON_DISABLE_SSL"]
|
||||
+except KeyError:
|
||||
+ disable_ssl = 0
|
||||
|
||||
def add_dir_to_list(dirlist, dir):
|
||||
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
|
||||
@@ -361,6 +368,8 @@
|
||||
return sys.platform
|
||||
|
||||
def detect_modules(self):
|
||||
+ global disable_ssl
|
||||
+
|
||||
try:
|
||||
modules_include_dirs = os.environ["PYTHON_MODULES_INCLUDE"].split()
|
||||
except KeyError:
|
||||
@@ -714,7 +723,8 @@
|
||||
] )
|
||||
|
||||
if (ssl_incs is not None and
|
||||
- ssl_libs is not None):
|
||||
+ ssl_libs is not None and
|
||||
+ not disable_ssl):
|
||||
exts.append( Extension('_ssl', ['_ssl.c'],
|
||||
include_dirs = ssl_incs,
|
||||
library_dirs = ssl_libs,
|
@ -1,28 +0,0 @@
|
||||
diff -Naur Python-2.7.3/Makefile.pre.in Python-2.7.3.patch/Makefile.pre.in
|
||||
--- Python-2.7.3/Makefile.pre.in 2012-04-16 14:49:16.353716188 +0200
|
||||
+++ Python-2.7.3.patch/Makefile.pre.in 2012-04-16 14:50:03.740554039 +0200
|
||||
@@ -941,24 +941,6 @@
|
||||
$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
|
||||
$(DESTDIR)$(LIBDEST)/distutils/tests ; \
|
||||
fi
|
||||
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
- -d $(LIBDEST) -f \
|
||||
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
|
||||
- $(DESTDIR)$(LIBDEST)
|
||||
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
- -d $(LIBDEST) -f \
|
||||
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
|
||||
- $(DESTDIR)$(LIBDEST)
|
||||
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
- -d $(LIBDEST)/site-packages -f \
|
||||
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
||||
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
- $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
|
||||
- -d $(LIBDEST)/site-packages -f \
|
||||
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
|
||||
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
|
||||
$(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()"
|
||||
|
@ -1,37 +0,0 @@
|
||||
diff -Naur Python-2.7.2/Makefile.pre.in Python-2.7.2.patch/Makefile.pre.in
|
||||
--- Python-2.7.2/Makefile.pre.in 2011-10-26 01:53:09.752305358 +0200
|
||||
+++ Python-2.7.2.patch/Makefile.pre.in 2011-10-26 01:57:20.158587315 +0200
|
||||
@@ -410,8 +410,8 @@
|
||||
# Build the shared modules
|
||||
sharedmods: $(BUILDPYTHON)
|
||||
@case $$MAKEFLAGS in \
|
||||
- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' PYTHONXCPREFIX='$(DESTDIR)$(prefix)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
|
||||
- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' PYTHONXCPREFIX='$(DESTDIR)$(prefix)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
|
||||
+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' PYTHONXCPREFIX='$(DESTDIR)$(prefix)' CONFIG_ARGS="$(CONFIG_ARGS)" $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
|
||||
+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' PYTHONXCPREFIX='$(DESTDIR)$(prefix)' CONFIG_ARGS="$(CONFIG_ARGS)" $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
|
||||
esac
|
||||
|
||||
# Build static library
|
||||
@@ -1053,7 +1053,7 @@
|
||||
# This goes into $(exec_prefix)
|
||||
sharedinstall: sharedmods
|
||||
CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
|
||||
- $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
|
||||
+ $(RUNSHARED) CONFIG_ARGS="$(CONFIG_ARGS)" $(HOSTPYTHON) -E $(srcdir)/setup.py install \
|
||||
--skip-build \
|
||||
--prefix=$(prefix) \
|
||||
--install-scripts=$(BINDIR) \
|
||||
diff -Naur Python-2.7.2/setup.py Python-2.7.2.patch/setup.py
|
||||
--- Python-2.7.2/setup.py 2011-10-26 01:53:16.014387508 +0200
|
||||
+++ Python-2.7.2.patch/setup.py 2011-10-26 01:53:46.158782904 +0200
|
||||
@@ -20,6 +20,9 @@
|
||||
# Were we compiled --with-pydebug or with #define Py_DEBUG?
|
||||
COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount')
|
||||
|
||||
+sysconfig.get_config_vars()
|
||||
+sysconfig._CONFIG_VARS.update(os.environ)
|
||||
+
|
||||
# This global variable is used to hold the list of modules to be disabled.
|
||||
try:
|
||||
disabled_module_list = os.environ["PYTHON_DISABLE_MODULES"].split()
|
||||
diff -Naur Python-2.7.2/setup.py.orig Python-2.7.2.patch/setup.py.orig
|
@ -1,76 +0,0 @@
|
||||
Change the location of pyconfig.h
|
||||
|
||||
The Python interpreter has a really strange behaviour: at *runtime*,
|
||||
it reads a Makefile and a header file named pyconfig.h to get some
|
||||
information about the configuration.
|
||||
|
||||
The Makefile is located in usr/lib/python2.7/config, which is fine
|
||||
since this location is kept on the target.
|
||||
|
||||
However, by default, the pyconfig.h is installed in
|
||||
usr/include/python2.7, but we completely remove the usr/include
|
||||
directory for the target. Since making an exception just for
|
||||
pyconfig.h is annoying, this patch also installs pyconfig.h to
|
||||
usr/lib/python2.7/config, and modifies the sysconfig module so that it
|
||||
looks in this location instead of usr/include.
|
||||
|
||||
The pyconfig.h is still kept in usr/include/python2.7, because it is
|
||||
needed in the $(STAGING_DIR) when building third-party Python
|
||||
extensions that contain C code.
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
|
||||
---
|
||||
Lib/distutils/sysconfig.py | 3 ++-
|
||||
Lib/sysconfig.py | 2 +-
|
||||
Makefile.pre.in | 3 ++-
|
||||
3 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
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
|
||||
@@ -193,7 +193,8 @@
|
||||
else:
|
||||
inc_dir = project_base
|
||||
else:
|
||||
- inc_dir = get_python_inc(plat_specific=1)
|
||||
+ lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
|
||||
+ inc_dir = os.path.join(lib_dir, "config")
|
||||
if get_python_version() < '2.2':
|
||||
config_h = 'config.h'
|
||||
else:
|
||||
Index: Python-2.7.1/Lib/sysconfig.py
|
||||
===================================================================
|
||||
--- Python-2.7.1.orig/Lib/sysconfig.py
|
||||
+++ Python-2.7.1/Lib/sysconfig.py
|
||||
@@ -371,7 +371,7 @@
|
||||
else:
|
||||
inc_dir = _PROJECT_BASE
|
||||
else:
|
||||
- inc_dir = get_path('platinclude')
|
||||
+ inc_dir = os.path.join(get_path('stdlib'), "config")
|
||||
return os.path.join(inc_dir, 'pyconfig.h')
|
||||
|
||||
def get_scheme_names():
|
||||
Index: Python-2.7.1/Makefile.pre.in
|
||||
===================================================================
|
||||
--- Python-2.7.1.orig/Makefile.pre.in
|
||||
+++ Python-2.7.1/Makefile.pre.in
|
||||
@@ -967,7 +967,6 @@
|
||||
echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
|
||||
$(INSTALL_DATA) $$i $(DESTDIR)$(INCLUDEPY); \
|
||||
done
|
||||
- $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
|
||||
|
||||
# Install the library and miscellaneous stuff needed for extending/embedding
|
||||
# This goes into $(exec_prefix)
|
||||
@@ -1001,6 +1000,8 @@
|
||||
$(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o
|
||||
$(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in
|
||||
$(INSTALL_DATA) Makefile $(DESTDIR)$(LIBPL)/Makefile
|
||||
+ $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(LIBPL)/pyconfig.h
|
||||
+ $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
|
||||
$(INSTALL_DATA) Modules/Setup $(DESTDIR)$(LIBPL)/Setup
|
||||
$(INSTALL_DATA) Modules/Setup.local $(DESTDIR)$(LIBPL)/Setup.local
|
||||
$(INSTALL_DATA) Modules/Setup.config $(DESTDIR)$(LIBPL)/Setup.config
|
@ -1,18 +0,0 @@
|
||||
# When compiling for an embedded system, we need every bit of
|
||||
# performance we can get. default to optimized with the option
|
||||
# of opt-out.
|
||||
# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
|
||||
|
||||
Index: Python-2.6.1/Python/compile.c
|
||||
===================================================================
|
||||
--- Python-2.6.1.orig/Python/compile.c
|
||||
+++ Python-2.6.1/Python/compile.c
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "symtable.h"
|
||||
#include "opcode.h"
|
||||
|
||||
-int Py_OptimizeFlag = 0;
|
||||
+int Py_OptimizeFlag = 1;
|
||||
|
||||
#define DEFAULT_BLOCK_SIZE 16
|
||||
#define DEFAULT_BLOCKS 8
|
@ -1,34 +0,0 @@
|
||||
diff -Naur Python-2.7.3/configure Python-2.7.3.patch/configure
|
||||
--- Python-2.7.3/configure 2012-04-10 01:07:36.000000000 +0200
|
||||
+++ Python-2.7.3.patch/configure 2012-07-28 04:48:41.720322418 +0200
|
||||
@@ -5425,11 +5425,11 @@
|
||||
# debug builds.
|
||||
OPT="-g -O0 -Wall $STRICT_PROTO"
|
||||
else
|
||||
- OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
|
||||
+ OPT="-g $WRAP $STRICT_PROTO"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
- OPT="-O3 -Wall $STRICT_PROTO"
|
||||
+ OPT="$STRICT_PROTO"
|
||||
;;
|
||||
esac
|
||||
case $ac_sys_system in
|
||||
diff -Naur Python-2.7.3/configure.in Python-2.7.3.patch/configure.in
|
||||
--- Python-2.7.3/configure.in 2012-04-10 01:07:36.000000000 +0200
|
||||
+++ Python-2.7.3.patch/configure.in 2012-07-28 04:48:22.987067842 +0200
|
||||
@@ -946,11 +946,11 @@
|
||||
# debug builds.
|
||||
OPT="-g -O0 -Wall $STRICT_PROTO"
|
||||
else
|
||||
- OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
|
||||
+ OPT="-g $WRAP $STRICT_PROTO"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
- OPT="-O3 -Wall $STRICT_PROTO"
|
||||
+ OPT="$STRICT_PROTO"
|
||||
;;
|
||||
esac
|
||||
case $ac_sys_system in
|
@ -1,68 +0,0 @@
|
||||
diff -Naur Python-2.7.3/Lib/socket.py Python-2.7.3.patch/Lib/socket.py
|
||||
--- Python-2.7.3/Lib/socket.py 2012-04-10 01:07:31.000000000 +0200
|
||||
+++ Python-2.7.3.patch/Lib/socket.py 2014-07-18 04:33:44.132850756 +0200
|
||||
@@ -67,7 +67,6 @@
|
||||
from _ssl import SSLError as sslerror
|
||||
from _ssl import \
|
||||
RAND_add, \
|
||||
- RAND_egd, \
|
||||
RAND_status, \
|
||||
SSL_ERROR_ZERO_RETURN, \
|
||||
SSL_ERROR_WANT_READ, \
|
||||
diff -Naur Python-2.7.3/Lib/ssl.py Python-2.7.3.patch/Lib/ssl.py
|
||||
--- Python-2.7.3/Lib/ssl.py 2012-04-10 01:07:31.000000000 +0200
|
||||
+++ Python-2.7.3.patch/Lib/ssl.py 2014-07-18 05:06:34.938100455 +0200
|
||||
@@ -62,7 +62,7 @@
|
||||
from _ssl import OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_INFO, OPENSSL_VERSION
|
||||
from _ssl import SSLError
|
||||
from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED
|
||||
-from _ssl import RAND_status, RAND_egd, RAND_add
|
||||
+from _ssl import RAND_status, RAND_add
|
||||
from _ssl import \
|
||||
SSL_ERROR_ZERO_RETURN, \
|
||||
SSL_ERROR_WANT_READ, \
|
||||
diff -Naur Python-2.7.3/Modules/_ssl.c Python-2.7.3.patch/Modules/_ssl.c
|
||||
--- Python-2.7.3/Modules/_ssl.c 2012-04-10 01:07:33.000000000 +0200
|
||||
+++ Python-2.7.3.patch/Modules/_ssl.c 2014-07-18 04:37:28.324453450 +0200
|
||||
@@ -1531,32 +1531,6 @@
|
||||
It is necessary to seed the PRNG with RAND_add() on some platforms before\n\
|
||||
using the ssl() function.");
|
||||
|
||||
-static PyObject *
|
||||
-PySSL_RAND_egd(PyObject *self, PyObject *arg)
|
||||
-{
|
||||
- int bytes;
|
||||
-
|
||||
- if (!PyString_Check(arg))
|
||||
- return PyErr_Format(PyExc_TypeError,
|
||||
- "RAND_egd() expected string, found %s",
|
||||
- Py_TYPE(arg)->tp_name);
|
||||
- bytes = RAND_egd(PyString_AS_STRING(arg));
|
||||
- if (bytes == -1) {
|
||||
- PyErr_SetString(PySSLErrorObject,
|
||||
- "EGD connection failed or EGD did not return "
|
||||
- "enough data to seed the PRNG");
|
||||
- return NULL;
|
||||
- }
|
||||
- return PyInt_FromLong(bytes);
|
||||
-}
|
||||
-
|
||||
-PyDoc_STRVAR(PySSL_RAND_egd_doc,
|
||||
-"RAND_egd(path) -> bytes\n\
|
||||
-\n\
|
||||
-Queries the entropy gather daemon (EGD) on the socket named by 'path'.\n\
|
||||
-Returns number of bytes read. Raises SSLError if connection to EGD\n\
|
||||
-fails or if it does provide enough data to seed PRNG.");
|
||||
-
|
||||
#endif
|
||||
|
||||
/* List of functions exported by this module. */
|
||||
@@ -1569,8 +1543,6 @@
|
||||
#ifdef HAVE_OPENSSL_RAND
|
||||
{"RAND_add", PySSL_RAND_add, METH_VARARGS,
|
||||
PySSL_RAND_add_doc},
|
||||
- {"RAND_egd", PySSL_RAND_egd, METH_O,
|
||||
- PySSL_RAND_egd_doc},
|
||||
{"RAND_status", (PyCFunction)PySSL_RAND_status, METH_NOARGS,
|
||||
PySSL_RAND_status_doc},
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user