-
Notifications
You must be signed in to change notification settings - Fork 883
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Python: update to Python-2.7.8"
This reverts commit 81c08d1.
- Loading branch information
Showing
18 changed files
with
379 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
135 changes: 135 additions & 0 deletions
135
packages/lang/Python/patches/Python-2.7.3-001_xcompile.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
packages/lang/Python/patches/Python-2.7.3-003_xcompile_disable_modules_and_ssl-0.1.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
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, |
18 changes: 9 additions & 9 deletions
18
...8-004_xcompile_fix_libffi_configure.patch → ...4_xcompile_fix_libffi_configure-0.1.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/lang/Python/patches/Python-2.7.3-005_dont_generate_pyo_and_pyc_files-0.1.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
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()" | ||
|
Oops, something went wrong.