python3: upgrade to version 3.5.0

Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
Alexandru Ardelean
2015-09-14 22:16:15 +03:00
parent f17288c7e3
commit 6ce01594b6
7 changed files with 99 additions and 26 deletions
@@ -1,8 +1,8 @@
diff --git a/Makefile.pre.in b/Makefile.pre.in
index f36c11d..f2b6c71 100644
index ce2c0aa..b0c8322 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1217,32 +1217,6 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
@@ -1256,41 +1256,6 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c
done; \
done
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
@@ -20,7 +20,12 @@ index f36c11d..f2b6c71 100644
- -d $(LIBDEST) -f \
- -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
- $(DESTDIR)$(LIBDEST)
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- $(PYTHON_FOR_BUILD) -Wi -OO $(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 $(DESTDIR)$(LIBDEST)/compileall.py \
- -d $(LIBDEST)/site-packages -f \
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
@@ -29,6 +34,10 @@ index f36c11d..f2b6c71 100644
- -d $(LIBDEST)/site-packages -f \
- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- $(PYTHON_FOR_BUILD) -Wi -OO $(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) \
- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
@@ -1,17 +1,17 @@
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 0327830..df41cda 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -124,7 +124,7 @@ int Py_InteractiveFlag; /* Needed by Py_FdIsInteractive() below */
int Py_InspectFlag; /* Needed to determine whether to exit at SystemExit */
int Py_NoSiteFlag; /* Suppress 'import site' */
int Py_BytesWarningFlag; /* Warn on str(bytes) and str(buffer) */
-int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.py[co]) */
+int Py_DontWriteBytecodeFlag = 1; /* Suppress writing bytecode files (*.py[co]) */
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index a17adf7..415b3f6 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -86,7 +86,7 @@ int Py_BytesWarningFlag; /* Warn on str(bytes) and str(buffer) */
int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */
int Py_FrozenFlag; /* Needed by getpath.c */
int Py_IgnoreEnvironmentFlag; /* e.g. PYTHONPATH, PYTHONHOME */
@@ -350,7 +350,7 @@ _Py_InitializeEx_Private(int install_sigs, int install_importlib)
-int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.py[co]) */
+int Py_DontWriteBytecodeFlag = 1; /* Suppress writing bytecode files (*.py[co]) */
int Py_NoUserSiteDirectory = 0; /* for -s and site.py */
int Py_UnbufferedStdioFlag = 0; /* Unbuffered binary std{in,out,err} */
int Py_HashRandomizationFlag = 0; /* for -R and PYTHONHASHSEED */
@@ -309,7 +309,7 @@ _Py_InitializeEx_Private(int install_sigs, int install_importlib)
if ((p = Py_GETENV("PYTHONOPTIMIZE")) && *p != '\0')
Py_OptimizeFlag = add_flag(Py_OptimizeFlag, p);
if ((p = Py_GETENV("PYTHONDONTWRITEBYTECODE")) && *p != '\0')
@@ -0,0 +1,26 @@
diff --git a/Makefile.pre.in b/Makefile.pre.in
index ce2c0aa..7df56bf 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -691,17 +691,19 @@ Programs/_testembed: Programs/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
############################################################################
# Importlib
+FREEZE_IMPORTLIB ?= ./Programs/_freeze_importlib
+
Programs/_freeze_importlib.o: Programs/_freeze_importlib.c Makefile
Programs/_freeze_importlib: Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN)
$(LINKCC) $(PY_LDFLAGS) -o $@ Programs/_freeze_importlib.o $(LIBRARY_OBJS_OMIT_FROZEN) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
Python/importlib_external.h: $(srcdir)/Lib/importlib/_bootstrap_external.py Programs/_freeze_importlib
- ./Programs/_freeze_importlib \
+ $(FREEZE_IMPORTLIB) \
$(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h
Python/importlib.h: $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib
- ./Programs/_freeze_importlib \
+ $(FREEZE_IMPORTLIB) \
$(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h
@@ -0,0 +1,26 @@
diff --git a/configure b/configure
index e823a08..84c525f 100755
--- a/configure
+++ b/configure
@@ -14365,7 +14365,7 @@ $as_echo_n "checking ABIFLAGS... " >&6; }
$as_echo "$ABIFLAGS" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
$as_echo_n "checking SOABI... " >&6; }
-SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
+SOABI='cpython-'`echo $VERSION | tr -d .`
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
$as_echo "$SOABI" >&6; }
diff --git a/configure.ac b/configure.ac
index 56a73df..1855af5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4314,7 +4314,7 @@ AC_SUBST(SOABI)
AC_MSG_CHECKING(ABIFLAGS)
AC_MSG_RESULT($ABIFLAGS)
AC_MSG_CHECKING(SOABI)
-SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
+SOABI='cpython-'`echo $VERSION | tr -d .`
AC_MSG_RESULT($SOABI)
AC_SUBST(EXT_SUFFIX)
@@ -0,0 +1,12 @@
diff --git a/setup.py b/setup.py
index da67731..928e0de 100644
--- a/setup.py
+++ b/setup.py
@@ -293,6 +293,7 @@ class PyBuildExt(build_ext):
print("Failed to build these modules:")
print_three_column(failed)
print()
+ if cross_compiling: sys.exit(1)
if self.failed_on_import:
failed = self.failed_on_import[:]