From dd091f235f76bc360f802bcef5033cce5edaced7 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Fri, 13 Mar 2015 22:19:13 +0200 Subject: python3: re-number patches Signed-off-by: Alexandru Ardelean --- lang/python3/patches/001-enable-zlib.patch | 25 +++++++++++++++ ...not-add-include-dirs-when-cross-compiling.patch | 14 ++++++++ .../patches/003-do-not-run-distutils-tests.patch | 37 ++++++++++++++++++++++ .../patches/004-do-not-write-bytes-codes.patch | 22 +++++++++++++ lang/python3/patches/110-enable-zlib.patch | 25 --------------- ...not-add-include-dirs-when-cross-compiling.patch | 14 -------- .../patches/130-do-not-run-distutils-tests.patch | 37 ---------------------- .../patches/140-do-not-write-bytes-codes.patch | 22 ------------- 8 files changed, 98 insertions(+), 98 deletions(-) create mode 100644 lang/python3/patches/001-enable-zlib.patch create mode 100644 lang/python3/patches/002-do-not-add-include-dirs-when-cross-compiling.patch create mode 100644 lang/python3/patches/003-do-not-run-distutils-tests.patch create mode 100644 lang/python3/patches/004-do-not-write-bytes-codes.patch delete mode 100644 lang/python3/patches/110-enable-zlib.patch delete mode 100644 lang/python3/patches/120-do-not-add-include-dirs-when-cross-compiling.patch delete mode 100644 lang/python3/patches/130-do-not-run-distutils-tests.patch delete mode 100644 lang/python3/patches/140-do-not-write-bytes-codes.patch (limited to 'lang/python3') diff --git a/lang/python3/patches/001-enable-zlib.patch b/lang/python3/patches/001-enable-zlib.patch new file mode 100644 index 000000000..780831e86 --- /dev/null +++ b/lang/python3/patches/001-enable-zlib.patch @@ -0,0 +1,25 @@ +From 6eeab87bc852481e599325549c854b701bf2e39f Mon Sep 17 00:00:00 2001 +From: Alexandru Ardelean +Date: Thu, 25 Sep 2014 18:18:29 +0300 +Subject: [PATCH] enable zlib + +--- + Modules/Setup.dist | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Modules/Setup.dist b/Modules/Setup.dist +index 01fb85f..01ac492 100644 +--- a/Modules/Setup.dist ++++ b/Modules/Setup.dist +@@ -358,7 +358,7 @@ _symtable symtablemodule.c + # Andrew Kuchling's zlib module. + # This require zlib 1.1.3 (or later). + # See http://www.gzip.org/zlib/ +-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz ++zlib zlibmodule.c -lz + + # Interface to the Expat XML parser + # +-- +1.8.4.5 + diff --git a/lang/python3/patches/002-do-not-add-include-dirs-when-cross-compiling.patch b/lang/python3/patches/002-do-not-add-include-dirs-when-cross-compiling.patch new file mode 100644 index 000000000..44be1c8ff --- /dev/null +++ b/lang/python3/patches/002-do-not-add-include-dirs-when-cross-compiling.patch @@ -0,0 +1,14 @@ +diff --git a/setup.py b/setup.py +index 93f390f..ace1494 100644 +--- a/setup.py ++++ b/setup.py +@@ -461,7 +461,8 @@ class PyBuildExt(build_ext): + add_dir_to_list(dir_list, directory) + + if os.path.normpath(sys.base_prefix) != '/usr' \ +- and not sysconfig.get_config_var('PYTHONFRAMEWORK'): ++ and not sysconfig.get_config_var('PYTHONFRAMEWORK') \ ++ and not cross_compiling: + # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework + # (PYTHONFRAMEWORK is set) to avoid # linking problems when + # building a framework with different architectures than diff --git a/lang/python3/patches/003-do-not-run-distutils-tests.patch b/lang/python3/patches/003-do-not-run-distutils-tests.patch new file mode 100644 index 000000000..0291eb198 --- /dev/null +++ b/lang/python3/patches/003-do-not-run-distutils-tests.patch @@ -0,0 +1,37 @@ +diff --git a/Makefile.pre.in b/Makefile.pre.in +index f36c11d..f2b6c71 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1217,32 +1217,6 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + done; \ + done + $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt +- if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ +- $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ +- $(DESTDIR)$(LIBDEST)/distutils/tests ; \ +- fi +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- $(PYTHON_FOR_BUILD) -Wi $(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 -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 $(DESTDIR)$(LIBDEST)/compileall.py \ +- -d $(LIBDEST)/site-packages -f \ +- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages +- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +- $(PYTHON_FOR_BUILD) -Wi -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) \ +- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt + + # Create the PLATDIR source directory, if one wasn't distributed.. + $(srcdir)/Lib/$(PLATDIR): diff --git a/lang/python3/patches/004-do-not-write-bytes-codes.patch b/lang/python3/patches/004-do-not-write-bytes-codes.patch new file mode 100644 index 000000000..f624d5862 --- /dev/null +++ b/lang/python3/patches/004-do-not-write-bytes-codes.patch @@ -0,0 +1,22 @@ +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]) */ + 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) + if ((p = Py_GETENV("PYTHONOPTIMIZE")) && *p != '\0') + Py_OptimizeFlag = add_flag(Py_OptimizeFlag, p); + if ((p = Py_GETENV("PYTHONDONTWRITEBYTECODE")) && *p != '\0') +- Py_DontWriteBytecodeFlag = add_flag(Py_DontWriteBytecodeFlag, p); ++ Py_DontWriteBytecodeFlag = atoi(p); + /* The variable is only tested for existence here; _PyRandom_Init will + check its value further. */ + if ((p = Py_GETENV("PYTHONHASHSEED")) && *p != '\0') diff --git a/lang/python3/patches/110-enable-zlib.patch b/lang/python3/patches/110-enable-zlib.patch deleted file mode 100644 index 780831e86..000000000 --- a/lang/python3/patches/110-enable-zlib.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 6eeab87bc852481e599325549c854b701bf2e39f Mon Sep 17 00:00:00 2001 -From: Alexandru Ardelean -Date: Thu, 25 Sep 2014 18:18:29 +0300 -Subject: [PATCH] enable zlib - ---- - Modules/Setup.dist | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Modules/Setup.dist b/Modules/Setup.dist -index 01fb85f..01ac492 100644 ---- a/Modules/Setup.dist -+++ b/Modules/Setup.dist -@@ -358,7 +358,7 @@ _symtable symtablemodule.c - # Andrew Kuchling's zlib module. - # This require zlib 1.1.3 (or later). - # See http://www.gzip.org/zlib/ --#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz -+zlib zlibmodule.c -lz - - # Interface to the Expat XML parser - # --- -1.8.4.5 - diff --git a/lang/python3/patches/120-do-not-add-include-dirs-when-cross-compiling.patch b/lang/python3/patches/120-do-not-add-include-dirs-when-cross-compiling.patch deleted file mode 100644 index 44be1c8ff..000000000 --- a/lang/python3/patches/120-do-not-add-include-dirs-when-cross-compiling.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/setup.py b/setup.py -index 93f390f..ace1494 100644 ---- a/setup.py -+++ b/setup.py -@@ -461,7 +461,8 @@ class PyBuildExt(build_ext): - add_dir_to_list(dir_list, directory) - - if os.path.normpath(sys.base_prefix) != '/usr' \ -- and not sysconfig.get_config_var('PYTHONFRAMEWORK'): -+ and not sysconfig.get_config_var('PYTHONFRAMEWORK') \ -+ and not cross_compiling: - # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework - # (PYTHONFRAMEWORK is set) to avoid # linking problems when - # building a framework with different architectures than diff --git a/lang/python3/patches/130-do-not-run-distutils-tests.patch b/lang/python3/patches/130-do-not-run-distutils-tests.patch deleted file mode 100644 index 0291eb198..000000000 --- a/lang/python3/patches/130-do-not-run-distutils-tests.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/Makefile.pre.in b/Makefile.pre.in -index f36c11d..f2b6c71 100644 ---- a/Makefile.pre.in -+++ b/Makefile.pre.in -@@ -1217,32 +1217,6 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c - done; \ - done - $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt -- if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \ -- $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ -- $(DESTDIR)$(LIBDEST)/distutils/tests ; \ -- fi -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi $(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 -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 $(DESTDIR)$(LIBDEST)/compileall.py \ -- -d $(LIBDEST)/site-packages -f \ -- -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages -- -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ -- $(PYTHON_FOR_BUILD) -Wi -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) \ -- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt - - # Create the PLATDIR source directory, if one wasn't distributed.. - $(srcdir)/Lib/$(PLATDIR): diff --git a/lang/python3/patches/140-do-not-write-bytes-codes.patch b/lang/python3/patches/140-do-not-write-bytes-codes.patch deleted file mode 100644 index f624d5862..000000000 --- a/lang/python3/patches/140-do-not-write-bytes-codes.patch +++ /dev/null @@ -1,22 +0,0 @@ -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]) */ - 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) - if ((p = Py_GETENV("PYTHONOPTIMIZE")) && *p != '\0') - Py_OptimizeFlag = add_flag(Py_OptimizeFlag, p); - if ((p = Py_GETENV("PYTHONDONTWRITEBYTECODE")) && *p != '\0') -- Py_DontWriteBytecodeFlag = add_flag(Py_DontWriteBytecodeFlag, p); -+ Py_DontWriteBytecodeFlag = atoi(p); - /* The variable is only tested for existence here; _PyRandom_Init will - check its value further. */ - if ((p = Py_GETENV("PYTHONHASHSEED")) && *p != '\0') -- cgit