diff --git a/README.md b/README.md index 3d67e63483..62cc2a2ea6 100644 --- a/README.md +++ b/README.md @@ -97,14 +97,14 @@ new recipe for python3 (3.7.1) has a new build system which has been applied to the ancient python recipe, allowing us to bump the python2 version number to 2.7.15. This change, unifies the build process for both python recipes, and probably solve some issues detected over the -years. Also should be mentioned that the old python recipe is still -usable, and has been renamed to `python2legacy`. This `python2legacy` -recipe allow us to build with a minimum api lower than 21, which is -not the case for the new python recipes which are limited to a minimum -api of 21. All this work has been done using android ndk version r17c, -and your build should success with that version...but be aware that -the project is in constant development so...the ndk version will -change at some time. +years. Also should be mentioned that this **unified python recipes** +require to target to a **minimum api level of 21**, +*Android 5.0 - Lollipop*, so in case the you need to build targeting an +api level below 21, you must use an old version of python-for-android +(<=0.7.1). All this work has been done using android ndk version r17c, +and your build should success with that version...but be aware that the +project is in constant development so...the ndk version will change at +some time. Those mentioned changes has been done this way to make easier the transition between python3 and python2. We will slowly phase out python2 support diff --git a/pythonforandroid/bootstrap.py b/pythonforandroid/bootstrap.py index b4a9a9e4c2..3480b3241b 100755 --- a/pythonforandroid/bootstrap.py +++ b/pythonforandroid/bootstrap.py @@ -51,7 +51,7 @@ class Bootstrap(object): # All bootstraps should include Python in some way: recipe_depends = [ - ("python2", "python2legacy", "python3", "python3crystax"), + ("python2", "python3", "python3crystax"), 'android', ] @@ -275,8 +275,6 @@ def strip_libraries(self, arch): libs_dir = join(self.dist_dir, '_python_bundle', '_python_bundle', 'modules') - if self.ctx.python_recipe.name == 'python2legacy': - libs_dir = join(self.dist_dir, 'private') filens = shprint(sh.find, libs_dir, join(self.dist_dir, 'libs'), '-iname', '*.so', _env=env).stdout.decode('utf-8') diff --git a/pythonforandroid/bootstraps/common/build/jni/application/src/start.c b/pythonforandroid/bootstraps/common/build/jni/application/src/start.c index dff21374b5..a88ec74c74 100644 --- a/pythonforandroid/bootstraps/common/build/jni/application/src/start.c +++ b/pythonforandroid/bootstraps/common/build/jni/application/src/start.c @@ -232,20 +232,6 @@ int main(int argc, char *argv[]) { * replace sys.path with our path */ PyRun_SimpleString("import sys, posix\n"); - if (dir_exists("lib")) { - /* If we built our own python, set up the paths correctly. - * This is only the case if we are using the python2legacy recipe - */ - LOGP("Setting up python from ANDROID_APP_PATH"); - PyRun_SimpleString("private = posix.environ['ANDROID_APP_PATH']\n" - "argument = posix.environ['ANDROID_ARGUMENT']\n" - "sys.path[:] = [ \n" - " private + '/lib/python27.zip', \n" - " private + '/lib/python2.7/', \n" - " private + '/lib/python2.7/lib-dynload/', \n" - " private + '/lib/python2.7/site-packages/', \n" - " argument ]\n"); - } char add_site_packages_dir[256]; if (dir_exists(crystax_python_dir)) { diff --git a/pythonforandroid/bootstraps/sdl2/__init__.py b/pythonforandroid/bootstraps/sdl2/__init__.py index b865348907..dde5f7f79b 100644 --- a/pythonforandroid/bootstraps/sdl2/__init__.py +++ b/pythonforandroid/bootstraps/sdl2/__init__.py @@ -34,11 +34,6 @@ def run_distribute(self): info("Copying Python distribution") python_bundle_dir = join('_python_bundle', '_python_bundle') - if 'python2legacy' in self.ctx.recipe_build_order: - # a special case with its own packaging location - python_bundle_dir = 'private' - # And also must had an install directory, make sure of that - self.ctx.python_recipe.create_python_install(self.dist_dir) self.distribute_libs(arch, [self.ctx.get_libs_dir(arch.arch)]) self.distribute_javaclasses(self.ctx.javaclass_dir, diff --git a/pythonforandroid/build.py b/pythonforandroid/build.py index f8a13205c5..f926ba7563 100644 --- a/pythonforandroid/build.py +++ b/pythonforandroid/build.py @@ -471,9 +471,6 @@ def get_site_packages_dir(self, arch=None): '''Returns the location of site-packages in the python-install build dir. ''' - if self.python_recipe.name == 'python2legacy': - return join(self.get_python_install_dir(), - 'lib', 'python2.7', 'site-packages') return self.get_python_install_dir() def get_libs_dir(self, arch): diff --git a/pythonforandroid/recipe.py b/pythonforandroid/recipe.py index ce925d4429..f899aa927b 100644 --- a/pythonforandroid/recipe.py +++ b/pythonforandroid/recipe.py @@ -730,7 +730,7 @@ class PythonRecipe(Recipe): def __init__(self, *args, **kwargs): super(PythonRecipe, self).__init__(*args, **kwargs) depends = self.depends - depends.append(('python2', 'python2legacy', 'python3', 'python3crystax')) + depends.append(('python2', 'python3', 'python3crystax')) depends = list(set(depends)) self.depends = depends @@ -753,7 +753,7 @@ def real_hostpython_location(self): host_build = Recipe.get_recipe(host_name, self.ctx).get_build_dir() if host_name in ['hostpython2', 'hostpython3']: return join(host_build, 'native-build', 'python') - elif host_name in ['hostpython3crystax', 'hostpython2legacy']: + elif host_name in ['hostpython3crystax']: return join(host_build, 'hostpython') else: python_recipe = self.ctx.python_recipe @@ -795,10 +795,6 @@ def get_recipe_env(self, arch=None, with_flags_in_cc=True): self.ctx.python_recipe.major_minor_version_string) if python_name == 'python3': env['LDFLAGS'] += 'm' - elif python_name == 'python2legacy': - env['PYTHON_ROOT'] = join( - self.ctx.python_recipe.get_build_dir( - arch.arch), 'python-install') else: ndk_dir_python = join(self.ctx.ndk_dir, 'sources', 'python', python_version) @@ -850,27 +846,11 @@ def install_python_package(self, arch, name=None, env=None, is_dir=True): with current_directory(self.get_build_dir(arch.arch)): hostpython = sh.Command(self.hostpython_location) - - if self.ctx.python_recipe.name != 'python2legacy': - hpenv = env.copy() - shprint(hostpython, 'setup.py', 'install', '-O2', - '--root={}'.format(self.ctx.get_python_install_dir()), - '--install-lib=.', - _env=hpenv, *self.setup_extra_args) - elif self.call_hostpython_via_targetpython: - shprint(hostpython, 'setup.py', 'install', '-O2', _env=env, - *self.setup_extra_args) - else: # python2legacy - hppath = join(dirname(self.hostpython_location), 'Lib', 'site-packages') - hpenv = env.copy() - if 'PYTHONPATH' in hpenv: - hpenv['PYTHONPATH'] = ':'.join([hppath] + hpenv['PYTHONPATH'].split(':')) - else: - hpenv['PYTHONPATH'] = hppath - shprint(hostpython, 'setup.py', 'install', '-O2', - '--root={}'.format(self.ctx.get_python_install_dir()), - '--install-lib=lib/python2.7/site-packages', - _env=hpenv, *self.setup_extra_args) + hpenv = env.copy() + shprint(hostpython, 'setup.py', 'install', '-O2', + '--root={}'.format(self.ctx.get_python_install_dir()), + '--install-lib=.', + _env=hpenv, *self.setup_extra_args) # If asked, also install in the hostpython build dir if self.install_in_hostpython: @@ -974,7 +954,7 @@ class CythonRecipe(PythonRecipe): def __init__(self, *args, **kwargs): super(CythonRecipe, self).__init__(*args, **kwargs) depends = self.depends - depends.append(('python2', 'python2legacy', 'python3', 'python3crystax')) + depends.append(('python2', 'python3', 'python3crystax')) depends = list(set(depends)) self.depends = depends @@ -1022,18 +1002,12 @@ def strip_object_files(self, arch, env, build_dir=None): build_dir = self.get_build_dir(arch.arch) with current_directory(build_dir): info('Stripping object files') - if self.ctx.python_recipe.name == 'python2legacy': - info('Stripping object files') - build_lib = glob.glob('./build/lib*') - shprint(sh.find, build_lib[0], '-name', '*.o', '-exec', - env['STRIP'], '{}', ';', _env=env) - else: - shprint(sh.find, '.', '-iname', '*.so', '-exec', - '/usr/bin/echo', '{}', ';', _env=env) - shprint(sh.find, '.', '-iname', '*.so', '-exec', - env['STRIP'].split(' ')[0], '--strip-unneeded', - # '/usr/bin/strip', '--strip-unneeded', - '{}', ';', _env=env) + shprint(sh.find, '.', '-iname', '*.so', '-exec', + '/usr/bin/echo', '{}', ';', _env=env) + shprint(sh.find, '.', '-iname', '*.so', '-exec', + env['STRIP'].split(' ')[0], '--strip-unneeded', + # '/usr/bin/strip', '--strip-unneeded', + '{}', ';', _env=env) def cythonize_file(self, env, build_dir, filename): short_filename = filename @@ -1071,10 +1045,7 @@ def get_recipe_env(self, arch, with_flags_in_cc=True): env['LDFLAGS'] = (env['LDFLAGS'] + ' -L{}'.format(join(self.ctx.bootstrap.build_dir, 'libs', arch.arch))) - if self.ctx.python_recipe.name == 'python2legacy': - env['LDSHARED'] = join(self.ctx.root_dir, 'tools', 'liblink.sh') - else: - env['LDSHARED'] = env['CC'] + ' -shared' + env['LDSHARED'] = env['CC'] + ' -shared' # shprint(sh.whereis, env['LDSHARED'], _env=env) env['LIBLINK'] = 'NOTNONE' env['NDKPLATFORM'] = self.ctx.ndk_platform diff --git a/pythonforandroid/recipes/hostpython2/__init__.py b/pythonforandroid/recipes/hostpython2/__init__.py index 39a75e43d9..08d45ba564 100644 --- a/pythonforandroid/recipes/hostpython2/__init__.py +++ b/pythonforandroid/recipes/hostpython2/__init__.py @@ -12,7 +12,7 @@ class Hostpython2Recipe(HostPythonRecipe): ''' version = '2.7.15' name = 'hostpython2' - conflicts = ['hostpython3', 'hostpython3crystax', 'hostpython2legacy'] + conflicts = ['hostpython3', 'hostpython3crystax'] recipe = Hostpython2Recipe() diff --git a/pythonforandroid/recipes/hostpython2legacy/Setup b/pythonforandroid/recipes/hostpython2legacy/Setup deleted file mode 100644 index d21c893650..0000000000 --- a/pythonforandroid/recipes/hostpython2legacy/Setup +++ /dev/null @@ -1,495 +0,0 @@ -# -*- makefile -*- -# The file Setup is used by the makesetup script to construct the files -# Makefile and config.c, from Makefile.pre and config.c.in, -# respectively. The file Setup itself is initially copied from -# Setup.dist; once it exists it will not be overwritten, so you can edit -# Setup to your heart's content. Note that Makefile.pre is created -# from Makefile.pre.in by the toplevel configure script. - -# (VPATH notes: Setup and Makefile.pre are in the build directory, as -# are Makefile and config.c; the *.in and *.dist files are in the source -# directory.) - -# Each line in this file describes one or more optional modules. -# Modules enabled here will not be compiled by the setup.py script, -# so the file can be used to override setup.py's behavior. - -# Lines have the following structure: -# -# ... [ ...] [ ...] [ ...] -# -# is anything ending in .c (.C, .cc, .c++ are C++ files) -# is anything starting with -I, -D, -U or -C -# is anything ending in .a or beginning with -l or -L -# is anything else but should be a valid Python -# identifier (letters, digits, underscores, beginning with non-digit) -# -# (As the makesetup script changes, it may recognize some other -# arguments as well, e.g. *.so and *.sl as libraries. See the big -# case statement in the makesetup script.) -# -# Lines can also have the form -# -# = -# -# which defines a Make variable definition inserted into Makefile.in -# -# Finally, if a line contains just the word "*shared*" (without the -# quotes but with the stars), then the following modules will not be -# built statically. The build process works like this: -# -# 1. Build all modules that are declared as static in Modules/Setup, -# combine them into libpythonxy.a, combine that into python. -# 2. Build all modules that are listed as shared in Modules/Setup. -# 3. Invoke setup.py. That builds all modules that -# a) are not builtin, and -# b) are not listed in Modules/Setup, and -# c) can be build on the target -# -# Therefore, modules declared to be shared will not be -# included in the config.c file, nor in the list of objects to be -# added to the library archive, and their linker options won't be -# added to the linker options. Rules to create their .o files and -# their shared libraries will still be added to the Makefile, and -# their names will be collected in the Make variable SHAREDMODS. This -# is used to build modules as shared libraries. (They can be -# installed using "make sharedinstall", which is implied by the -# toplevel "make install" target.) (For compatibility, -# *noconfig* has the same effect as *shared*.) -# -# In addition, *static* explicitly declares the following modules to -# be static. Lines containing "*static*" and "*shared*" may thus -# alternate throughout this file. - -# NOTE: As a standard policy, as many modules as can be supported by a -# platform should be present. The distribution comes with all modules -# enabled that are supported by most platforms and don't require you -# to ftp sources from elsewhere. - - -# Some special rules to define PYTHONPATH. -# Edit the definitions below to indicate which options you are using. -# Don't add any whitespace or comments! - -# Directories where library files get installed. -# DESTLIB is for Python modules; MACHDESTLIB for shared libraries. -DESTLIB=$(LIBDEST) -MACHDESTLIB=$(BINLIBDEST) - -# NOTE: all the paths are now relative to the prefix that is computed -# at run time! - -# Standard path -- don't edit. -# No leading colon since this is the first entry. -# Empty since this is now just the runtime prefix. -DESTPATH= - -# Site specific path components -- should begin with : if non-empty -SITEPATH= - -# Standard path components for test modules -TESTPATH= - -# Path components for machine- or system-dependent modules and shared libraries -MACHDEPPATH=:plat-$(MACHDEP) -EXTRAMACHDEPPATH= - -# Path component for the Tkinter-related modules -# The TKPATH variable is always enabled, to save you the effort. -TKPATH=:lib-tk - -# Path component for old modules. -OLDPATH=:lib-old - -COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH)$(TKPATH)$(OLDPATH) -PYTHONPATH=$(COREPYTHONPATH) - - -# The modules listed here can't be built as shared libraries for -# various reasons; therefore they are listed here instead of in the -# normal order. - -# This only contains the minimal set of modules required to run the -# setup.py script in the root of the Python source tree. - -posix posixmodule.c # posix (UNIX) system calls -errno errnomodule.c # posix (UNIX) errno values -pwd pwdmodule.c # this is needed to find out the user's home dir - # if $HOME is not set -_sre _sre.c # Fredrik Lundh's new regular expressions -_codecs _codecsmodule.c # access to the builtin codecs and codec registry - -# The zipimport module is always imported at startup. Having it as a -# builtin module avoids some bootstrapping problems and reduces overhead. -zipimport zipimport.c - -# The rest of the modules listed in this file are all commented out by -# default. Usually they can be detected and built as dynamically -# loaded modules by the new setup.py script added in Python 2.1. If -# you're on a platform that doesn't support dynamic loading, want to -# compile modules statically into the Python binary, or need to -# specify some odd set of compiler switches, you can uncomment the -# appropriate lines below. - -# ====================================================================== - -# The Python symtable module depends on .h files that setup.py doesn't track -_symtable symtablemodule.c - -# The SGI specific GL module: - -GLHACK=-Dclear=__GLclear -#gl glmodule.c cgensupport.c -I$(srcdir) $(GLHACK) -lgl -lX11 - -# Pure module. Cannot be linked dynamically. -# -DWITH_QUANTIFY, -DWITH_PURIFY, or -DWITH_ALL_PURE -#WHICH_PURE_PRODUCTS=-DWITH_ALL_PURE -#PURE_INCLS=-I/usr/local/include -#PURE_STUBLIBS=-L/usr/local/lib -lpurify_stubs -lquantify_stubs -#pure puremodule.c $(WHICH_PURE_PRODUCTS) $(PURE_INCLS) $(PURE_STUBLIBS) - -# Uncommenting the following line tells makesetup that all following -# modules are to be built as shared libraries (see above for more -# detail; also note that *static* reverses this effect): - -#*shared* - -# GNU readline. Unlike previous Python incarnations, GNU readline is -# now incorporated in an optional module, configured in the Setup file -# instead of by a configure script switch. You may have to insert a -# -L option pointing to the directory where libreadline.* lives, -# and you may have to change -ltermcap to -ltermlib or perhaps remove -# it, depending on your system -- see the GNU readline instructions. -# It's okay for this to be a shared library, too. - -#readline readline.c -lreadline -ltermcap - - -# Modules that should always be present (non UNIX dependent): - -array arraymodule.c # array objects -cmath cmathmodule.c # -lm # complex math library functions -math mathmodule.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 -_weakref _weakref.c # basic weak reference support -#_testcapi _testcapimodule.c # Python C API test module -_random _randommodule.c # Random number generator -_collections _collectionsmodule.c # Container types -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 -_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 - -#unicodedata unicodedata.c # static Unicode character database - -# access to ISO C locale support -#_locale _localemodule.c # -lintl - - -# Modules with some UNIX dependencies -- on by default: -# (If you have a really backward UNIX, select and socket may not be -# supported...) - -fcntl fcntlmodule.c # fcntl(2) and ioctl(2) -#spwd spwdmodule.c # spwd(3) -#grp grpmodule.c # grp(3) -select selectmodule.c # select(2); not on ancient System V - -# Memory-mapped files (also works on Win32). -#mmap mmapmodule.c - -# CSV file helper -#_csv _csv.c - -# Socket module helper for socket(2) -_socket socketmodule.c - -# Socket module helper for SSL support; you must comment out the other -# socket line above, and possibly edit the SSL variable: -#SSL=/usr/local/ssl -#_ssl _ssl.c \ -# -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ -# -L$(SSL)/lib -lssl -lcrypto - -# The crypt module is now disabled by default because it breaks builds -# on many systems (where -lcrypt is needed), e.g. Linux (I believe). -# -# First, look at Setup.config; configure may have set this for you. - -#crypt cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems - - -# Some more UNIX dependent modules -- off by default, since these -# are not supported by all UNIX systems: - -#nis nismodule.c -lnsl # Sun yellow pages -- not everywhere -#termios termios.c # Steen Lumholt's termios module -#resource resource.c # Jeremy Hylton's rlimit interface - - -# Multimedia modules -- off by default. -# These don't work for 64-bit platforms!!! -# #993173 says audioop works on 64-bit platforms, though. -# These represent audio samples or images as strings: - -#audioop audioop.c # Operations on audio samples -#imageop imageop.c # Operations on images - - -# Note that the _md5 and _sha modules are normally only built if the -# system does not have the OpenSSL libs containing an optimized version. - -# The _md5 module implements the RSA Data Security, Inc. MD5 -# Message-Digest Algorithm, described in RFC 1321. The necessary files -# md5.c and md5.h are included here. - -_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 - - -# SGI IRIX specific modules -- off by default. - -# These module work on any SGI machine: - -# *** gl must be enabled higher up in this file *** -#fm fmmodule.c $(GLHACK) -lfm -lgl # Font Manager -#sgi sgimodule.c # sgi.nap() and a few more - -# This module requires the header file -# /usr/people/4Dgifts/iristools/include/izoom.h: -#imgfile imgfile.c -limage -lgutil -lgl -lm # Image Processing Utilities - - -# These modules require the Multimedia Development Option (I think): - -#al almodule.c -laudio # Audio Library -#cd cdmodule.c -lcdaudio -lds -lmediad # CD Audio Library -#cl clmodule.c -lcl -lawareaudio # Compression Library -#sv svmodule.c yuvconvert.c -lsvideo -lXext -lX11 # Starter Video - - -# The FORMS library, by Mark Overmars, implements user interface -# components such as dialogs and buttons using SGI's GL and FM -# libraries. You must ftp the FORMS library separately from -# ftp://ftp.cs.ruu.nl/pub/SGI/FORMS. It was tested with FORMS 2.2a. -# NOTE: if you want to be able to use FORMS and curses simultaneously -# (or both link them statically into the same binary), you must -# compile all of FORMS with the cc option "-Dclear=__GLclear". - -# The FORMS variable must point to the FORMS subdirectory of the forms -# toplevel directory: - -#FORMS=/ufs/guido/src/forms/FORMS -#fl flmodule.c -I$(FORMS) $(GLHACK) $(FORMS)/libforms.a -lfm -lgl - - -# SunOS specific modules -- off by default: - -#sunaudiodev sunaudiodev.c - - -# A Linux specific module -- off by default; this may also work on -# some *BSDs. - -#linuxaudiodev linuxaudiodev.c - - -# George Neville-Neil's timing module: - -#timing timingmodule.c - - -# The _tkinter module. -# -# The command for _tkinter is long and site specific. Please -# uncomment and/or edit those parts as indicated. If you don't have a -# specific extension (e.g. Tix or BLT), leave the corresponding line -# commented out. (Leave the trailing backslashes in! If you -# experience strange errors, you may want to join all uncommented -# lines and remove the backslashes -- the backslash interpretation is -# done by the shell's "read" command and it may not be implemented on -# every system. - -# *** Always uncomment this (leave the leading underscore in!): -# _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \ -# *** Uncomment and edit to reflect where your Tcl/Tk libraries are: -# -L/usr/local/lib \ -# *** Uncomment and edit to reflect where your Tcl/Tk headers are: -# -I/usr/local/include \ -# *** Uncomment and edit to reflect where your X11 header files are: -# -I/usr/X11R6/include \ -# *** Or uncomment this for Solaris: -# -I/usr/openwin/include \ -# *** Uncomment and edit for Tix extension only: -# -DWITH_TIX -ltix8.1.8.2 \ -# *** Uncomment and edit for BLT extension only: -# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \ -# *** Uncomment and edit for PIL (TkImaging) extension only: -# (See http://www.pythonware.com/products/pil/ for more info) -# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \ -# *** Uncomment and edit for TOGL extension only: -# -DWITH_TOGL togl.c \ -# *** Uncomment and edit to reflect your Tcl/Tk versions: -# -ltk8.2 -ltcl8.2 \ -# *** Uncomment and edit to reflect where your X11 libraries are: -# -L/usr/X11R6/lib \ -# *** Or uncomment this for Solaris: -# -L/usr/openwin/lib \ -# *** Uncomment these for TOGL extension only: -# -lGL -lGLU -lXext -lXmu \ -# *** Uncomment for AIX: -# -lld \ -# *** Always uncomment this; X11 libraries to link with: -# -lX11 - -# Lance Ellinghaus's syslog module -#syslog syslogmodule.c # syslog daemon interface - - -# Curses support, requring the System V version of curses, often -# provided by the ncurses library. e.g. on Linux, link with -lncurses -# instead of -lcurses). -# -# First, look at Setup.config; configure may have set this for you. - -#_curses _cursesmodule.c -lcurses -ltermcap -# Wrapper for the panel library that's part of ncurses and SYSV curses. -#_curses_panel _curses_panel.c -lpanel -lncurses - - -# Generic (SunOS / SVR4) dynamic loading module. -# This is not needed for dynamic loading of Python modules -- -# it is a highly experimental and dangerous device for calling -# *arbitrary* C functions in *arbitrary* shared libraries: - -#dl dlmodule.c - - -# Modules that provide persistent dictionary-like semantics. You will -# probably want to arrange for at least one of them to be available on -# your machine, though none are defined by default because of library -# dependencies. The Python module anydbm.py provides an -# implementation independent wrapper for these; dumbdbm.py provides -# similar functionality (but slower of course) implemented in Python. - -# The standard Unix dbm module has been moved to Setup.config so that -# it will be compiled as a shared library by default. Compiling it as -# a built-in module causes conflicts with the pybsddb3 module since it -# creates a static dependency on an out-of-date version of db.so. -# -# First, look at Setup.config; configure may have set this for you. - -#dbm dbmmodule.c # dbm(3) may require -lndbm or similar - -# Anthony Baxter's gdbm module. GNU dbm(3) will require -lgdbm: -# -# First, look at Setup.config; configure may have set this for you. - -#gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm - - -# Sleepycat Berkeley DB interface. -# -# This requires the Sleepycat DB code, see http://www.sleepycat.com/ -# The earliest supported version of that library is 3.0, the latest -# supported version is 4.0 (4.1 is specifically not supported, as that -# changes the semantics of transactional databases). A list of available -# releases can be found at -# -# http://www.sleepycat.com/update/index.html -# -# Edit the variables DB and DBLIBVERto point to the db top directory -# and the subdirectory of PORT where you built it. -#DB=/usr/local/BerkeleyDB.4.0 -#DBLIBVER=4.0 -#DBINC=$(DB)/include -#DBLIB=$(DB)/lib -#_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER) - -# Historical Berkeley DB 1.85 -# -# This module is deprecated; the 1.85 version of the Berkeley DB library has -# bugs that can cause data corruption. If you can, use later versions of the -# library instead, available from . - -#DB=/depot/sundry/src/berkeley-db/db.1.85 -#DBPORT=$(DB)/PORT/irix.5.3 -#bsddb185 bsddbmodule.c -I$(DBPORT)/include -I$(DBPORT) $(DBPORT)/libdb.a - - - -# Helper module for various ascii-encoders -binascii binascii.c - -# Fred Drake's interface to the Python parser -parser parsermodule.c - -# cStringIO and cPickle -cStringIO cStringIO.c -cPickle cPickle.c - - -# Lee Busby's SIGFPE modules. -# The library to link fpectl with is platform specific. -# Choose *one* of the options below for fpectl: - -# For SGI IRIX (tested on 5.3): -#fpectl fpectlmodule.c -lfpe - -# For Solaris with SunPro compiler (tested on Solaris 2.5 with SunPro C 4.2): -# (Without the compiler you don't have -lsunmath.) -#fpectl fpectlmodule.c -R/opt/SUNWspro/lib -lsunmath -lm - -# For other systems: see instructions in fpectlmodule.c. -#fpectl fpectlmodule.c ... - -# Test module for fpectl. No extra libraries needed. -#fpetest fpetestmodule.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 - -# Interface to the Expat XML parser -# -# Expat was written by James Clark and is now maintained by a group of -# developers on SourceForge; see www.libexpat.org for more -# information. The pyexpat module was written by Paul Prescod after a -# prototype by Jack Jansen. Source of Expat 1.95.2 is included in -# Modules/expat/. Usage of a system shared libexpat.so/expat.dll is -# not advised. -# -# More information on Expat can be found at www.libexpat.org. -# -pyexpat expat/xmlparse.c expat/xmlrole.c expat/xmltok.c pyexpat.c -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI - - -# Hye-Shik Chang's CJKCodecs - -# multibytecodec is required for all the other CJK codec modules -#_multibytecodec cjkcodecs/multibytecodec.c - -#_codecs_cn cjkcodecs/_codecs_cn.c -#_codecs_hk cjkcodecs/_codecs_hk.c -#_codecs_iso2022 cjkcodecs/_codecs_iso2022.c -#_codecs_jp cjkcodecs/_codecs_jp.c -#_codecs_kr cjkcodecs/_codecs_kr.c -#_codecs_tw cjkcodecs/_codecs_tw.c - -# Example -- included for reference only: -# xx xxmodule.c - -# Another example -- the 'xxsubtype' module shows C-level subtyping in action -xxsubtype xxsubtype.c diff --git a/pythonforandroid/recipes/hostpython2legacy/__init__.py b/pythonforandroid/recipes/hostpython2legacy/__init__.py deleted file mode 100644 index 0a0257372e..0000000000 --- a/pythonforandroid/recipes/hostpython2legacy/__init__.py +++ /dev/null @@ -1,67 +0,0 @@ -import os -import sh -from os.path import join, exists - -from pythonforandroid.recipe import Recipe -from pythonforandroid.logger import info, warning, shprint -from pythonforandroid.util import current_directory - - -class Hostpython2LegacyRecipe(Recipe): - ''' - .. versionadded:: 0.6.0 - This was the original hostpython2's recipe by tito reintroduced as - hostpython2legacy. - ''' - version = '2.7.2' - url = 'https://python.org/ftp/python/{version}/Python-{version}.tar.bz2' - name = 'hostpython2legacy' - patches = ['fix-segfault-pygchead.patch'] - - conflicts = ['hostpython2', 'hostpython3', 'hostpython3crystax'] - - def get_build_container_dir(self, arch=None): - choices = self.check_recipe_choices() - dir_name = '-'.join([self.name] + choices) - return join(self.ctx.build_dir, 'other_builds', dir_name, 'desktop') - - def get_build_dir(self, arch=None): - return join(self.get_build_container_dir(), self.name) - - def prebuild_arch(self, arch): - # Override hostpython Setup? - shprint(sh.cp, join(self.get_recipe_dir(), 'Setup'), - join(self.get_build_dir(), 'Modules', 'Setup')) - - def build_arch(self, arch): - with current_directory(self.get_build_dir()): - - if exists('hostpython'): - info('hostpython already exists, skipping build') - self.ctx.hostpython = join(self.get_build_dir(), 'hostpython') - self.ctx.hostpgen = join(self.get_build_dir(), 'hostpgen') - return - - if 'LIBS' in os.environ: - os.environ.pop('LIBS') - configure = sh.Command('./configure') - - shprint(configure) - shprint(sh.make, '-j5') - - shprint(sh.mv, join('Parser', 'pgen'), 'hostpgen') - - if exists('python.exe'): - shprint(sh.mv, 'python.exe', 'hostpython') - elif exists('python'): - shprint(sh.mv, 'python', 'hostpython') - else: - warning('Unable to find the python executable after ' - 'hostpython build! Exiting.') - exit(1) - - self.ctx.hostpython = join(self.get_build_dir(), 'hostpython') - self.ctx.hostpgen = join(self.get_build_dir(), 'hostpgen') - - -recipe = Hostpython2LegacyRecipe() diff --git a/pythonforandroid/recipes/hostpython2legacy/fix-segfault-pygchead.patch b/pythonforandroid/recipes/hostpython2legacy/fix-segfault-pygchead.patch deleted file mode 100644 index 25d4599cb0..0000000000 --- a/pythonforandroid/recipes/hostpython2legacy/fix-segfault-pygchead.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naur Python-2.7.2.orig/Include/objimpl.h Python-2.7.2/Include/objimpl.h ---- Python-2.7.2.orig/Include/objimpl.h 2011-06-11 17:46:23.000000000 +0200 -+++ Python-2.7.2/Include/objimpl.h 2018-09-04 17:33:09.254654565 +0200 -@@ -255,7 +255,7 @@ - union _gc_head *gc_prev; - Py_ssize_t gc_refs; - } gc; -- long double dummy; /* force worst-case alignment */ -+ double dummy; /* force worst-case alignment */ - } PyGC_Head; - - extern PyGC_Head *_PyGC_generation0; diff --git a/pythonforandroid/recipes/openssl/__init__.py b/pythonforandroid/recipes/openssl/__init__.py index 3a9505f425..a44283485b 100644 --- a/pythonforandroid/recipes/openssl/__init__.py +++ b/pythonforandroid/recipes/openssl/__init__.py @@ -61,8 +61,7 @@ class OpenSSLRecipe(Recipe): def use_legacy(self): if not self.ctx.recipe_build_order: return False - return any([i for i in ('python2legacy', 'python3crystax') if - i in self.ctx.recipe_build_order]) + return 'python3crystax' in self.ctx.recipe_build_order @property def version(self): diff --git a/pythonforandroid/recipes/python2/__init__.py b/pythonforandroid/recipes/python2/__init__.py index beba2b65a0..042b95d220 100644 --- a/pythonforandroid/recipes/python2/__init__.py +++ b/pythonforandroid/recipes/python2/__init__.py @@ -21,7 +21,7 @@ class Python2Recipe(GuestPythonRecipe): name = 'python2' depends = ['hostpython2'] - conflicts = ['python3crystax', 'python3', 'python2legacy'] + conflicts = ['python3crystax', 'python3'] patches = [ # new 2.7.15 patches diff --git a/pythonforandroid/recipes/python2legacy/Setup.local-ssl b/pythonforandroid/recipes/python2legacy/Setup.local-ssl deleted file mode 100644 index eadc6eae94..0000000000 --- a/pythonforandroid/recipes/python2legacy/Setup.local-ssl +++ /dev/null @@ -1,4 +0,0 @@ -SSL= -_ssl _ssl.c \ - -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ - -L$(SSL) -lssl$(OPENSSL_VERSION) -lcrypto$(OPENSSL_VERSION) diff --git a/pythonforandroid/recipes/python2legacy/__init__.py b/pythonforandroid/recipes/python2legacy/__init__.py deleted file mode 100644 index fc0de881d3..0000000000 --- a/pythonforandroid/recipes/python2legacy/__init__.py +++ /dev/null @@ -1,231 +0,0 @@ -from pythonforandroid.recipe import TargetPythonRecipe, Recipe -from pythonforandroid.toolchain import shprint, current_directory, info -from pythonforandroid.patching import (is_darwin, is_api_gt, - check_all, is_api_lt, is_ndk) -from multiprocessing import cpu_count -from os.path import exists, join, realpath -from os import walk -import glob -import sh - -EXCLUDE_EXTS = (".py", ".pyc", ".so.o", ".so.a", ".so.libs", ".pyx") - - -class Python2LegacyRecipe(TargetPythonRecipe): - ''' - .. warning:: This python2 recipe is the original one created by @tito and, - for now, it is unusable. - - .. versionchanged:: 0.6.0 - This was the original python2's recipe moved to python2legacy. - ''' - version = "2.7.2" - url = 'https://python.org/ftp/python/{version}/Python-{version}.tar.bz2' - name = 'python2legacy' - - depends = ['hostpython2legacy'] - conflicts = ['python3', 'python3crystax', 'python2'] - opt_depends = ['openssl', 'sqlite3'] - - patches = ['patches/Python-{version}-xcompile.patch', - 'patches/Python-{version}-ctypes-disable-wchar.patch', - 'patches/disable-modules.patch', - 'patches/fix-locale.patch', - 'patches/fix-gethostbyaddr.patch', - 'patches/fix-setup-flags.patch', - 'patches/fix-filesystemdefaultencoding.patch', - 'patches/fix-termios.patch', - 'patches/custom-loader.patch', - 'patches/verbose-compilation.patch', - 'patches/fix-remove-corefoundation.patch', - 'patches/fix-dynamic-lookup.patch', - 'patches/fix-dlfcn.patch', - 'patches/parsetuple.patch', - 'patches/ctypes-find-library-updated.patch', - ('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')))] - - from_crystax = False - - def prebuild_arch(self, arch): - super(Python2LegacyRecipe, self).prebuild_arch(arch) - patch_mark = join(self.get_build_dir(arch.arch), '.openssl-patched') - if 'openssl' in self.ctx.recipe_build_order and not exists(patch_mark): - self.apply_patch(join('patches', 'enable-openssl.patch'), arch.arch) - shprint(sh.touch, patch_mark) - - def build_arch(self, arch): - - if not exists(join(self.get_build_dir(arch.arch), 'libpython2.7.so')): - self.do_python_build(arch) - - if not exists(self.ctx.get_python_install_dir()): - shprint(sh.cp, '-a', join(self.get_build_dir(arch.arch), 'python-install'), - self.ctx.get_python_install_dir()) - - # This should be safe to run every time - info('Copying hostpython binary to targetpython folder') - shprint(sh.cp, self.ctx.hostpython, - join(self.ctx.get_python_install_dir(), 'bin', 'python.host')) - self.ctx.hostpython = join(self.ctx.get_python_install_dir(), 'bin', 'python.host') - - if not exists(join(self.ctx.get_libs_dir(arch.arch), 'libpython2.7.so')): - shprint(sh.cp, join(self.get_build_dir(arch.arch), 'libpython2.7.so'), self.ctx.get_libs_dir(arch.arch)) - - def do_python_build(self, arch): - - shprint(sh.cp, self.ctx.hostpython, self.get_build_dir(arch.arch)) - shprint(sh.cp, self.ctx.hostpgen, self.get_build_dir(arch.arch)) - hostpython = join(self.get_build_dir(arch.arch), 'hostpython') - hostpgen = join(self.get_build_dir(arch.arch), 'hostpython') - - with current_directory(self.get_build_dir(arch.arch)): - - hostpython_recipe = Recipe.get_recipe('hostpython2legacy', self.ctx) - shprint(sh.cp, join(hostpython_recipe.get_recipe_dir(), 'Setup'), 'Modules') - - env = arch.get_env() - - env['HOSTARCH'] = 'arm-eabi' - env['BUILDARCH'] = shprint(sh.gcc, '-dumpmachine').stdout.decode('utf-8').split('\n')[0] - env['CFLAGS'] = ' '.join([env['CFLAGS'], '-DNO_MALLINFO']) - - # TODO need to add a should_build that checks if optional - # dependencies have changed (possibly in a generic way) - if 'openssl' in self.ctx.recipe_build_order: - recipe = Recipe.get_recipe('openssl', self.ctx) - openssl_build = recipe.get_build_dir(arch.arch) - env['OPENSSL_BUILD'] = openssl_build - env['OPENSSL_VERSION'] = recipe.version - - if 'sqlite3' in self.ctx.recipe_build_order: - # Include sqlite3 in python2legacy build - recipe = Recipe.get_recipe('sqlite3', self.ctx) - include = ' -I' + recipe.get_build_dir(arch.arch) - lib = ' -L' + recipe.get_lib_dir(arch) + ' -lsqlite3' - # Insert or append to env - flag = 'CPPFLAGS' - env[flag] = env[flag] + include if flag in env else include - flag = 'LDFLAGS' - env[flag] = env[flag] + lib if flag in env else lib - - # NDK has langinfo.h but doesn't define nl_langinfo() - env['ac_cv_header_langinfo_h'] = 'no' - configure = sh.Command('./configure') - shprint(configure, - '--host={}'.format(env['HOSTARCH']), - '--build={}'.format(env['BUILDARCH']), - # 'OPT={}'.format(env['OFLAG']), - '--prefix={}'.format(realpath('./python-install')), - '--enable-shared', - '--disable-toolbox-glue', - '--disable-framework', - _env=env) - - # tito left this comment in the original source. It's still true! - # FIXME, the first time, we got a error at: - # python$EXE ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h # noqa - # /home/tito/code/python-for-android/build/python/Python-2.7.2/python: 1: Syntax error: word unexpected (expecting ")") # noqa - # because at this time, python is arm, not x86. even that, - # why /usr/include/netinet/in.h is used ? - # check if we can avoid this part. - - make = sh.Command(env['MAKE'].split(' ')[0]) - print('First install (expected to fail...') - try: - shprint(make, '-j' + str(cpu_count()), 'install', - 'HOSTPYTHON={}'.format(hostpython), - 'HOSTPGEN={}'.format(hostpgen), - 'CROSS_COMPILE_TARGET=yes', - 'INSTSONAME=libpython2.7.so', - _env=env) - except sh.ErrorReturnCode_2: - print('First python2 make failed. This is expected, trying again.') - - print('Second install (expected to work)') - shprint(sh.touch, 'python.exe', 'python') - shprint(make, '-j' + str(cpu_count()), 'install', - 'HOSTPYTHON={}'.format(hostpython), - 'HOSTPGEN={}'.format(hostpgen), - 'CROSS_COMPILE_TARGET=yes', - 'INSTSONAME=libpython2.7.so', - _env=env) - - if is_darwin(): - shprint(sh.cp, join(self.get_recipe_dir(), 'patches', '_scproxy.py'), - join('python-install', 'Lib')) - shprint(sh.cp, join(self.get_recipe_dir(), 'patches', '_scproxy.py'), - join('python-install', 'lib', 'python2.7')) - - # reduce python - for dir_name in ('test', join('json', 'tests'), 'lib-tk', - join('sqlite3', 'test'), join('unittest, test'), - join('lib2to3', 'tests'), join('bsddb', 'tests'), - join('distutils', 'tests'), join('email', 'test'), - 'curses'): - shprint(sh.rm, '-rf', join('python-install', - 'lib', 'python2.7', dir_name)) - - def create_python_install(self, dist_dir): - hostpython = sh.Command(self.ctx.hostpython) - install_dir = self.ctx.get_python_install_dir() - with current_directory(dist_dir): - try: - shprint(hostpython, '-OO', '-m', 'compileall', - install_dir, - _tail=10, _filterout="^Listing") - except sh.ErrorReturnCode: - pass - if not exists('python-install'): - shprint(sh.cp, '-a', install_dir, './python-install') - - def create_python_bundle(self, dirn, arch): - info("Filling private directory") - if not exists(join(dirn, "lib")): - info("lib dir does not exist, making") - shprint(sh.cp, "-a", - join("python-install", "lib"), dirn) - shprint(sh.mkdir, "-p", - join(dirn, "include", "python2.7")) - - libpymodules_fn = join("libs", arch.arch, "libpymodules.so") - if exists(libpymodules_fn): - shprint(sh.mv, libpymodules_fn, dirn) - shprint(sh.cp, - join('python-install', 'include', - 'python2.7', 'pyconfig.h'), - join(dirn, 'include', 'python2.7/')) - - info('Removing some unwanted files') - shprint(sh.rm, '-f', join(dirn, 'lib', 'libpython2.7.so')) - shprint(sh.rm, '-rf', join(dirn, 'lib', 'pkgconfig')) - - libdir = join(dirn, 'lib', 'python2.7') - site_packages_dir = join(libdir, 'site-packages') - with current_directory(libdir): - removes = [] - for dirname, root, filenames in walk("."): - for filename in filenames: - if filename.endswith(EXCLUDE_EXTS): - removes.append(filename) - shprint(sh.rm, '-f', *removes) - - info('Deleting some other stuff not used on android') - # To quote the original distribute.sh, 'well...' - shprint(sh.rm, '-rf', 'lib2to3') - shprint(sh.rm, '-rf', 'idlelib') - shprint(sh.rm, '-f', *glob.glob('config/libpython*.a')) - shprint(sh.rm, '-rf', 'config/python.o') - - return site_packages_dir - - def include_root(self, arch_name): - return join(self.get_build_dir(arch_name), 'python-install', 'include', 'python2.7') - - def link_root(self, arch_name): - return join(self.get_build_dir(arch_name), 'python-install', 'lib') - - -recipe = Python2LegacyRecipe() diff --git a/pythonforandroid/recipes/python2legacy/patches/Python-2.7.2-ctypes-disable-wchar.patch b/pythonforandroid/recipes/python2legacy/patches/Python-2.7.2-ctypes-disable-wchar.patch deleted file mode 100644 index 19d8915eaa..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/Python-2.7.2-ctypes-disable-wchar.patch +++ /dev/null @@ -1,116 +0,0 @@ -diff -ur '--exclude=*~' Python-2.7.2.orig/Lib/ctypes/__init__.py Python-2.7.2/Lib/ctypes/__init__.py ---- Python-2.7.2.orig/Lib/ctypes/__init__.py 2011-06-11 16:46:24.000000000 +0100 -+++ Python-2.7.2/Lib/ctypes/__init__.py 2015-03-19 12:32:45.747723687 +0000 -@@ -272,31 +272,34 @@ - else: - set_conversion_mode("ascii", "strict") - -- class c_wchar_p(_SimpleCData): -- _type_ = "Z" -- -- class c_wchar(_SimpleCData): -- _type_ = "u" -- -- POINTER(c_wchar).from_param = c_wchar_p.from_param #_SimpleCData.c_wchar_p_from_param -- -- def create_unicode_buffer(init, size=None): -- """create_unicode_buffer(aString) -> character array -- create_unicode_buffer(anInteger) -> character array -- create_unicode_buffer(aString, anInteger) -> character array -- """ -- if isinstance(init, (str, unicode)): -- if size is None: -- size = len(init)+1 -- buftype = c_wchar * size -- buf = buftype() -- buf.value = init -- return buf -- elif isinstance(init, (int, long)): -- buftype = c_wchar * init -- buf = buftype() -- return buf -- raise TypeError(init) -+# The wchar stuff causes a crash on Android (the bionic C library doesn't -+# implement wchar_t anyway) -+# -+# class c_wchar_p(_SimpleCData): -+# _type_ = "Z" -+# -+# class c_wchar(_SimpleCData): -+# _type_ = "u" -+# -+# POINTER(c_wchar).from_param = c_wchar_p.from_param #_SimpleCData.c_wchar_p_from_param -+# -+# def create_unicode_buffer(init, size=None): -+# """create_unicode_buffer(aString) -> character array -+# create_unicode_buffer(anInteger) -> character array -+# create_unicode_buffer(aString, anInteger) -> character array -+# """ -+# if isinstance(init, (str, unicode)): -+# if size is None: -+# size = len(init)+1 -+# buftype = c_wchar * size -+# buf = buftype() -+# buf.value = init -+# return buf -+# elif isinstance(init, (int, long)): -+# buftype = c_wchar * init -+# buf = buftype() -+# return buf -+# raise TypeError(init) - - POINTER(c_char).from_param = c_char_p.from_param #_SimpleCData.c_char_p_from_param - -diff -ur '--exclude=*~' Python-2.7.2.orig/Modules/_ctypes/callproc.c Python-2.7.2/Modules/_ctypes/callproc.c ---- Python-2.7.2.orig/Modules/_ctypes/callproc.c 2015-03-19 11:56:40.668159317 +0000 -+++ Python-2.7.2/Modules/_ctypes/callproc.c 2015-03-19 11:45:45.898288000 +0000 -@@ -1423,7 +1423,7 @@ - mode |= RTLD_NOW; - handle = ctypes_dlopen(name, mode); - if (!handle) { -- char *errmsg = ctypes_dlerror(); -+ const char *errmsg = ctypes_dlerror(); - if (!errmsg) - errmsg = "dlopen() error"; - PyErr_SetString(PyExc_OSError, -diff -ur '--exclude=*~' Python-2.7.2.orig/Modules/_ctypes/libffi/src/dlmalloc.c Python-2.7.2/Modules/_ctypes/libffi/src/dlmalloc.c ---- Python-2.7.2.orig/Modules/_ctypes/libffi/src/dlmalloc.c 2015-03-19 13:26:58.928438829 +0000 -+++ Python-2.7.2/Modules/_ctypes/libffi/src/dlmalloc.c 2015-03-19 15:32:19.042396376 +0000 -@@ -614,18 +614,6 @@ - #include "/usr/include/malloc.h" - #else /* HAVE_USR_INCLUDE_MALLOC_H */ - --struct mallinfo { -- MALLINFO_FIELD_TYPE arena; /* non-mmapped space allocated from system */ -- MALLINFO_FIELD_TYPE ordblks; /* number of free chunks */ -- MALLINFO_FIELD_TYPE smblks; /* always 0 */ -- MALLINFO_FIELD_TYPE hblks; /* always 0 */ -- MALLINFO_FIELD_TYPE hblkhd; /* space in mmapped regions */ -- MALLINFO_FIELD_TYPE usmblks; /* maximum total allocated space */ -- MALLINFO_FIELD_TYPE fsmblks; /* always 0 */ -- MALLINFO_FIELD_TYPE uordblks; /* total allocated space */ -- MALLINFO_FIELD_TYPE fordblks; /* total free space */ -- MALLINFO_FIELD_TYPE keepcost; /* releasable (via malloc_trim) space */ --}; - - #endif /* HAVE_USR_INCLUDE_MALLOC_H */ - #endif /* NO_MALLINFO */ -@@ -966,7 +954,7 @@ - p = malloc(n); - assert(malloc_usable_size(p) >= 256); - */ --size_t dlmalloc_usable_size(void*); -+size_t dlmalloc_usable_size(const void*); - - /* - malloc_stats(); -@@ -4384,7 +4372,7 @@ - internal_malloc_stats(gm); - } - --size_t dlmalloc_usable_size(void* mem) { -+size_t dlmalloc_usable_size(const void* mem) { - if (mem != 0) { - mchunkptr p = mem2chunk(mem); - if (cinuse(p)) - diff --git a/pythonforandroid/recipes/python2legacy/patches/Python-2.7.2-xcompile.patch b/pythonforandroid/recipes/python2legacy/patches/Python-2.7.2-xcompile.patch deleted file mode 100644 index 9883cb5442..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/Python-2.7.2-xcompile.patch +++ /dev/null @@ -1,205 +0,0 @@ -diff -urN Python-2.7.2/configure ltib/rpm/BUILD/Python-2.7.2/configure ---- Python-2.7.2/configure 2011-06-11 11:46:28.000000000 -0400 -+++ ltib/rpm/BUILD/Python-2.7.2/configure 2011-11-14 12:10:41.011373524 -0500 -@@ -13673,7 +13673,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. */ -@@ -13725,7 +13725,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 -urN Python-2.7.2/Makefile.pre.in ltib/rpm/BUILD/Python-2.7.2/Makefile.pre.in ---- Python-2.7.2/Makefile.pre.in 2011-06-11 11:46:26.000000000 -0400 -+++ ltib/rpm/BUILD/Python-2.7.2/Makefile.pre.in 2011-11-14 12:10:41.013373444 -0500 -@@ -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 \ -@@ -407,8 +410,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 -@@ -542,7 +545,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) -@@ -925,26 +928,26 @@ - done; \ - done - $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt -- 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): -@@ -1049,7 +1052,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 -urN Python-2.7.2/setup.py ltib/rpm/BUILD/Python-2.7.2/setup.py ---- Python-2.7.2/setup.py 2011-06-11 11:46:28.000000000 -0400 -+++ ltib/rpm/BUILD/Python-2.7.2/setup.py 2011-11-14 12:13:02.175758583 -0500 -@@ -145,6 +145,7 @@ - def __init__(self, dist): - build_ext.__init__(self, dist) - self.failed = [] -+ self.cross_compile = os.environ.get('CROSS_COMPILE_TARGET') == 'yes' - - def build_extensions(self): - -@@ -278,6 +279,14 @@ - (ext.name, sys.exc_info()[1])) - self.failed.append(ext.name) - return -+ -+ # Import check will not work when cross-compiling. -+ if os.environ.has_key('PYTHONXCPREFIX'): -+ self.announce( -+ 'WARNING: skipping import 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: -@@ -369,9 +378,10 @@ - - def detect_modules(self): - # Ensure that /usr/local is always used -- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') -- self.add_multiarch_paths() -+ if not self.cross_compile: -+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -+ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') -+ self.add_multiarch_paths() - - # Add paths specified in the environment variables LDFLAGS and - # CPPFLAGS for header and library files. -@@ -408,7 +418,8 @@ - add_dir_to_list(dir_list, directory) - - if os.path.normpath(sys.prefix) != '/usr' \ -- and not sysconfig.get_config_var('PYTHONFRAMEWORK'): -+ and not sysconfig.get_config_var('PYTHONFRAMEWORK') \ -+ and not self.cross_compile: - # 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 -@@ -426,11 +437,14 @@ - # lib_dirs and inc_dirs are used to search for files; - # if a file is found in one of those directories, it can - # be assumed that no additional -I,-L directives are needed. -- lib_dirs = self.compiler.library_dirs + [ -- '/lib64', '/usr/lib64', -- '/lib', '/usr/lib', -- ] -- inc_dirs = self.compiler.include_dirs + ['/usr/include'] -+ lib_dirs = self.compiler.library_dirs -+ inc_dirs = self.compiler.include_dirs -+ if not self.cross_compile: -+ lib_dirs += [ -+ '/lib64', '/usr/lib64', -+ '/lib', '/usr/lib', -+ ] -+ inc_dirs += ['/usr/include'] - exts = [] - missing = [] - -@@ -1864,8 +1878,15 @@ - - # Pass empty CFLAGS because we'll just append the resulting - # CFLAGS to Python's; -g or -O2 is to be avoided. -- cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ -- % (ffi_builddir, ffi_srcdir, " ".join(config_args)) -+ if self.cross_compile: -+ cmd = "cd %s && env CFLAGS='' %s/configure --host=%s --build=%s %s" \ -+ % (ffi_builddir, ffi_srcdir, -+ os.environ.get('HOSTARCH'), -+ os.environ.get('BUILDARCH'), -+ " ".join(config_args)) -+ else: -+ cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ -+ % (ffi_builddir, ffi_srcdir, " ".join(config_args)) - - res = os.system(cmd) - if res or not os.path.exists(ffi_configfile): ---- Python-2.6.6.orig//Lib/plat-linux3/regen 1970-01-01 01:00:00.000000000 +0100 -+++ Python-2.6.6/Lib/plat-linux3/regen 2001-08-09 14:48:17.000000000 +0200 -@@ -0,0 +1,8 @@ -+#! /bin/sh -+case `uname` in -+Linux*) ;; -+*) echo Probably not on a Linux system 1>&2 -+ exit 1;; -+esac -+set -v -+h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h diff --git a/pythonforandroid/recipes/python2legacy/patches/Python-2.7.2-xcompile.patch-backup b/pythonforandroid/recipes/python2legacy/patches/Python-2.7.2-xcompile.patch-backup deleted file mode 100644 index 3fdb85d2da..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/Python-2.7.2-xcompile.patch-backup +++ /dev/null @@ -1,194 +0,0 @@ -diff -urN Python-2.7.2/configure ltib/rpm/BUILD/Python-2.7.2/configure ---- Python-2.7.2/configure 2011-06-11 11:46:28.000000000 -0400 -+++ ltib/rpm/BUILD/Python-2.7.2/configure 2011-11-14 12:10:41.011373524 -0500 -@@ -13673,7 +13673,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. */ -@@ -13725,7 +13725,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 -urN Python-2.7.2/Makefile.pre.in ltib/rpm/BUILD/Python-2.7.2/Makefile.pre.in ---- Python-2.7.2/Makefile.pre.in 2011-06-11 11:46:26.000000000 -0400 -+++ ltib/rpm/BUILD/Python-2.7.2/Makefile.pre.in 2011-11-14 12:10:41.013373444 -0500 -@@ -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 \ -@@ -407,8 +410,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 -@@ -542,7 +545,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) -@@ -925,26 +928,26 @@ - done; \ - done - $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt -- 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): -@@ -1049,7 +1052,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 -urN Python-2.7.2/setup.py ltib/rpm/BUILD/Python-2.7.2/setup.py ---- Python-2.7.2/setup.py 2011-06-11 11:46:28.000000000 -0400 -+++ ltib/rpm/BUILD/Python-2.7.2/setup.py 2011-11-14 12:13:02.175758583 -0500 -@@ -145,6 +145,7 @@ - def __init__(self, dist): - build_ext.__init__(self, dist) - self.failed = [] -+ self.cross_compile = os.environ.get('CROSS_COMPILE_TARGET') == 'yes' - - def build_extensions(self): - -@@ -278,6 +279,14 @@ - (ext.name, sys.exc_info()[1])) - self.failed.append(ext.name) - return -+ -+ # Import check will not work when cross-compiling. -+ if os.environ.has_key('PYTHONXCPREFIX'): -+ self.announce( -+ 'WARNING: skipping import 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: -@@ -369,9 +378,10 @@ - - def detect_modules(self): - # Ensure that /usr/local is always used -- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') -- self.add_multiarch_paths() -+ if not self.cross_compile: -+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -+ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') -+ self.add_multiarch_paths() - - # Add paths specified in the environment variables LDFLAGS and - # CPPFLAGS for header and library files. -@@ -408,7 +418,8 @@ - add_dir_to_list(dir_list, directory) - - if os.path.normpath(sys.prefix) != '/usr' \ -- and not sysconfig.get_config_var('PYTHONFRAMEWORK'): -+ and not sysconfig.get_config_var('PYTHONFRAMEWORK') \ -+ and not self.cross_compile: - # 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 -@@ -426,11 +437,14 @@ - # lib_dirs and inc_dirs are used to search for files; - # if a file is found in one of those directories, it can - # be assumed that no additional -I,-L directives are needed. -- lib_dirs = self.compiler.library_dirs + [ -- '/lib64', '/usr/lib64', -- '/lib', '/usr/lib', -- ] -- inc_dirs = self.compiler.include_dirs + ['/usr/include'] -+ lib_dirs = self.compiler.library_dirs -+ inc_dirs = self.compiler.include_dirs -+ if not self.cross_compile: -+ lib_dirs += [ -+ '/lib64', '/usr/lib64', -+ '/lib', '/usr/lib', -+ ] -+ inc_dirs += ['/usr/include'] - exts = [] - missing = [] - -@@ -1864,8 +1878,15 @@ - - # Pass empty CFLAGS because we'll just append the resulting - # CFLAGS to Python's; -g or -O2 is to be avoided. -- cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ -- % (ffi_builddir, ffi_srcdir, " ".join(config_args)) -+ if self.cross_compile: -+ cmd = "cd %s && env CFLAGS='' %s/configure --host=%s --build=%s %s" \ -+ % (ffi_builddir, ffi_srcdir, -+ os.environ.get('HOSTARCH'), -+ os.environ.get('BUILDARCH'), -+ " ".join(config_args)) -+ else: -+ cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ -+ % (ffi_builddir, ffi_srcdir, " ".join(config_args)) - - res = os.system(cmd) - if res or not os.path.exists(ffi_configfile): diff --git a/pythonforandroid/recipes/python2legacy/patches/Python-2.7.2-xcompile.patch-new b/pythonforandroid/recipes/python2legacy/patches/Python-2.7.2-xcompile.patch-new deleted file mode 100644 index 9883cb5442..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/Python-2.7.2-xcompile.patch-new +++ /dev/null @@ -1,205 +0,0 @@ -diff -urN Python-2.7.2/configure ltib/rpm/BUILD/Python-2.7.2/configure ---- Python-2.7.2/configure 2011-06-11 11:46:28.000000000 -0400 -+++ ltib/rpm/BUILD/Python-2.7.2/configure 2011-11-14 12:10:41.011373524 -0500 -@@ -13673,7 +13673,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. */ -@@ -13725,7 +13725,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 -urN Python-2.7.2/Makefile.pre.in ltib/rpm/BUILD/Python-2.7.2/Makefile.pre.in ---- Python-2.7.2/Makefile.pre.in 2011-06-11 11:46:26.000000000 -0400 -+++ ltib/rpm/BUILD/Python-2.7.2/Makefile.pre.in 2011-11-14 12:10:41.013373444 -0500 -@@ -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 \ -@@ -407,8 +410,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 -@@ -542,7 +545,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) -@@ -925,26 +928,26 @@ - done; \ - done - $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt -- 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): -@@ -1049,7 +1052,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 -urN Python-2.7.2/setup.py ltib/rpm/BUILD/Python-2.7.2/setup.py ---- Python-2.7.2/setup.py 2011-06-11 11:46:28.000000000 -0400 -+++ ltib/rpm/BUILD/Python-2.7.2/setup.py 2011-11-14 12:13:02.175758583 -0500 -@@ -145,6 +145,7 @@ - def __init__(self, dist): - build_ext.__init__(self, dist) - self.failed = [] -+ self.cross_compile = os.environ.get('CROSS_COMPILE_TARGET') == 'yes' - - def build_extensions(self): - -@@ -278,6 +279,14 @@ - (ext.name, sys.exc_info()[1])) - self.failed.append(ext.name) - return -+ -+ # Import check will not work when cross-compiling. -+ if os.environ.has_key('PYTHONXCPREFIX'): -+ self.announce( -+ 'WARNING: skipping import 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: -@@ -369,9 +378,10 @@ - - def detect_modules(self): - # Ensure that /usr/local is always used -- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') -- self.add_multiarch_paths() -+ if not self.cross_compile: -+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -+ add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') -+ self.add_multiarch_paths() - - # Add paths specified in the environment variables LDFLAGS and - # CPPFLAGS for header and library files. -@@ -408,7 +418,8 @@ - add_dir_to_list(dir_list, directory) - - if os.path.normpath(sys.prefix) != '/usr' \ -- and not sysconfig.get_config_var('PYTHONFRAMEWORK'): -+ and not sysconfig.get_config_var('PYTHONFRAMEWORK') \ -+ and not self.cross_compile: - # 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 -@@ -426,11 +437,14 @@ - # lib_dirs and inc_dirs are used to search for files; - # if a file is found in one of those directories, it can - # be assumed that no additional -I,-L directives are needed. -- lib_dirs = self.compiler.library_dirs + [ -- '/lib64', '/usr/lib64', -- '/lib', '/usr/lib', -- ] -- inc_dirs = self.compiler.include_dirs + ['/usr/include'] -+ lib_dirs = self.compiler.library_dirs -+ inc_dirs = self.compiler.include_dirs -+ if not self.cross_compile: -+ lib_dirs += [ -+ '/lib64', '/usr/lib64', -+ '/lib', '/usr/lib', -+ ] -+ inc_dirs += ['/usr/include'] - exts = [] - missing = [] - -@@ -1864,8 +1878,15 @@ - - # Pass empty CFLAGS because we'll just append the resulting - # CFLAGS to Python's; -g or -O2 is to be avoided. -- cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ -- % (ffi_builddir, ffi_srcdir, " ".join(config_args)) -+ if self.cross_compile: -+ cmd = "cd %s && env CFLAGS='' %s/configure --host=%s --build=%s %s" \ -+ % (ffi_builddir, ffi_srcdir, -+ os.environ.get('HOSTARCH'), -+ os.environ.get('BUILDARCH'), -+ " ".join(config_args)) -+ else: -+ cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ -+ % (ffi_builddir, ffi_srcdir, " ".join(config_args)) - - res = os.system(cmd) - if res or not os.path.exists(ffi_configfile): ---- Python-2.6.6.orig//Lib/plat-linux3/regen 1970-01-01 01:00:00.000000000 +0100 -+++ Python-2.6.6/Lib/plat-linux3/regen 2001-08-09 14:48:17.000000000 +0200 -@@ -0,0 +1,8 @@ -+#! /bin/sh -+case `uname` in -+Linux*) ;; -+*) echo Probably not on a Linux system 1>&2 -+ exit 1;; -+esac -+set -v -+h2py -i '(u_long)' /usr/include/sys/types.h /usr/include/netinet/in.h /usr/include/dlfcn.h diff --git a/pythonforandroid/recipes/python2legacy/patches/_scproxy.py b/pythonforandroid/recipes/python2legacy/patches/_scproxy.py deleted file mode 100644 index c481f6d498..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/_scproxy.py +++ /dev/null @@ -1,12 +0,0 @@ -''' -Stub functions for _scproxy on iOS -No proxy is supported yet. -''' - - -def _get_proxy_settings(): - return {'exclude_simple': 1} - - -def _get_proxies(): - return {} diff --git a/pythonforandroid/recipes/python2legacy/patches/ctypes-find-library-updated.patch b/pythonforandroid/recipes/python2legacy/patches/ctypes-find-library-updated.patch deleted file mode 100644 index 07221cc43f..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/ctypes-find-library-updated.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py -index 52b3520..01b13a9 100644 ---- a/Lib/ctypes/util.py -+++ b/Lib/ctypes/util.py -@@ -71,7 +71,23 @@ if os.name == "ce": - def find_library(name): - return name - --if os.name == "posix" and sys.platform == "darwin": -+# This patch overrides the find_library to look in the right places on -+# Android -+if True: -+ def find_library(name): -+ # Check the user app lib dir -+ app_root = os.path.abspath('../../').split(os.path.sep) -+ lib_search = os.path.sep.join(app_root) + os.path.sep + 'lib' -+ for filename in os.listdir(lib_search): -+ if filename.endswith('.so') and name in filename: -+ return lib_search + os.path.sep + filename -+ # Check the normal Android system libraries -+ for filename in os.listdir('/system/lib'): -+ if filename.endswith('.so') and name in filename: -+ return lib_search + os.path.sep + filename -+ return None -+ -+elif os.name == "posix" and sys.platform == "darwin": - from ctypes.macholib.dyld import dyld_find as _dyld_find - def find_library(name): - possible = ['lib%s.dylib' % name, diff --git a/pythonforandroid/recipes/python2legacy/patches/ctypes-find-library.patch b/pythonforandroid/recipes/python2legacy/patches/ctypes-find-library.patch deleted file mode 100644 index 791e04272f..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/ctypes-find-library.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -ur Python-2.7.2.orig/Lib/ctypes/util.py Python-2.7.2/Lib/ctypes/util.py ---- Python-2.7.2.orig/Lib/ctypes/util.py 2011-06-11 16:46:24.000000000 +0100 -+++ Python-2.7.2/Lib/ctypes/util.py 2015-05-10 15:50:18.906203529 +0100 -@@ -71,7 +71,21 @@ - def find_library(name): - return name - --if os.name == "posix" and sys.platform == "darwin": -+# this test is for android specifically shoudl match here and ignore any -+# of the other platform tests below -+if os.name == "posix": -+ def find_library(name): -+ """ hack to find librarys for kivy and android -+ split the path and get the first parts which will give us -+ the app path something like /data/data/org.app.foo/""" -+ app_root = os.path.abspath('../../').split(os.path.sep) -+ lib_search = os.path.sep.join(app_root) + os.path.sep + 'lib' -+ for filename in os.listdir(lib_search): -+ if filename.endswith('.so') and name in filename: -+ return lib_search + os.path.sep + filename -+ return None -+ -+elif os.name == "posix" and sys.platform == "darwin": - from ctypes.macholib.dyld import dyld_find as _dyld_find - def find_library(name): - possible = ['lib%s.dylib' % name, -Only in Python-2.7.2/Lib/ctypes: util.py.save -Only in Python-2.7.2/Lib/ctypes: util.py.save.1 diff --git a/pythonforandroid/recipes/python2legacy/patches/custom-loader.patch b/pythonforandroid/recipes/python2legacy/patches/custom-loader.patch deleted file mode 100644 index 97dc28014a..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/custom-loader.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- Python-2.7.2.orig/Python/dynload_shlib.c 2010-05-09 16:46:46.000000000 +0200 -+++ Python-2.7.2/Python/dynload_shlib.c 2011-04-20 17:52:12.000000000 +0200 -@@ -6,6 +6,7 @@ - - #include - #include -+#include - - #if defined(__NetBSD__) - #include -@@ -75,6 +76,21 @@ - char pathbuf[260]; - int dlopenflags=0; - -+ static void *libpymodules = -1; -+ void *rv = NULL; -+ -+ /* Ensure we have access to libpymodules. */ -+ if (libpymodules == -1) { -+ printf("ANDROID_UNPACK = %s\n", getenv("ANDROID_UNPACK")); -+ PyOS_snprintf(pathbuf, sizeof(pathbuf), "%s/libpymodules.so", getenv("ANDROID_UNPACK")); -+ libpymodules = dlopen(pathbuf, RTLD_NOW); -+ -+ if (libpymodules == NULL) { -+ //abort(); -+ } -+ } -+ -+ - if (strchr(pathname, '/') == NULL) { - /* Prefix bare filename with "./" */ - PyOS_snprintf(pathbuf, sizeof(pathbuf), "./%-.255s", pathname); -@@ -84,6 +100,17 @@ - PyOS_snprintf(funcname, sizeof(funcname), - LEAD_UNDERSCORE "init%.200s", shortname); - -+ -+ /* Read symbols that have been linked into the main binary. */ -+ -+ if (libpymodules) { -+ rv = dlsym(libpymodules, funcname); -+ if (rv != NULL) { -+ return rv; -+ } -+ } -+ -+ - if (fp != NULL) { - int i; - struct stat statb; diff --git a/pythonforandroid/recipes/python2legacy/patches/disable-modules.patch b/pythonforandroid/recipes/python2legacy/patches/disable-modules.patch deleted file mode 100644 index 3841488c40..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/disable-modules.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Python-2.7.2.orig/setup.py 2010-10-31 17:40:21.000000000 +0100 -+++ Python-2.7.2/setup.py 2011-11-27 16:49:36.840204364 +0100 -@@ -21,7 +21,7 @@ - COMPILED_WITH_PYDEBUG = hasattr(sys, 'gettotalrefcount') - - # This global variable is used to hold the list of modules to be disabled. --disabled_module_list = [] -+disabled_module_list = ['spwd','bz2','ossaudiodev','_curses','_curses_panel','readline','_locale','_bsddb','gdbm','dbm','nis','linuxaudiodev','crypt','_multiprocessing'] - - def add_dir_to_list(dirlist, dir): - """Add the directory 'dir' to the list 'dirlist' (at the front) if diff --git a/pythonforandroid/recipes/python2legacy/patches/disable-openpty.patch b/pythonforandroid/recipes/python2legacy/patches/disable-openpty.patch deleted file mode 100644 index e6f9717309..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/disable-openpty.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- python2/Modules/posixmodule.c 2016-01-05 15:54:39.504651722 -0600 -+++ b/Modules/posixmodule.c 2016-01-05 16:01:48.072559330 -0600 -@@ -3743,54 +3743,8 @@ - static PyObject * - posix_openpty(PyObject *self, PyObject *noargs) - { -- int master_fd, slave_fd; --#ifndef HAVE_OPENPTY -- char * slave_name; --#endif --#if defined(HAVE_DEV_PTMX) && !defined(HAVE_OPENPTY) && !defined(HAVE__GETPTY) -- PyOS_sighandler_t sig_saved; --#ifdef sun -- extern char *ptsname(int fildes); --#endif --#endif -- --#ifdef HAVE_OPENPTY -- if (openpty(&master_fd, &slave_fd, NULL, NULL, NULL) != 0) -- return posix_error(); --#elif defined(HAVE__GETPTY) -- slave_name = _getpty(&master_fd, O_RDWR, 0666, 0); -- if (slave_name == NULL) -- return posix_error(); -- -- slave_fd = open(slave_name, O_RDWR); -- if (slave_fd < 0) -- return posix_error(); --#else -- master_fd = open(DEV_PTY_FILE, O_RDWR | O_NOCTTY); /* open master */ -- if (master_fd < 0) -- return posix_error(); -- sig_saved = PyOS_setsig(SIGCHLD, SIG_DFL); -- /* change permission of slave */ -- if (grantpt(master_fd) < 0) { -- PyOS_setsig(SIGCHLD, sig_saved); -- return posix_error(); -- } -- /* unlock slave */ -- if (unlockpt(master_fd) < 0) { -- PyOS_setsig(SIGCHLD, sig_saved); -- return posix_error(); -- } -- PyOS_setsig(SIGCHLD, sig_saved); -- slave_name = ptsname(master_fd); /* get name of slave */ -- if (slave_name == NULL) -- return posix_error(); -- slave_fd = open(slave_name, O_RDWR | O_NOCTTY); /* open slave */ -- if (slave_fd < 0) -- return posix_error(); --#endif /* HAVE_OPENPTY */ -- -- return Py_BuildValue("(ii)", master_fd, slave_fd); -- -+ PyErr_SetString(PyExc_NotImplementedError, "openpty not implemented for this build"); -+ return NULL; - } - #endif /* defined(HAVE_OPENPTY) || defined(HAVE__GETPTY) || defined(HAVE_DEV_PTMX) */ - diff --git a/pythonforandroid/recipes/python2legacy/patches/enable-openssl.patch b/pythonforandroid/recipes/python2legacy/patches/enable-openssl.patch deleted file mode 100644 index b9e77022d5..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/enable-openssl.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- Python-2.7.2/setup.py.orig 2011-06-11 17:46:28.000000000 +0200 -+++ Python-2.7.2/setup.py 2018-12-23 15:53:22.521709336 +0100 -@@ -706,18 +706,15 @@ class PyBuildExt(build_ext): - '/usr/local/ssl/include', - '/usr/contrib/ssl/include/' - ] -- ssl_incs = find_file('openssl/ssl.h', inc_dirs, -- search_for_ssl_incs_in -- ) -+ ssl_incs = [ -+ os.path.join(os.environ["OPENSSL_BUILD"], 'include'), -+ os.path.join(os.environ["OPENSSL_BUILD"], 'include', 'openssl')] - if ssl_incs is not None: - krb5_h = find_file('krb5.h', inc_dirs, - ['/usr/kerberos/include']) - if krb5_h: - ssl_incs += krb5_h -- ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, -- ['/usr/local/ssl/lib', -- '/usr/contrib/ssl/lib/' -- ] ) -+ ssl_libs = [os.environ["OPENSSL_BUILD"]] - - if (ssl_incs is not None and - ssl_libs is not None): -@@ -735,8 +732,8 @@ class PyBuildExt(build_ext): - '^\s*#\s*define\s+OPENSSL_VERSION_NUMBER\s+(0x[0-9a-fA-F]+)' ) - - # look for the openssl version header on the compiler search path. -- opensslv_h = find_file('openssl/opensslv.h', [], -- inc_dirs + search_for_ssl_incs_in) -+ opensslv_h = [os.path.join(os.environ["OPENSSL_BUILD"], 'include'), -+ os.path.join(os.environ["OPENSSL_BUILD"], 'include', 'openssl')] - if opensslv_h: - name = os.path.join(opensslv_h[0], 'openssl/opensslv.h') - if sys.platform == 'darwin' and is_macosx_sdk_path(name): -@@ -753,8 +750,7 @@ class PyBuildExt(build_ext): - - min_openssl_ver = 0x00907000 - have_any_openssl = ssl_incs is not None and ssl_libs is not None -- have_usable_openssl = (have_any_openssl and -- openssl_ver >= min_openssl_ver) -+ have_usable_openssl = (have_any_openssl and True) - - if have_any_openssl: - if have_usable_openssl: diff --git a/pythonforandroid/recipes/python2legacy/patches/enable-ssl.patch b/pythonforandroid/recipes/python2legacy/patches/enable-ssl.patch deleted file mode 100644 index b7a249e43e..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/enable-ssl.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- python2/Modules/Setup.dist 2011-06-11 10:46:26.000000000 -0500 -+++ b/Modules/Setup.dist 2015-12-28 16:18:13.329648940 -0600 -@@ -211,10 +211,10 @@ - - # Socket module helper for SSL support; you must comment out the other - # socket line above, and possibly edit the SSL variable: --#SSL=/usr/local/ssl --#_ssl _ssl.c \ --# -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ --# -L$(SSL)/lib -lssl -lcrypto -+SSL=/p4a/path/to/openssl -+_ssl _ssl.c \ -+ -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ -+ -L$(SSL) -lssl -lcrypto - - # The crypt module is now disabled by default because it breaks builds - # on many systems (where -lcrypt is needed), e.g. Linux (I believe). diff --git a/pythonforandroid/recipes/python2legacy/patches/fix-configure-darwin.patch b/pythonforandroid/recipes/python2legacy/patches/fix-configure-darwin.patch deleted file mode 100644 index 93a1fe3db3..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/fix-configure-darwin.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- Python-2.7.2.orig/configure 2012-07-09 23:48:02.000000000 +0200 -+++ Python-2.7.2/configure 2012-07-09 23:47:34.000000000 +0200 -@@ -4927,7 +4927,7 @@ - RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} - INSTSONAME="$LDLIBRARY".$SOVERSION - ;; -- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*) -+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|Darwin*) - LDLIBRARY='libpython$(VERSION).so' - BLDLIBRARY='-L. -lpython$(VERSION)' - RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH} -@@ -4960,7 +4960,7 @@ - BLDLIBRARY='-L. -lpython$(VERSION)' - RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib} - ;; -- Darwin*) -+ DDarwin*) - LDLIBRARY='libpython$(VERSION).dylib' - BLDLIBRARY='-L. -lpython$(VERSION)' - RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}' -@@ -7625,6 +7625,9 @@ - LDSHARED='ld -b' - fi ;; - OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";; -+ Darwin*|Linux*|GNU*|QNX*) -+ LDSHARED='$(CC) -shared' -+ LDCXXSHARED='$(CXX) -shared';; - Darwin/1.3*) - LDSHARED='$(CC) -bundle' - LDCXXSHARED='$(CXX) -bundle' -@@ -7680,9 +7683,6 @@ - fi - fi - ;; -- Linux*|GNU*|QNX*) -- LDSHARED='$(CC) -shared' -- LDCXXSHARED='$(CXX) -shared';; - BSD/OS*/4*) - LDSHARED="gcc -shared" - LDCXXSHARED="g++ -shared";; diff --git a/pythonforandroid/recipes/python2legacy/patches/fix-distutils-darwin.patch b/pythonforandroid/recipes/python2legacy/patches/fix-distutils-darwin.patch deleted file mode 100644 index 4083634874..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/fix-distutils-darwin.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- Python-2.7.2.orig/Lib/distutils/command/build_ext.py 2011-06-11 17:46:24.000000000 +0200 -+++ Python-2.7.2/Lib/distutils/command/build_ext.py 2012-08-01 18:32:13.000000000 +0200 -@@ -236,7 +236,7 @@ - # Python's library directory must be appended to library_dirs - sysconfig.get_config_var('Py_ENABLE_SHARED') - if ((sys.platform.startswith('linux') or sys.platform.startswith('gnu') -- or sys.platform.startswith('sunos')) -+ or sys.platform.startswith('sunos') or sys.platform.startswith('darwin')) - and sysconfig.get_config_var('Py_ENABLE_SHARED')): - if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): - # building third party extensions -@@ -750,9 +750,9 @@ - # extensions, it is a reference to the original list - return ext.libraries + [pythonlib, "m"] + extra - -- elif sys.platform == 'darwin': -- # Don't use the default code below -- return ext.libraries -+ #elif sys.platform == 'darwin': -+ # # Don't use the default code below -+ # return ext.libraries - elif sys.platform[:3] == 'aix': - # Don't use the default code below - return ext.libraries diff --git a/pythonforandroid/recipes/python2legacy/patches/fix-dlfcn.patch b/pythonforandroid/recipes/python2legacy/patches/fix-dlfcn.patch deleted file mode 100644 index 7a685cadcb..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/fix-dlfcn.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -Naur Python-2.7.2.orig/Lib/plat-linux2/DLFCN.py Python-2.7.2/Lib/plat-linux2/DLFCN.py ---- Python-2.7.2.orig/Lib/plat-linux2/DLFCN.py 2011-06-11 17:46:24.000000000 +0200 -+++ Python-2.7.2/Lib/plat-linux2/DLFCN.py 2013-07-29 16:34:45.318131844 +0200 -@@ -74,10 +74,17 @@ - # Included from gnu/stubs.h - - # Included from bits/dlfcn.h -+# PATCHED FOR ANDROID (the only supported symbols are): -+# enum { -+# RTLD_NOW = 0, -+# RTLD_LAZY = 1, -+# RTLD_LOCAL = 0, -+# RTLD_GLOBAL = 2, -+# }; - RTLD_LAZY = 0x00001 --RTLD_NOW = 0x00002 --RTLD_BINDING_MASK = 0x3 --RTLD_NOLOAD = 0x00004 --RTLD_GLOBAL = 0x00100 -+RTLD_NOW = 0x00000 -+RTLD_BINDING_MASK = 0x0 -+RTLD_NOLOAD = 0x00000 -+RTLD_GLOBAL = 0x00002 - RTLD_LOCAL = 0 --RTLD_NODELETE = 0x01000 -+RTLD_NODELETE = 0x00000 diff --git a/pythonforandroid/recipes/python2legacy/patches/fix-dynamic-lookup.patch b/pythonforandroid/recipes/python2legacy/patches/fix-dynamic-lookup.patch deleted file mode 100644 index 982cb30b42..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/fix-dynamic-lookup.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Python-2.7.2/Makefile.pre.in.orig 2012-07-05 17:09:45.000000000 +0200 -+++ Python-2.7.2/Makefile.pre.in 2012-07-05 17:10:00.000000000 +0200 -@@ -435,7 +435,7 @@ - fi - - libpython$(VERSION).dylib: $(LIBRARY_OBJS) -- $(CC) -dynamiclib -Wl,-single_module $(LDFLAGS) -undefined dynamic_lookup -Wl,-install_name,$(prefix)/lib/libpython$(VERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ -+ $(CC) -dynamiclib -Wl,-single_module $(LDFLAGS) -Wl,-install_name,$(prefix)/lib/libpython$(VERSION).dylib -Wl,-compatibility_version,$(VERSION) -Wl,-current_version,$(VERSION) -o $@ $(LIBRARY_OBJS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ - - - libpython$(VERSION).sl: $(LIBRARY_OBJS) diff --git a/pythonforandroid/recipes/python2legacy/patches/fix-filesystemdefaultencoding.patch b/pythonforandroid/recipes/python2legacy/patches/fix-filesystemdefaultencoding.patch deleted file mode 100644 index c77998e468..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/fix-filesystemdefaultencoding.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Python-2.7.2.orig/Python/bltinmodule.c 2012-03-30 01:44:57.018079845 +0200 -+++ Python-2.7.2/Python/bltinmodule.c 2012-03-30 01:45:02.650079649 +0200 -@@ -22,7 +22,7 @@ - #elif defined(__APPLE__) - const char *Py_FileSystemDefaultEncoding = "utf-8"; - #else --const char *Py_FileSystemDefaultEncoding = NULL; /* use default */ -+const char *Py_FileSystemDefaultEncoding = "utf-8"; /* use default */ - #endif - - /* Forward */ diff --git a/pythonforandroid/recipes/python2legacy/patches/fix-ftime-removal.patch b/pythonforandroid/recipes/python2legacy/patches/fix-ftime-removal.patch deleted file mode 100644 index 5d79a1dc12..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/fix-ftime-removal.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -u -r Python-2.7.2.orig/Modules/timemodule.c Python-2.7.2/Modules/timemodule.c ---- Python-2.7.2.orig/Modules/timemodule.c 2011-06-11 15:46:27.000000000 +0000 -+++ Python-2.7.2/Modules/timemodule.c 2015-09-11 10:37:36.708661691 +0000 -@@ -27,6 +27,7 @@ - #include - #endif - -+#undef HAVE_FTIME - #ifdef HAVE_FTIME - #include - #if !defined(MS_WINDOWS) && !defined(PYOS_OS2) diff --git a/pythonforandroid/recipes/python2legacy/patches/fix-gethostbyaddr.patch b/pythonforandroid/recipes/python2legacy/patches/fix-gethostbyaddr.patch deleted file mode 100644 index 7b04250a3c..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/fix-gethostbyaddr.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- Python-2.7.2/Modules/socketmodule.c.orig 2012-01-06 01:40:09.915694810 +0100 -+++ Python-2.7.2/Modules/socketmodule.c 2012-01-06 01:40:36.967694486 +0100 -@@ -146,6 +146,9 @@ - On the other hand, not all Linux versions agree, so there the settings - computed by the configure script are needed! */ - -+/* Android hack, same reason are what is described above */ -+#undef HAVE_GETHOSTBYNAME_R -+ - #ifndef linux - # undef HAVE_GETHOSTBYNAME_R_3_ARG - # undef HAVE_GETHOSTBYNAME_R_5_ARG diff --git a/pythonforandroid/recipes/python2legacy/patches/fix-locale.patch b/pythonforandroid/recipes/python2legacy/patches/fix-locale.patch deleted file mode 100644 index bd4fcbf0f1..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/fix-locale.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- Python-2.7.2.orig/Modules/pwdmodule.c 2010-08-16 22:30:26.000000000 +0200 -+++ Python-2.7.2/Modules/pwdmodule.c 2011-04-20 17:52:12.000000000 +0200 -@@ -75,11 +75,7 @@ - #endif - SETI(setIndex++, p->pw_uid); - SETI(setIndex++, p->pw_gid); --#ifdef __VMS - SETS(setIndex++, ""); --#else -- SETS(setIndex++, p->pw_gecos); --#endif - SETS(setIndex++, p->pw_dir); - SETS(setIndex++, p->pw_shell); - ---- Python-2.7.2.orig/Modules/posixmodule.c 2010-11-26 18:35:50.000000000 +0100 -+++ Python-2.7.2/Modules/posixmodule.c 2011-04-20 17:52:12.000000000 +0200 -@@ -3775,13 +3775,6 @@ - slave_fd = open(slave_name, O_RDWR | O_NOCTTY); /* open slave */ - if (slave_fd < 0) - return posix_error(); --#if !defined(__CYGWIN__) && !defined(HAVE_DEV_PTC) -- ioctl(slave_fd, I_PUSH, "ptem"); /* push ptem */ -- ioctl(slave_fd, I_PUSH, "ldterm"); /* push ldterm */ --#ifndef __hpux -- ioctl(slave_fd, I_PUSH, "ttcompat"); /* push ttcompat */ --#endif /* __hpux */ --#endif /* HAVE_CYGWIN */ - #endif /* HAVE_OPENPTY */ - - return Py_BuildValue("(ii)", master_fd, slave_fd); ---- Python-2.7.2.orig/Objects/stringlib/formatter.h 2010-08-01 12:45:15.000000000 +0200 -+++ Python-2.7.2/Objects/stringlib/formatter.h 2011-04-20 17:52:12.000000000 +0200 -@@ -639,13 +639,7 @@ - get_locale_info(int type, LocaleInfo *locale_info) - { - switch (type) { -- case LT_CURRENT_LOCALE: { -- struct lconv *locale_data = localeconv(); -- locale_info->decimal_point = locale_data->decimal_point; -- locale_info->thousands_sep = locale_data->thousands_sep; -- locale_info->grouping = locale_data->grouping; -- break; -- } -+ case LT_CURRENT_LOCALE: - case LT_DEFAULT_LOCALE: - locale_info->decimal_point = "."; - locale_info->thousands_sep = ","; ---- Python-2.7.2.orig/Objects/stringlib/localeutil.h 2009-04-22 15:29:05.000000000 +0200 -+++ Python-2.7.2/Objects/stringlib/localeutil.h 2011-04-20 17:52:12.000000000 +0200 -@@ -202,9 +202,8 @@ - Py_ssize_t n_digits, - Py_ssize_t min_width) - { -- struct lconv *locale_data = localeconv(); -- const char *grouping = locale_data->grouping; -- const char *thousands_sep = locale_data->thousands_sep; -+ const char *grouping = "\3\0"; -+ const char *thousands_sep = ","; - - return _Py_InsertThousandsGrouping(buffer, n_buffer, digits, n_digits, - min_width, grouping, thousands_sep); ---- Python-2.7.2.orig/Python/pystrtod.c 2010-05-09 16:46:46.000000000 +0200 -+++ Python-2.7.2/Python/pystrtod.c 2011-04-20 17:52:12.000000000 +0200 -@@ -126,7 +126,6 @@ - { - char *fail_pos; - double val = -1.0; -- struct lconv *locale_data; - const char *decimal_point; - size_t decimal_point_len; - const char *p, *decimal_point_pos; -@@ -138,8 +137,7 @@ - - fail_pos = NULL; - -- locale_data = localeconv(); -- decimal_point = locale_data->decimal_point; -+ decimal_point = "."; - decimal_point_len = strlen(decimal_point); - - assert(decimal_point_len != 0); -@@ -375,8 +373,7 @@ - Py_LOCAL_INLINE(void) - change_decimal_from_locale_to_dot(char* buffer) - { -- struct lconv *locale_data = localeconv(); -- const char *decimal_point = locale_data->decimal_point; -+ const char *decimal_point = "."; - - if (decimal_point[0] != '.' || decimal_point[1] != 0) { - size_t decimal_point_len = strlen(decimal_point); diff --git a/pythonforandroid/recipes/python2legacy/patches/fix-remove-corefoundation.patch b/pythonforandroid/recipes/python2legacy/patches/fix-remove-corefoundation.patch deleted file mode 100644 index 02a472e1d6..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/fix-remove-corefoundation.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- Python-2.7.2/configure.orig 2012-07-05 16:44:36.000000000 +0200 -+++ Python-2.7.2/configure 2012-07-05 16:44:44.000000000 +0200 -@@ -13732,10 +13732,6 @@ - - fi - --if test $ac_sys_system = Darwin --then -- LIBS="$LIBS -framework CoreFoundation" --fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5 diff --git a/pythonforandroid/recipes/python2legacy/patches/fix-setup-flags.patch b/pythonforandroid/recipes/python2legacy/patches/fix-setup-flags.patch deleted file mode 100644 index b1f640cc77..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/fix-setup-flags.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- Python-2.7.2/setup.py.orig 2012-01-08 15:10:39.867332119 +0100 -+++ Python-2.7.2/setup.py 2012-01-08 15:10:45.723331911 +0100 -@@ -445,6 +445,13 @@ - '/lib', '/usr/lib', - ] - inc_dirs += ['/usr/include'] -+ else: -+ cflags = os.environ.get('CFLAGS') -+ if cflags: -+ inc_dirs += [x[2:] for x in cflags.split() if x.startswith('-I')] -+ ldflags = os.environ.get('LDFLAGS') -+ if ldflags: -+ lib_dirs += [x[2:] for x in ldflags.split() if x.startswith('-L')] - exts = [] - missing = [] - diff --git a/pythonforandroid/recipes/python2legacy/patches/fix-termios.patch b/pythonforandroid/recipes/python2legacy/patches/fix-termios.patch deleted file mode 100644 index a114e276db..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/fix-termios.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- Python-2.7.2.orig/Modules/termios.c 2012-06-12 02:49:39.780162534 +0200 -+++ Python-2.7.2/Modules/termios.c 2012-06-12 02:51:52.092157828 +0200 -@@ -227,6 +227,7 @@ - return Py_None; - } - -+#if 0 // No tcdrain defined for Android. - PyDoc_STRVAR(termios_tcdrain__doc__, - "tcdrain(fd) -> None\n\ - \n\ -@@ -246,6 +247,7 @@ - Py_INCREF(Py_None); - return Py_None; - } -+#endif - - PyDoc_STRVAR(termios_tcflush__doc__, - "tcflush(fd, queue) -> None\n\ -@@ -301,8 +303,10 @@ - METH_VARARGS, termios_tcsetattr__doc__}, - {"tcsendbreak", termios_tcsendbreak, - METH_VARARGS, termios_tcsendbreak__doc__}, -+#if 0 // No tcdrain defined for Android. - {"tcdrain", termios_tcdrain, - METH_VARARGS, termios_tcdrain__doc__}, -+#endif - {"tcflush", termios_tcflush, - METH_VARARGS, termios_tcflush__doc__}, - {"tcflow", termios_tcflow, diff --git a/pythonforandroid/recipes/python2legacy/patches/parsetuple.patch b/pythonforandroid/recipes/python2legacy/patches/parsetuple.patch deleted file mode 100644 index 150c75e495..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/parsetuple.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Python-2.7.2/configure.orig 2015-06-24 17:47:39.181473779 +0200 -+++ Python-2.7.2/configure 2015-06-24 17:48:31.646173137 +0200 -@@ -5731,7 +5731,7 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5 - $as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; } - save_CFLAGS=$CFLAGS -- CFLAGS="$CFLAGS -Werror" -+ CFLAGS="$CFLAGS -Werror -Wformat" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext - /* end confdefs.h. */ - diff --git a/pythonforandroid/recipes/python2legacy/patches/verbose-compilation.patch b/pythonforandroid/recipes/python2legacy/patches/verbose-compilation.patch deleted file mode 100644 index 00c89f9065..0000000000 --- a/pythonforandroid/recipes/python2legacy/patches/verbose-compilation.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- Python-2.7.2/Makefile.pre.in.orig 2012-01-07 18:25:42.097075564 +0100 -+++ Python-2.7.2/Makefile.pre.in 2012-01-07 18:26:03.289074810 +0100 -@@ -410,8 +410,8 @@ - # Build the shared modules - sharedmods: $(BUILDPYTHON) - @case $$MAKEFLAGS in \ -- *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;; \ -+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' PYTHONXCPREFIX='$(DESTDIR)$(prefix)' $(HOSTPYTHON) -E $(srcdir)/setup.py build -v;; \ -+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' PYTHONXCPREFIX='$(DESTDIR)$(prefix)' $(HOSTPYTHON) -E $(srcdir)/setup.py build -v;; \ - esac - - # Build static library diff --git a/pythonforandroid/recipes/python3/__init__.py b/pythonforandroid/recipes/python3/__init__.py index 47656754ea..f22dce8e91 100644 --- a/pythonforandroid/recipes/python3/__init__.py +++ b/pythonforandroid/recipes/python3/__init__.py @@ -28,7 +28,7 @@ class Python3Recipe(GuestPythonRecipe): patches = patches + ["patches/remove-fix-cortex-a8.patch"] depends = ['hostpython3', 'sqlite3', 'openssl', 'libffi'] - conflicts = ['python3crystax', 'python2', 'python2legacy'] + conflicts = ['python3crystax', 'python2'] configure_args = ( '--host={android_host}', diff --git a/pythonforandroid/recipes/python3crystax/__init__.py b/pythonforandroid/recipes/python3crystax/__init__.py index 0196c929ba..805be0dd12 100644 --- a/pythonforandroid/recipes/python3crystax/__init__.py +++ b/pythonforandroid/recipes/python3crystax/__init__.py @@ -17,7 +17,7 @@ class Python3CrystaXRecipe(TargetPythonRecipe): name = 'python3crystax' depends = ['hostpython3crystax'] - conflicts = ['python3', 'python2', 'python2legacy'] + conflicts = ['python3', 'python2'] from_crystax = True diff --git a/pythonforandroid/recipes/setuptools/__init__.py b/pythonforandroid/recipes/setuptools/__init__.py index 7a8b62c7ca..512d61a843 100644 --- a/pythonforandroid/recipes/setuptools/__init__.py +++ b/pythonforandroid/recipes/setuptools/__init__.py @@ -6,10 +6,7 @@ class SetuptoolsRecipe(PythonRecipe): url = 'https://pypi.python.org/packages/source/s/setuptools/setuptools-{version}.zip' call_hostpython_via_targetpython = False install_in_hostpython = True - depends = [('python2', 'python2legacy', 'python3', 'python3crystax')] - # this recipe seems to control the dependency graph in some way, because - # if removed the python2legacy recipe fails to solve the dependency order - # when using the sdl2 bootstrap...so be careful removing this line!!! + depends = [('python2', 'python3', 'python3crystax')] recipe = SetuptoolsRecipe() diff --git a/pythonforandroid/recipes/six/__init__.py b/pythonforandroid/recipes/six/__init__.py index 581ab9091c..512177af07 100644 --- a/pythonforandroid/recipes/six/__init__.py +++ b/pythonforandroid/recipes/six/__init__.py @@ -5,7 +5,7 @@ class SixRecipe(PythonRecipe): version = '1.9.0' url = 'https://pypi.python.org/packages/source/s/six/six-{version}.tar.gz' - depends = [('python2', 'python2legacy', 'python3', 'python3crystax')] + depends = [('python2', 'python3', 'python3crystax')] recipe = SixRecipe() diff --git a/testapps/setup_testapp_python2legacy_sqlite_openssl.py b/testapps/setup_testapp_python2legacy_sqlite_openssl.py deleted file mode 100644 index 713ad322ef..0000000000 --- a/testapps/setup_testapp_python2legacy_sqlite_openssl.py +++ /dev/null @@ -1,26 +0,0 @@ - -from distutils.core import setup -from setuptools import find_packages - -options = {'apk': {'requirements': 'sdl2,pyjnius,kivy,python2legacy,' - 'openssl,requests,peewee,sqlite3', - 'android-api': 27, - 'ndk-api': 19, - 'ndk-dir': '/home/sandy/android/crystax-ndk-10.3.2', - 'dist-name': 'bdisttest_python2legacy_sqlite_openssl', - 'ndk-version': '10.3.2', - 'permissions': ['INTERNET', 'VIBRATE'], - 'arch': 'armeabi-v7a', - 'window': None, - }} - -setup( - name='testapp_python2legacy_sqlite_openssl', - version='1.1', - description='p4a setup.py test', - author='Pol Canelles', - author_email='canellestudi@gmail.com', - packages=find_packages(), - options=options, - package_data={'testapp_sqlite_openssl': ['*.py', '*.png']} -)