From 6728188f97f6a4832f457daaac2819cec48664ef Mon Sep 17 00:00:00 2001 From: opacam Date: Mon, 19 Nov 2018 15:41:57 +0100 Subject: [PATCH] Fix python2's build and clean up the recipe Actions taken: - I found that a lot of basic python modules get not compiled. Here we solve that issue by creating a patch (fix-missing-extensions.patch) adapted from the one applied to the python3's master branch. This new patch replaces the "fix-modules-initialization" (which worked but not compiled the necessary modules into .so files). Now all the needed modules should be present. * Note: **Should be mentioned that the ctypes module builds without a problem for python2 (no need to link with custom libffi as we do in python 3 in pr #1465)** - I reviewed all the patches to move all the unneeded into a sub folder (maybe we can need some of them...) * Note: all the patches where made to be applied into the old python2's build system, and only those which allows the native build to succeed and the ones which fix python initialization should be needed with the new build system - Rename patches to be clear and to remove some upper cases and versions (we will not have many more future versions for python2 and I think that removing this versions make the code more readable) --- pythonforandroid/recipes/python2/__init__.py | 37 +----- ...n-21.patch => fix-api-minor-than-21.patch} | 0 ... => fix-filesystem-default-encoding.patch} | 0 .../python2/patches/fix-init-site.patch | 17 +++ ...x-locale-2.7.15.patch => fix-locale.patch} | 0 .../patches/fix-missing-extensions.patch | 120 ++++++++++++++++++ .../patches/fix-modules-initialization.patch | 90 ------------- .../Python-2.7.15-ctypes-disable-wchar.patch | 0 .../{ => unused}/Python-2.7.15-xcompile.patch | 0 ...n_2.7.15-ctypes-libffi-fix-configure.patch | 0 .../{ => unused}/ctypes-find-library.patch | 0 .../patches/{ => unused}/custom-loader.patch | 0 .../{ => unused}/disable-modules.patch | 0 .../{ => unused}/disable-openpty.patch | 0 .../{ => unused}/ffi-config.sub-2.7.15.patch | 0 .../patches/{ => unused}/fix-dlfcn.patch | 0 .../{ => unused}/fix-dynamic-lookup.patch | 0 .../{ => unused}/fix-ftime-removal.patch | 0 .../{ => unused}/fix-gethostbyaddr.patch | 0 .../{ => unused}/fix-platform-2.7.15.patch | 0 .../fix-remove-corefoundation.patch | 0 .../patches/{ => unused}/fix-termios.patch | 0 .../{ => unused}/modules-locales-2.7.15.patch | 0 .../{ => unused}/verbose-compilation.patch | 0 24 files changed, 143 insertions(+), 121 deletions(-) rename pythonforandroid/recipes/python2/patches/{Python-2.7.15-fix-api-minor-than-21.patch => fix-api-minor-than-21.patch} (100%) rename pythonforandroid/recipes/python2/patches/{fix-filesystemdefaultencoding.patch => fix-filesystem-default-encoding.patch} (100%) create mode 100644 pythonforandroid/recipes/python2/patches/fix-init-site.patch rename pythonforandroid/recipes/python2/patches/{fix-locale-2.7.15.patch => fix-locale.patch} (100%) create mode 100644 pythonforandroid/recipes/python2/patches/fix-missing-extensions.patch delete mode 100644 pythonforandroid/recipes/python2/patches/fix-modules-initialization.patch rename pythonforandroid/recipes/python2/patches/{ => unused}/Python-2.7.15-ctypes-disable-wchar.patch (100%) rename pythonforandroid/recipes/python2/patches/{ => unused}/Python-2.7.15-xcompile.patch (100%) rename pythonforandroid/recipes/python2/patches/{ => unused}/Python_2.7.15-ctypes-libffi-fix-configure.patch (100%) rename pythonforandroid/recipes/python2/patches/{ => unused}/ctypes-find-library.patch (100%) rename pythonforandroid/recipes/python2/patches/{ => unused}/custom-loader.patch (100%) rename pythonforandroid/recipes/python2/patches/{ => unused}/disable-modules.patch (100%) rename pythonforandroid/recipes/python2/patches/{ => unused}/disable-openpty.patch (100%) rename pythonforandroid/recipes/python2/patches/{ => unused}/ffi-config.sub-2.7.15.patch (100%) rename pythonforandroid/recipes/python2/patches/{ => unused}/fix-dlfcn.patch (100%) rename pythonforandroid/recipes/python2/patches/{ => unused}/fix-dynamic-lookup.patch (100%) rename pythonforandroid/recipes/python2/patches/{ => unused}/fix-ftime-removal.patch (100%) rename pythonforandroid/recipes/python2/patches/{ => unused}/fix-gethostbyaddr.patch (100%) rename pythonforandroid/recipes/python2/patches/{ => unused}/fix-platform-2.7.15.patch (100%) rename pythonforandroid/recipes/python2/patches/{ => unused}/fix-remove-corefoundation.patch (100%) rename pythonforandroid/recipes/python2/patches/{ => unused}/fix-termios.patch (100%) rename pythonforandroid/recipes/python2/patches/{ => unused}/modules-locales-2.7.15.patch (100%) rename pythonforandroid/recipes/python2/patches/{ => unused}/verbose-compilation.patch (100%) diff --git a/pythonforandroid/recipes/python2/__init__.py b/pythonforandroid/recipes/python2/__init__.py index a82f7167bc..70fdf9c4c9 100644 --- a/pythonforandroid/recipes/python2/__init__.py +++ b/pythonforandroid/recipes/python2/__init__.py @@ -1,6 +1,4 @@ from pythonforandroid.python import GuestPythonRecipe -from pythonforandroid.patching import ( - is_darwin, is_api_gt, check_all, is_api_lt, is_ndk) class Python2Recipe(GuestPythonRecipe): @@ -24,32 +22,12 @@ class Python2Recipe(GuestPythonRecipe): patches = [ # new 2.7.15 patches - # ('patches/Python-2.7.15-fix-api-minor-than-21.patch', - # is_api_lt(21)), # todo: this should be tested - 'patches/fix-modules-initialization.patch', - 'patches/Python_{version}-ctypes-libffi-fix-configure.patch', - 'patches/ffi-config.sub-{version}.patch', - 'patches/fix-locale-{version}.patch', - 'patches/modules-locales-{version}.patch', - 'patches/fix-platform-{version}.patch', - # migrated patches from 2.7.2 - 'patches/fix-gethostbyaddr.patch', - 'patches/fix-filesystemdefaultencoding.patch', - 'patches/fix-termios.patch', - 'patches/custom-loader.patch', - 'patches/fix-remove-corefoundation.patch', - 'patches/fix-dynamic-lookup.patch', - 'patches/fix-dlfcn.patch', - 'patches/ctypes-find-library.patch', - 'patches/Python-{version}-ctypes-disable-wchar.patch', - 'patches/disable-modules.patch', - 'patches/verbose-compilation.patch', - # migrated special patches from 2.7.2 - ('patches/fix-configure-darwin.patch', is_darwin), - ('patches/fix-distutils-darwin.patch', is_darwin), - ('patches/fix-ftime-removal.patch', is_api_gt(19)), - ('patches/disable-openpty.patch', check_all( - is_api_lt(21), is_ndk('crystax'))) + # ('patches/fix-api-minor-than-21.patch', + # is_api_lt(21)), # Todo: this should be tested + 'patches/fix-missing-extensions.patch', + 'patches/fix-filesystem-default-encoding.patch', + 'patches/fix-locale.patch', + 'patches/fix-init-site.patch', ] configure_args = ('--host={android_host}', @@ -62,10 +40,7 @@ class Python2Recipe(GuestPythonRecipe): 'ac_cv_file__dev_ptc=no', '--without-ensurepip', 'ac_cv_little_endian_double=yes', - - # why python3 works without it? 'ac_cv_header_langinfo_h=no', - '--prefix={prefix}', '--exec-prefix={exec_prefix}') diff --git a/pythonforandroid/recipes/python2/patches/Python-2.7.15-fix-api-minor-than-21.patch b/pythonforandroid/recipes/python2/patches/fix-api-minor-than-21.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/Python-2.7.15-fix-api-minor-than-21.patch rename to pythonforandroid/recipes/python2/patches/fix-api-minor-than-21.patch diff --git a/pythonforandroid/recipes/python2/patches/fix-filesystemdefaultencoding.patch b/pythonforandroid/recipes/python2/patches/fix-filesystem-default-encoding.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/fix-filesystemdefaultencoding.patch rename to pythonforandroid/recipes/python2/patches/fix-filesystem-default-encoding.patch diff --git a/pythonforandroid/recipes/python2/patches/fix-init-site.patch b/pythonforandroid/recipes/python2/patches/fix-init-site.patch new file mode 100644 index 0000000000..2deb4cc29b --- /dev/null +++ b/pythonforandroid/recipes/python2/patches/fix-init-site.patch @@ -0,0 +1,17 @@ +--- Python-2.7.2.orig/Python/pythonrun.c 2010-10-29 05:45:34.000000000 +0200 ++++ Python-2.7.2/Python/pythonrun.c 2011-04-20 17:52:12.000000000 +0200 +@@ -254,9 +254,13 @@ + _PyGILState_Init(interp, tstate); + #endif /* WITH_THREAD */ + ++ /* For PGS4A, we don't want to call initsite, as we won't have the ++ library path set up until start.pyx finishes running. */ ++#if 0 + if (!Py_NoSiteFlag) + initsite(); /* Module site */ +- ++#endif ++ + if ((p = Py_GETENV("PYTHONIOENCODING")) && *p != '\0') { + p = icodeset = codeset = strdup(p); + free_codeset = 1; diff --git a/pythonforandroid/recipes/python2/patches/fix-locale-2.7.15.patch b/pythonforandroid/recipes/python2/patches/fix-locale.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/fix-locale-2.7.15.patch rename to pythonforandroid/recipes/python2/patches/fix-locale.patch diff --git a/pythonforandroid/recipes/python2/patches/fix-missing-extensions.patch b/pythonforandroid/recipes/python2/patches/fix-missing-extensions.patch new file mode 100644 index 0000000000..a098b25634 --- /dev/null +++ b/pythonforandroid/recipes/python2/patches/fix-missing-extensions.patch @@ -0,0 +1,120 @@ +diff -Naurp Python-2.7.15/Modules/Setup.dist.orig Python-2.7.15/Modules/Setup.dist +--- Python-2.7.15/Modules/Setup.dist.orig 2018-04-30 00:47:33.000000000 +0200 ++++ Python-2.7.15/Modules/Setup.dist 2018-11-17 20:40:20.153518694 +0100 +@@ -464,7 +464,7 @@ + # 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 -I$(prefix)/include -L$(exec_prefix)/lib -lz + + # Interface to the Expat XML parser + # +diff -Naurp Python-2.7.15.orig/Makefile.pre.in Python-2.7.15/Makefile.pre.in +--- Python-2.7.15.orig/Makefile.pre.in 2018-04-30 00:47:33.000000000 +0200 ++++ Python-2.7.15/Makefile.pre.in 2018-11-18 00:43:58.777379280 +0100 +@@ -20,6 +20,7 @@ + + # === Variables set by makesetup === + ++MODNAMES= _MODNAMES_ + MODOBJS= _MODOBJS_ + MODLIBS= _MODLIBS_ + +diff -Naurp Python-2.7.15.orig/Modules/_ctypes/libffi/src/arm/sysv.S Python-2.7.15/Modules/_ctypes/libffi/src/arm/sysv.S +--- Python-2.7.15.orig/Modules/_ctypes/libffi/src/arm/sysv.S 2018-04-30 00:47:33.000000000 +0200 ++++ Python-2.7.15/Modules/_ctypes/libffi/src/arm/sysv.S 2018-11-17 22:28:50.925456603 +0100 +@@ -396,7 +396,7 @@ LSYM(Lbase_args): + beq LSYM(Lepilogue_vfp) + + cmp r3, #FFI_TYPE_SINT64 +- stmeqia r2, {r0, r1} ++ stmiaeq r2, {r0, r1} + beq LSYM(Lepilogue_vfp) + + cmp r3, #FFI_TYPE_FLOAT +diff -Naurp Python-2.7.15.orig/Modules/makesetup Python-2.7.15/Modules/makesetup +--- Python-2.7.15.orig/Modules/makesetup 2018-04-30 00:47:33.000000000 +0200 ++++ Python-2.7.15/Modules/makesetup 2018-11-18 00:43:10.289379743 +0100 +@@ -110,6 +110,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' | + # Rules appended by makedepend + " >$rulesf + DEFS= ++ NAMES= + MODS= + SHAREDMODS= + OBJS= +@@ -181,7 +182,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' | + *.*) echo 1>&2 "bad word $arg in $line" + exit 1;; + -u) skip=libs; libs="$libs -u";; +- [a-zA-Z_]*) mods="$mods $arg";; ++ [a-zA-Z_]*) NAMES="$NAMES $arg"; mods="$mods $arg";; + *) echo 1>&2 "bad word $arg in $line" + exit 1;; + esac +@@ -284,6 +285,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' | + echo "1i\\" >$sedf + str="# Generated automatically from $makepre by makesetup." + echo "$str" >>$sedf ++ echo "s%_MODNAMES_%$NAMES%" >>$sedf + echo "s%_MODOBJS_%$OBJS%" >>$sedf + echo "s%_MODLIBS_%$LIBS%" >>$sedf + echo "/Definitions added by makesetup/a$NL$NL$DEFS" >>$sedf +diff -Naurp Python-2.7.15.orig/setup.py Python-2.7.15/setup.py +--- Python-2.7.15.orig/setup.py 2018-04-30 00:47:33.000000000 +0200 ++++ Python-2.7.15/setup.py 2018-11-18 00:40:50.021381080 +0100 +@@ -217,7 +217,11 @@ class PyBuildExt(build_ext): + # Python header files + headers = [sysconfig.get_config_h_filename()] + headers += glob(os.path.join(sysconfig.get_path('include'), "*.h")) +- for ext in self.extensions[:]: ++ # The sysconfig variable built by makesetup, listing the already ++ # built modules as configured by the Setup files. ++ modnames = sysconfig.get_config_var('MODNAMES').split() ++ removed_modules = [] ++ for ext in self.extensions: + ext.sources = [ find_module_file(filename, moddirlist) + for filename in ext.sources ] + if ext.depends is not None: +@@ -231,10 +235,10 @@ class PyBuildExt(build_ext): + # platform specific include directories + ext.include_dirs.extend(incdirlist) + +- # If a module has already been built statically, +- # don't build it here +- if ext.name in sys.builtin_module_names: +- self.extensions.remove(ext) ++ # If a module has already been built by the Makefile, ++ # don't build it here. ++ if ext.name in modnames: ++ removed_modules.append(ext) + + # Parse Modules/Setup and Modules/Setup.local to figure out which + # modules are turned on in the file. +@@ -249,8 +253,9 @@ class PyBuildExt(build_ext): + input.close() + + for ext in self.extensions[:]: +- if ext.name in remove_modules: +- self.extensions.remove(ext) ++ if removed_modules: ++ self.extensions = [x for x in self.extensions if x not in ++ removed_modules] + + # When you run "make CC=altcc" or something similar, you really want + # those environment variables passed into the setup.py phase. Here's +@@ -290,6 +295,13 @@ class PyBuildExt(build_ext): + " detect_modules() for the module's name.") + print + ++ if removed_modules: ++ print("The following modules found by detect_modules() in" ++ " setup.py, have been") ++ print("built by the Makefile instead, as configured by the" ++ " Setup files:") ++ print_three_column([ext.name for ext in removed_modules]) ++ + if self.failed: + failed = self.failed[:] + print diff --git a/pythonforandroid/recipes/python2/patches/fix-modules-initialization.patch b/pythonforandroid/recipes/python2/patches/fix-modules-initialization.patch deleted file mode 100644 index 128c6681cc..0000000000 --- a/pythonforandroid/recipes/python2/patches/fix-modules-initialization.patch +++ /dev/null @@ -1,90 +0,0 @@ ---- Python-2.7.15/Modules/Setup.dist.orig 2018-04-30 00:47:33.000000000 +0200 -+++ Python-2.7.15/Modules/Setup.dist 2018-11-13 20:25:38.096160189 +0100 -@@ -168,31 +168,31 @@ - - # Modules that should always be present (non UNIX dependent): - --#array arraymodule.c # array objects -+array arraymodule.c # array objects - #cmath cmathmodule.c _math.c # -lm # complex math library functions --#math mathmodule.c _math.c # -lm # math library functions, e.g. sin() --#_struct _struct.c # binary structure packing/unpacking --#time timemodule.c # -lm # time operations and variables --#operator operator.c # operator.add() and similar goodies -+math mathmodule.c _math.c # -lm # math library functions, e.g. sin() -+_struct _struct.c # binary structure packing/unpacking -+time timemodule.c # -lm # time operations and variables -+operator operator.c # operator.add() and similar goodies - #_testcapi _testcapimodule.c # Python C API test module --#_random _randommodule.c # Random number generator --#_collections _collectionsmodule.c # Container types -+_random _randommodule.c # Random number generator -+_collections _collectionsmodule.c # Container types - #_heapq _heapqmodule.c # Heapq type --#itertools itertoolsmodule.c # Functions creating iterators for efficient looping -+itertools itertoolsmodule.c # Functions creating iterators for efficient looping - #strop stropmodule.c # String manipulations --#_functools _functoolsmodule.c # Tools for working with functions and callable objects -+_functools _functoolsmodule.c # Tools for working with functions and callable objects - #_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator - #_pickle _pickle.c # pickle accelerator - #datetime datetimemodule.c # date/time type --#_bisect _bisectmodule.c # Bisection algorithms -+_bisect _bisectmodule.c # Bisection algorithms - --#unicodedata unicodedata.c # static Unicode character database -+unicodedata unicodedata.c # static Unicode character database - - # access to ISO C locale support - #_locale _localemodule.c # -lintl - - # Standard I/O baseline --#_io -I$(srcdir)/Modules/_io _io/bufferedio.c _io/bytesio.c _io/fileio.c _io/iobase.c _io/_iomodule.c _io/stringio.c _io/textio.c -+_io -I$(srcdir)/Modules/_io _io/bufferedio.c _io/bytesio.c _io/fileio.c _io/iobase.c _io/_iomodule.c _io/stringio.c _io/textio.c - - - # Modules with some UNIX dependencies -- on by default: -@@ -252,14 +252,14 @@ - # Message-Digest Algorithm, described in RFC 1321. The necessary files - # md5.c and md5.h are included here. - --#_md5 md5module.c md5.c -+_md5 md5module.c md5.c - - - # The _sha module implements the SHA checksum algorithms. - # (NIST's Secure Hash Algorithms.) --#_sha shamodule.c --#_sha256 sha256module.c --#_sha512 sha512module.c -+_sha shamodule.c -+_sha256 sha256module.c -+_sha512 sha512module.c - - - # SGI IRIX specific modules -- off by default. -@@ -434,13 +434,13 @@ - - - # Helper module for various ascii-encoders --#binascii binascii.c -+binascii binascii.c - - # Fred Drake's interface to the Python parser - #parser parsermodule.c - - # cStringIO and cPickle --#cStringIO cStringIO.c -+cStringIO cStringIO.c - #cPickle cPickle.c - - -@@ -464,7 +464,7 @@ - # 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 -I$(prefix)/include -L$(exec_prefix)/lib -lz - - # Interface to the Expat XML parser - # diff --git a/pythonforandroid/recipes/python2/patches/Python-2.7.15-ctypes-disable-wchar.patch b/pythonforandroid/recipes/python2/patches/unused/Python-2.7.15-ctypes-disable-wchar.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/Python-2.7.15-ctypes-disable-wchar.patch rename to pythonforandroid/recipes/python2/patches/unused/Python-2.7.15-ctypes-disable-wchar.patch diff --git a/pythonforandroid/recipes/python2/patches/Python-2.7.15-xcompile.patch b/pythonforandroid/recipes/python2/patches/unused/Python-2.7.15-xcompile.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/Python-2.7.15-xcompile.patch rename to pythonforandroid/recipes/python2/patches/unused/Python-2.7.15-xcompile.patch diff --git a/pythonforandroid/recipes/python2/patches/Python_2.7.15-ctypes-libffi-fix-configure.patch b/pythonforandroid/recipes/python2/patches/unused/Python_2.7.15-ctypes-libffi-fix-configure.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/Python_2.7.15-ctypes-libffi-fix-configure.patch rename to pythonforandroid/recipes/python2/patches/unused/Python_2.7.15-ctypes-libffi-fix-configure.patch diff --git a/pythonforandroid/recipes/python2/patches/ctypes-find-library.patch b/pythonforandroid/recipes/python2/patches/unused/ctypes-find-library.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/ctypes-find-library.patch rename to pythonforandroid/recipes/python2/patches/unused/ctypes-find-library.patch diff --git a/pythonforandroid/recipes/python2/patches/custom-loader.patch b/pythonforandroid/recipes/python2/patches/unused/custom-loader.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/custom-loader.patch rename to pythonforandroid/recipes/python2/patches/unused/custom-loader.patch diff --git a/pythonforandroid/recipes/python2/patches/disable-modules.patch b/pythonforandroid/recipes/python2/patches/unused/disable-modules.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/disable-modules.patch rename to pythonforandroid/recipes/python2/patches/unused/disable-modules.patch diff --git a/pythonforandroid/recipes/python2/patches/disable-openpty.patch b/pythonforandroid/recipes/python2/patches/unused/disable-openpty.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/disable-openpty.patch rename to pythonforandroid/recipes/python2/patches/unused/disable-openpty.patch diff --git a/pythonforandroid/recipes/python2/patches/ffi-config.sub-2.7.15.patch b/pythonforandroid/recipes/python2/patches/unused/ffi-config.sub-2.7.15.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/ffi-config.sub-2.7.15.patch rename to pythonforandroid/recipes/python2/patches/unused/ffi-config.sub-2.7.15.patch diff --git a/pythonforandroid/recipes/python2/patches/fix-dlfcn.patch b/pythonforandroid/recipes/python2/patches/unused/fix-dlfcn.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/fix-dlfcn.patch rename to pythonforandroid/recipes/python2/patches/unused/fix-dlfcn.patch diff --git a/pythonforandroid/recipes/python2/patches/fix-dynamic-lookup.patch b/pythonforandroid/recipes/python2/patches/unused/fix-dynamic-lookup.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/fix-dynamic-lookup.patch rename to pythonforandroid/recipes/python2/patches/unused/fix-dynamic-lookup.patch diff --git a/pythonforandroid/recipes/python2/patches/fix-ftime-removal.patch b/pythonforandroid/recipes/python2/patches/unused/fix-ftime-removal.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/fix-ftime-removal.patch rename to pythonforandroid/recipes/python2/patches/unused/fix-ftime-removal.patch diff --git a/pythonforandroid/recipes/python2/patches/fix-gethostbyaddr.patch b/pythonforandroid/recipes/python2/patches/unused/fix-gethostbyaddr.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/fix-gethostbyaddr.patch rename to pythonforandroid/recipes/python2/patches/unused/fix-gethostbyaddr.patch diff --git a/pythonforandroid/recipes/python2/patches/fix-platform-2.7.15.patch b/pythonforandroid/recipes/python2/patches/unused/fix-platform-2.7.15.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/fix-platform-2.7.15.patch rename to pythonforandroid/recipes/python2/patches/unused/fix-platform-2.7.15.patch diff --git a/pythonforandroid/recipes/python2/patches/fix-remove-corefoundation.patch b/pythonforandroid/recipes/python2/patches/unused/fix-remove-corefoundation.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/fix-remove-corefoundation.patch rename to pythonforandroid/recipes/python2/patches/unused/fix-remove-corefoundation.patch diff --git a/pythonforandroid/recipes/python2/patches/fix-termios.patch b/pythonforandroid/recipes/python2/patches/unused/fix-termios.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/fix-termios.patch rename to pythonforandroid/recipes/python2/patches/unused/fix-termios.patch diff --git a/pythonforandroid/recipes/python2/patches/modules-locales-2.7.15.patch b/pythonforandroid/recipes/python2/patches/unused/modules-locales-2.7.15.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/modules-locales-2.7.15.patch rename to pythonforandroid/recipes/python2/patches/unused/modules-locales-2.7.15.patch diff --git a/pythonforandroid/recipes/python2/patches/verbose-compilation.patch b/pythonforandroid/recipes/python2/patches/unused/verbose-compilation.patch similarity index 100% rename from pythonforandroid/recipes/python2/patches/verbose-compilation.patch rename to pythonforandroid/recipes/python2/patches/unused/verbose-compilation.patch