python3: re-number patches
authorAlexandru Ardelean <ardeleanalex@gmail.com>
Fri, 13 Mar 2015 20:19:13 +0000 (22:19 +0200)
committerAlexandru Ardelean <ardeleanalex@gmail.com>
Sat, 14 Mar 2015 19:18:15 +0000 (21:18 +0200)
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
lang/python3/patches/001-enable-zlib.patch [new file with mode: 0644]
lang/python3/patches/002-do-not-add-include-dirs-when-cross-compiling.patch [new file with mode: 0644]
lang/python3/patches/003-do-not-run-distutils-tests.patch [new file with mode: 0644]
lang/python3/patches/004-do-not-write-bytes-codes.patch [new file with mode: 0644]
lang/python3/patches/110-enable-zlib.patch [deleted file]
lang/python3/patches/120-do-not-add-include-dirs-when-cross-compiling.patch [deleted file]
lang/python3/patches/130-do-not-run-distutils-tests.patch [deleted file]
lang/python3/patches/140-do-not-write-bytes-codes.patch [deleted file]

diff --git a/lang/python3/patches/001-enable-zlib.patch b/lang/python3/patches/001-enable-zlib.patch
new file mode 100644 (file)
index 0000000..780831e
--- /dev/null
@@ -0,0 +1,25 @@
+From 6eeab87bc852481e599325549c854b701bf2e39f Mon Sep 17 00:00:00 2001
+From: Alexandru Ardelean <aa@ocedo.com>
+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 (file)
index 0000000..44be1c8
--- /dev/null
@@ -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 (file)
index 0000000..0291eb1
--- /dev/null
@@ -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 (file)
index 0000000..f624d58
--- /dev/null
@@ -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 (file)
index 780831e..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-From 6eeab87bc852481e599325549c854b701bf2e39f Mon Sep 17 00:00:00 2001
-From: Alexandru Ardelean <aa@ocedo.com>
-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 (file)
index 44be1c8..0000000
+++ /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 (file)
index 0291eb1..0000000
+++ /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 (file)
index f624d58..0000000
+++ /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')