diff --git a/buildozer.spec b/buildozer.spec index da8e62f..07a09fc 100644 --- a/buildozer.spec +++ b/buildozer.spec @@ -138,6 +138,7 @@ android.permissions = INTERNET # (int) Minimum API required #android.minapi = 9 +android.minapi = 19 # (int) Android SDK version to use #android.sdk = 20 diff --git a/docs/Troubleshoot.md b/docs/Troubleshoot.md index edd501d..aefadd9 100644 --- a/docs/Troubleshoot.md +++ b/docs/Troubleshoot.md @@ -103,6 +103,12 @@ if not is_gradle_build: ``` +Uninstaling the app using adb: +``` +buildozer android adb -- uninstall com.github.andremiras.etheroll +``` + + ## Kivy diff --git a/src/CHANGELOG.md b/src/CHANGELOG.md index 25e4238..27f7e3d 100644 --- a/src/CHANGELOG.md +++ b/src/CHANGELOG.md @@ -5,6 +5,7 @@ - Split dedicated Etheroll library, refs #97 - Remove legacy dependencies, refs #112 + - Migrate to upstream recipes ## [v20181028] @@ -12,8 +13,8 @@ - Click notification to open the app, refs #114 - Bets 2nd decimal place precision, refs #116 - Platform agnostic notification service, refs #120 - - Updates balance on roll, refs #115 - - Removes typing patch, refs #72 + - Update balance on roll, refs #115 + - Remove typing patch, refs #72 ## [v20180918] diff --git a/src/python-for-android/recipes/cffi/__init__.py b/src/python-for-android/recipes/cffi/__init__.py deleted file mode 100644 index 21ba4b6..0000000 --- a/src/python-for-android/recipes/cffi/__init__.py +++ /dev/null @@ -1,43 +0,0 @@ -import os -from pythonforandroid.recipe import CompiledComponentsPythonRecipe - - -class CffiRecipe(CompiledComponentsPythonRecipe): - name = 'cffi' - version = '1.4.2' - url = 'https://pypi.python.org/packages/source/c/cffi/cffi-{version}.tar.gz' - - depends = [('python2', 'python3crystax'), 'setuptools', 'pycparser', 'libffi'] - - patches = ['disable-pkg-config.patch'] - - # call_hostpython_via_targetpython = False - install_in_hostpython = True - - def get_recipe_env(self, arch=None): - env = super(CffiRecipe, self).get_recipe_env(arch) - libffi = self.get_recipe('libffi', self.ctx) - includes = libffi.get_include_dirs(arch) - env['CFLAGS'] = ' -I'.join([env.get('CFLAGS', '')] + includes) - env['LDFLAGS'] = (env.get('CFLAGS', '') + ' -L' + - self.ctx.get_libs_dir(arch.arch)) - env['LDFLAGS'] += ' -L{}'.format(os.path.join(self.ctx.bootstrap.build_dir, 'libs', arch.arch)) - # required for libc and libdl - ndk_dir = self.ctx.ndk_platform - ndk_lib_dir = os.path.join(ndk_dir, 'usr', 'lib') - env['LDFLAGS'] += ' -L{}'.format(ndk_lib_dir) - env['LDFLAGS'] += " --sysroot={}".format(self.ctx.ndk_platform) - env['PYTHONPATH'] = ':'.join([ - self.ctx.get_site_packages_dir(), - env['BUILDLIB_PATH'], - ]) - if self.ctx.ndk == 'crystax': - # only keeps major.minor (discards patch) - python_version = self.ctx.python_recipe.version[0:3] - ndk_dir_python = os.path.join(self.ctx.ndk_dir, 'sources/python/', python_version) - env['LDFLAGS'] += ' -L{}'.format(os.path.join(ndk_dir_python, 'libs', arch.arch)) - env['LDFLAGS'] += ' -lpython{}m'.format(python_version) - return env - - -recipe = CffiRecipe() diff --git a/src/python-for-android/recipes/cffi/disable-pkg-config.patch b/src/python-for-android/recipes/cffi/disable-pkg-config.patch deleted file mode 100644 index 56346bb..0000000 --- a/src/python-for-android/recipes/cffi/disable-pkg-config.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -Naur cffi-1.4.2/setup.py b/setup.py ---- cffi-1.4.2/setup.py 2015-12-21 12:09:47.000000000 -0600 -+++ b/setup.py 2015-12-23 10:20:40.590622524 -0600 -@@ -5,8 +5,7 @@ - - sources = ['c/_cffi_backend.c'] - libraries = ['ffi'] --include_dirs = ['/usr/include/ffi', -- '/usr/include/libffi'] # may be changed by pkg-config -+include_dirs = [] - define_macros = [] - library_dirs = [] - extra_compile_args = [] -@@ -67,14 +66,7 @@ - sys.stderr.write("The above error message can be safely ignored\n") - - def use_pkg_config(): -- if sys.platform == 'darwin' and os.path.exists('/usr/local/bin/brew'): -- use_homebrew_for_libffi() -- -- _ask_pkg_config(include_dirs, '--cflags-only-I', '-I', sysroot=True) -- _ask_pkg_config(extra_compile_args, '--cflags-only-other') -- _ask_pkg_config(library_dirs, '--libs-only-L', '-L', sysroot=True) -- _ask_pkg_config(extra_link_args, '--libs-only-other') -- _ask_pkg_config(libraries, '--libs-only-l', '-l') -+ pass - - def use_homebrew_for_libffi(): - # We can build by setting: diff --git a/src/python-for-android/recipes/coincurve/__init__.py b/src/python-for-android/recipes/coincurve/__init__.py deleted file mode 100644 index 6803bda..0000000 --- a/src/python-for-android/recipes/coincurve/__init__.py +++ /dev/null @@ -1,32 +0,0 @@ -import os -from pythonforandroid.recipe import PythonRecipe - - -class CoincurveRecipe(PythonRecipe): - version = '7.1.0' - url = 'https://github.com/ofek/coincurve/archive/{version}.tar.gz' - call_hostpython_via_targetpython = False - depends = [('python2', 'python3crystax'), 'setuptools', - 'libffi', 'cffi', 'libsecp256k1'] - patches = [ - "cross_compile.patch", "drop_setup_requires.patch", - "find_lib.patch", "no-download.patch"] - - def get_recipe_env(self, arch=None, with_flags_in_cc=True): - env = super(CoincurveRecipe, self).get_recipe_env(arch, with_flags_in_cc) - libsecp256k1 = self.get_recipe('libsecp256k1', self.ctx) - libsecp256k1_dir = libsecp256k1.get_build_dir(arch.arch) - env['CFLAGS'] += ' -I' + os.path.join(libsecp256k1_dir, 'include') - # required additional library and path for Crystax - if self.ctx.ndk == 'crystax': - # only keeps major.minor (discards patch) - python_version = self.ctx.python_recipe.version[0:3] - ndk_dir_python = os.path.join(self.ctx.ndk_dir, 'sources/python/', python_version) - env['LDFLAGS'] += ' -L{}'.format(os.path.join(ndk_dir_python, 'libs', arch.arch)) - env['LDFLAGS'] += ' -lpython{}m'.format(python_version) - env['LDFLAGS'] += " -lsecp256k1" - return env - - -recipe = CoincurveRecipe() - diff --git a/src/python-for-android/recipes/coincurve/cross_compile.patch b/src/python-for-android/recipes/coincurve/cross_compile.patch deleted file mode 100644 index fbbdd49..0000000 --- a/src/python-for-android/recipes/coincurve/cross_compile.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/setup.py b/setup.py -index c224fb2..bf925bd 100644 ---- a/setup.py -+++ b/setup.py -@@ -182,6 +182,7 @@ class build_clib(_build_clib): - '--disable-dependency-tracking', - '--with-pic', - '--enable-module-recovery', -+ "--host=%s" % os.environ['TOOLCHAIN_PREFIX'], - '--disable-jni', - '--prefix', - os.path.abspath(self.build_clib), diff --git a/src/python-for-android/recipes/coincurve/drop_setup_requires.patch b/src/python-for-android/recipes/coincurve/drop_setup_requires.patch deleted file mode 100644 index 9994b3f..0000000 --- a/src/python-for-android/recipes/coincurve/drop_setup_requires.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/setup.py b/setup.py -index c224fb2..466e789 100644 ---- a/setup.py -+++ b/setup.py -@@ -250,7 +250,6 @@ else: - def has_c_libraries(self): - return not has_system_lib() - setup_kwargs = dict( -- setup_requires=['cffi>=1.3.0', 'pytest-runner>=2.6.2'], - ext_package='coincurve', - cffi_modules=['_cffi_build/build.py:ffi'], - cmdclass={ diff --git a/src/python-for-android/recipes/coincurve/find_lib.patch b/src/python-for-android/recipes/coincurve/find_lib.patch deleted file mode 100644 index 3d3c41d..0000000 --- a/src/python-for-android/recipes/coincurve/find_lib.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/setup_support.py b/setup_support.py -index e7a4f2e..72f0c4d 100644 ---- a/setup_support.py -+++ b/setup_support.py -@@ -68,6 +69,8 @@ def build_flags(library, type_, path): - - - def _find_lib(): -+ # we're picking up the recipe one -+ return True - from cffi import FFI - ffi = FFI() - try: diff --git a/src/python-for-android/recipes/coincurve/no-download.patch b/src/python-for-android/recipes/coincurve/no-download.patch deleted file mode 100644 index fcf4d20..0000000 --- a/src/python-for-android/recipes/coincurve/no-download.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/setup.py b/setup.py -index c224fb2..d5f6d1a 100644 ---- a/setup.py -+++ b/setup.py -@@ -51,6 +51,8 @@ if [int(i) for i in setuptools_version.split('.', 2)[:2]] < [3, 3]: - - - def download_library(command): -+ # we will use the custom libsecp256k1 recipe -+ return - if command.dry_run: - return - libdir = absolute('libsecp256k1') diff --git a/src/python-for-android/recipes/decorator/__init__.py b/src/python-for-android/recipes/decorator/__init__.py deleted file mode 100644 index 2dbda4e..0000000 --- a/src/python-for-android/recipes/decorator/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -from pythonforandroid.recipe import PythonRecipe - -class DecoratorPyRecipe(PythonRecipe): - version = '4.2.1' - url = 'https://pypi.python.org/packages/source/d/decorator/decorator-{version}.tar.gz' - url = 'https://github.com/micheles/decorator/archive/{version}.tar.gz' - depends = [('python2', 'python3crystax'), 'setuptools'] - site_packages_name = 'decorator' - call_hostpython_via_targetpython = False - -recipe = DecoratorPyRecipe() diff --git a/src/python-for-android/recipes/eth-account/__init__.py b/src/python-for-android/recipes/eth-account/__init__.py deleted file mode 100644 index b97c276..0000000 --- a/src/python-for-android/recipes/eth-account/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -from pythonforandroid.recipe import PythonRecipe - - -class EthRlpRecipe(PythonRecipe): - version = '0.2.2' - url = 'https://github.com/ethereum/eth-account/archive/v{version}.tar.gz' - depends = [('python2', 'python3crystax'), 'setuptools'] - patches = ['disable-setuptools-markdown.patch'] - - -recipe = EthRlpRecipe() diff --git a/src/python-for-android/recipes/eth-account/disable-setuptools-markdown.patch b/src/python-for-android/recipes/eth-account/disable-setuptools-markdown.patch deleted file mode 100644 index 93f082b..0000000 --- a/src/python-for-android/recipes/eth-account/disable-setuptools-markdown.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/setup.py b/setup.py -index 63a6624..c0d742f 100644 ---- a/setup.py -+++ b/setup.py -@@ -39,7 +39,6 @@ setup( - # *IMPORTANT*: Don't manually change the version here. Use `make bump`, as described in readme - version='0.2.2', - description="""eth-account: Sign Ethereum transactions and messages with local private keys""", -- long_description_markdown_filename='README.md', - author='Jason Carver', - author_email='ethcalibur+pip@gmail.com', - url='https://github.com/ethereum/eth-account', -@@ -52,7 +51,6 @@ setup( - "hexbytes>=0.1.0,<1", - "eth-rlp>=0.1.2,<1", - ], -- setup_requires=['setuptools-markdown'], - python_requires='>=3.5, <4', - extras_require=extras_require, - py_modules=['eth_account'], diff --git a/src/python-for-android/recipes/eth-hash/__init__.py b/src/python-for-android/recipes/eth-hash/__init__.py deleted file mode 100644 index 86aaa82..0000000 --- a/src/python-for-android/recipes/eth-hash/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -from pythonforandroid.recipe import PythonRecipe - - -class EthHashRecipe(PythonRecipe): - version = '0.2.0' - url = 'https://github.com/ethereum/eth-hash/archive/v{version}.tar.gz' - depends = [('python2', 'python3crystax'), 'setuptools'] - patches = ['disable-setuptools-markdown.patch'] - - -recipe = EthHashRecipe() diff --git a/src/python-for-android/recipes/eth-hash/disable-setuptools-markdown.patch b/src/python-for-android/recipes/eth-hash/disable-setuptools-markdown.patch deleted file mode 100644 index e9ea788..0000000 --- a/src/python-for-android/recipes/eth-hash/disable-setuptools-markdown.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/setup.py b/setup.py -index 8680508..8e9fd09 100644 ---- a/setup.py -+++ b/setup.py -@@ -46,14 +46,12 @@ setup( - # *IMPORTANT*: Don't manually change the version here. Use `make bump`, as described in readme - version='0.2.0', - description="""eth-hash: The Ethereum hashing function, keccak256, sometimes (erroneously) called sha3""", -- long_description_markdown_filename='README.md', - author='Jason Carver', - author_email='ethcalibur+pip@gmail.com', - url='https://github.com/ethereum/eth-hash', - include_package_data=True, - install_requires=[ - ], -- setup_requires=['setuptools-markdown'], - python_requires='>=3.5, <4', - extras_require=extras_require, - py_modules=['eth_hash'], diff --git a/src/python-for-android/recipes/eth-rlp/__init__.py b/src/python-for-android/recipes/eth-rlp/__init__.py deleted file mode 100644 index 2eef8b8..0000000 --- a/src/python-for-android/recipes/eth-rlp/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -from pythonforandroid.recipe import PythonRecipe - - -class EthRlpRecipe(PythonRecipe): - version = '0.1.2' - url = 'https://github.com/ethereum/eth-rlp/archive/v{version}.tar.gz' - depends = [('python2', 'python3crystax'), 'setuptools'] - patches = ['disable-setuptools-markdown.patch'] - - -recipe = EthRlpRecipe() diff --git a/src/python-for-android/recipes/eth-rlp/disable-setuptools-markdown.patch b/src/python-for-android/recipes/eth-rlp/disable-setuptools-markdown.patch deleted file mode 100644 index 982e409..0000000 --- a/src/python-for-android/recipes/eth-rlp/disable-setuptools-markdown.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/setup.py b/setup.py -index 1be66e6..5dd51a4 100644 ---- a/setup.py -+++ b/setup.py -@@ -40,7 +40,6 @@ setup( - # *IMPORTANT*: Don't manually change the version here. Use `make bump`, as described in readme - version='0.1.2', - description="""eth-rlp: RLP definitions for common Ethereum objects in Python""", -- long_description_markdown_filename='README.md', - author='Jason Carver', - author_email='ethcalibur+pip@gmail.com', - url='https://github.com/ethereum/eth-rlp', -@@ -50,7 +49,6 @@ setup( - "hexbytes>=0.1.0,<1", - "rlp>=0.6.0,<2", - ], -- setup_requires=['setuptools-markdown'], - python_requires='>=3.5, <4', - extras_require=extras_require, - py_modules=['eth_rlp'], diff --git a/src/python-for-android/recipes/eth-typing/__init__.py b/src/python-for-android/recipes/eth-typing/__init__.py deleted file mode 100644 index 84d98d0..0000000 --- a/src/python-for-android/recipes/eth-typing/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -from pythonforandroid.recipe import PythonRecipe - - -class EthTypingRecipe(PythonRecipe): - version = '2.0.0' - url = 'https://github.com/ethereum/eth-typing/archive/v{version}.tar.gz' - depends = [('python2', 'python3crystax'), 'setuptools'] - patches = ['setup.patch'] - - -recipe = EthTypingRecipe() diff --git a/src/python-for-android/recipes/eth-typing/setup.patch b/src/python-for-android/recipes/eth-typing/setup.patch deleted file mode 100644 index 0e09754..0000000 --- a/src/python-for-android/recipes/eth-typing/setup.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/setup.py b/setup.py -index 52bf1c1..02be4d0 100644 ---- a/setup.py -+++ b/setup.py -@@ -40,13 +40,10 @@ setup( - # *IMPORTANT*: Don't manually change the version here. Use `make bump`, as described in readme - version='2.0.0', - description="""eth-typing: Common type annotations for ethereum python packages""", -- long_description_markdown_filename='README.md', - author='The eth-typing contributors', - author_email='eth-typing@ethereum.org', - url='https://github.com/ethereum/eth-typing', - include_package_data=True, -- setup_requires=['setuptools-markdown'], -- python_requires='>=3.5, <4', - extras_require=extras_require, - py_modules=['eth_typing'], - license="MIT", diff --git a/src/python-for-android/recipes/greenlet/__init__.py b/src/python-for-android/recipes/greenlet/__init__.py deleted file mode 100644 index 65c9c4d..0000000 --- a/src/python-for-android/recipes/greenlet/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -import os -from pythonforandroid.recipe import PythonRecipe - - -class GreenletRecipe(PythonRecipe): - version = '0.4.9' - url = 'https://pypi.python.org/packages/source/g/greenlet/greenlet-{version}.tar.gz' - depends = [('python2', 'python3crystax')] - - def get_recipe_env(self, arch=None, with_flags_in_cc=True): - env = super(GreenletRecipe, self).get_recipe_env(arch, with_flags_in_cc) - # required additional library and path for Crystax - if self.ctx.ndk == 'crystax': - # only keeps major.minor (discards patch) - python_version = self.ctx.python_recipe.version[0:3] - ndk_dir_python = os.path.join(self.ctx.ndk_dir, 'sources/python/', python_version) - env['LDFLAGS'] += ' -L{}'.format(os.path.join(ndk_dir_python, 'libs', arch.arch)) - env['LDFLAGS'] += ' -lpython{}m'.format(python_version) - return env - - -recipe = GreenletRecipe() diff --git a/src/python-for-android/recipes/hexbytes/__init__.py b/src/python-for-android/recipes/hexbytes/__init__.py deleted file mode 100644 index d42f2b7..0000000 --- a/src/python-for-android/recipes/hexbytes/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -from pythonforandroid.recipe import PythonRecipe - - -class HexbytesRecipe(PythonRecipe): - version = '0.1.0' - url = 'https://github.com/carver/hexbytes/archive/v{version}.tar.gz' - depends = [('python2', 'python3crystax'), 'setuptools'] - patches = ['disable-setuptools-markdown.patch'] - - -recipe = HexbytesRecipe() diff --git a/src/python-for-android/recipes/hexbytes/disable-setuptools-markdown.patch b/src/python-for-android/recipes/hexbytes/disable-setuptools-markdown.patch deleted file mode 100644 index eee3e52..0000000 --- a/src/python-for-android/recipes/hexbytes/disable-setuptools-markdown.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff --git a/setup.py b/setup.py -index 22b4c5f..76fa946 100644 ---- a/setup.py -+++ b/setup.py -@@ -41,7 +41,6 @@ setup( - # *IMPORTANT*: Don't manually change the version here. Use `make bump`, as described in readme - version='0.1.0', - description="""hexbytes: Python `bytes` subclass that decodes hex, with a readable console output""", -- long_description_markdown_filename='README.md', - author='Jason Carver', - author_email='ethcalibur+pip@gmail.com', - url='https://github.com/ethereum/hexbytes', -@@ -49,7 +48,6 @@ setup( - install_requires=[ - 'eth-utils>=1.0.1,<2.0.0', - ], -- setup_requires=['setuptools-markdown'], - extras_require=extras_require, - py_modules=['hexbytes'], - license="MIT", diff --git a/src/python-for-android/recipes/hostpython3crystax/__init__.py b/src/python-for-android/recipes/hostpython3crystax/__init__.py deleted file mode 100644 index 4c4a90c..0000000 --- a/src/python-for-android/recipes/hostpython3crystax/__init__.py +++ /dev/null @@ -1,42 +0,0 @@ -from pythonforandroid.recipe import Recipe, shprint -from os.path import join -import sh - - -class Hostpython3Recipe(Recipe): - version = '3.5' - # url = 'http://python.org/ftp/python/{version}/Python-{version}.tgz' - # url = 'https://github.com/crystax/android-vendor-python-3-5/archive/master.zip' - name = 'hostpython3crystax' - - conflicts = ['hostpython2'] - - 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 prebuild_armeabi(self): - # # Override hostpython Setup? - # shprint(sh.cp, join(self.get_recipe_dir(), 'Setup'), - # join(self.get_build_dir('armeabi'), 'Modules', 'Setup')) - - def get_build_dir(self, arch=None): - return join(self.get_build_container_dir(), self.name) - - def build_arch(self, arch): - """ - Creates expected build and symlinks system Python version. - """ - self.ctx.hostpython = '/usr/bin/false' - self.ctx.hostpgen = '/usr/bin/false' - # creates the sub buildir (used by other recipes) - # https://github.com/kivy/python-for-android/issues/1154 - sub_build_dir = join(self.get_build_dir(), 'build') - shprint(sh.mkdir, '-p', sub_build_dir) - system_python = sh.which("python" + self.version) - link_dest = join(self.get_build_dir(), 'hostpython') - shprint(sh.ln, '-sf', system_python, link_dest) - - -recipe = Hostpython3Recipe() diff --git a/src/python-for-android/recipes/idna/__init__.py b/src/python-for-android/recipes/idna/__init__.py deleted file mode 100644 index bb57bac..0000000 --- a/src/python-for-android/recipes/idna/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -from pythonforandroid.recipe import PythonRecipe - - -class IdnaRecipe(PythonRecipe): - name = 'idna' - version = '2.6' - url = 'https://github.com/kjd/idna/archive/v{version}.tar.gz' - - depends = [('python2', 'python3crystax'), 'setuptools'] - - call_hostpython_via_targetpython = False - - -recipe = IdnaRecipe() diff --git a/src/python-for-android/recipes/pycryptodome/__init__.py b/src/python-for-android/recipes/pycryptodome/__init__.py deleted file mode 100644 index 894e5db..0000000 --- a/src/python-for-android/recipes/pycryptodome/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -import os -from pythonforandroid.recipe import PythonRecipe - - -class PycryptodomeRecipe(PythonRecipe): - version = '3.4.6' - url = 'https://github.com/Legrandin/pycryptodome/archive/v{version}.tar.gz' - depends = [('python2', 'python3crystax'), 'setuptools', 'cffi'] - patches = ['setup.py.patch'] - - def get_recipe_env(self, arch=None, with_flags_in_cc=True): - env = super(PycryptodomeRecipe, self).get_recipe_env(arch, with_flags_in_cc) - env['LDFLAGS'] += ' -L{}'.format(os.path.join(self.ctx.bootstrap.build_dir, 'libs', arch.arch)) - return env - - -recipe = PycryptodomeRecipe() diff --git a/src/python-for-android/recipes/pycryptodome/setup.py.patch b/src/python-for-android/recipes/pycryptodome/setup.py.patch deleted file mode 100644 index 1273e61..0000000 --- a/src/python-for-android/recipes/pycryptodome/setup.py.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/setup.py b/setup.py -index b022d2c..ef302e4 100644 ---- a/setup.py -+++ b/setup.py -@@ -251,6 +251,22 @@ class PCTBuildExt (build_ext): - - aesni_mod_names = "Crypto.Cipher._raw_aesni", - -+ def finalize_options(self): -+ """ -+ Removes system include and library paths to avoid conflicts with cross-compilation. -+ """ -+ build_ext.finalize_options(self) -+ py_include = distutils.sysconfig.get_python_inc() -+ try: -+ self.include_dirs.remove(py_include) -+ except ValueError: -+ pass -+ libdir = distutils.sysconfig.get_config_var('LIBDIR') -+ try: -+ self.library_dirs.remove(libdir) -+ except ValueError: -+ pass -+ - def run(self): - build_ext.run(self) - diff --git a/src/python-for-android/recipes/pyethash/__init__.py b/src/python-for-android/recipes/pyethash/__init__.py deleted file mode 100644 index 6877ffe..0000000 --- a/src/python-for-android/recipes/pyethash/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -import os -from pythonforandroid.recipe import PythonRecipe - - -class PyethashRecipe(PythonRecipe): - version = '0.1.27' - url = 'https://pypi.python.org/packages/source/p/pyethash/pyethash-{version}.tar.gz' - depends = [('python2', 'python3crystax'), 'setuptools'] - - def get_recipe_env(self, arch=None, with_flags_in_cc=True): - env = super(PyethashRecipe, self).get_recipe_env(arch, with_flags_in_cc) - # CFLAGS may only be used to specify C compiler flags, for macro definitions use CPPFLAGS - env['CPPFLAGS'] = env['CFLAGS'] - env['CFLAGS'] = '' - # LDFLAGS may only be used to specify linker flags, for libraries use LIBS - env['LDFLAGS'] = env['LDFLAGS'].replace('-lm', '').replace('-lcrystax', '') - env['LDFLAGS'] += ' -L{}'.format(os.path.join(self.ctx.bootstrap.build_dir, 'libs', arch.arch)) - env['LIBS'] = ' -lm' - if self.ctx.ndk == 'crystax': - env['LIBS'] += ' -lcrystax -lpython{}m'.format(self.ctx.python_recipe.version[0:3]) - env['LDSHARED'] += env['LIBS'] - return env - - -recipe = PyethashRecipe() diff --git a/src/python-for-android/recipes/pysha3/__init__.py b/src/python-for-android/recipes/pysha3/__init__.py deleted file mode 100644 index c3120dd..0000000 --- a/src/python-for-android/recipes/pysha3/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -import os -from pythonforandroid.recipe import PythonRecipe - - -class Pysha3Recipe(PythonRecipe): - version = '1.0.2' - url = 'https://github.com/tiran/pysha3/archive/{version}.tar.gz' - depends = [('python2', 'python3crystax'), 'setuptools'] - - def get_recipe_env(self, arch=None, with_flags_in_cc=True): - env = super(Pysha3Recipe, self).get_recipe_env(arch, with_flags_in_cc) - # CFLAGS may only be used to specify C compiler flags, for macro definitions use CPPFLAGS - env['CPPFLAGS'] = env['CFLAGS'] - # LDFLAGS may only be used to specify linker flags, for libraries use LIBS - env['LDFLAGS'] = env['LDFLAGS'].replace('-lm', '').replace('-lcrystax', '') - env['LDFLAGS'] += ' -L{}'.format(os.path.join(self.ctx.bootstrap.build_dir, 'libs', arch.arch)) - env['LIBS'] = ' -lm' - if self.ctx.ndk == 'crystax': - env['LIBS'] += ' -lcrystax -lpython{}m'.format(self.ctx.python_recipe.version[0:3]) - env['LDSHARED'] += env['LIBS'] - return env - - -recipe = Pysha3Recipe() diff --git a/src/python-for-android/recipes/python3crystax/__init__.py b/src/python-for-android/recipes/python3crystax/__init__.py deleted file mode 100644 index feeec96..0000000 --- a/src/python-for-android/recipes/python3crystax/__init__.py +++ /dev/null @@ -1,257 +0,0 @@ -from pythonforandroid.recipe import TargetPythonRecipe -from pythonforandroid.toolchain import shprint -from pythonforandroid.logger import info, error -from pythonforandroid.util import ensure_dir, temp_directory -from os.path import exists, join -import os -import glob -import sh -from sh import Command - -# This is the content of opensslconf.h taken from -# ndkdir/build/tools/build-target-openssl.sh -OPENSSLCONF = """#if defined(__ARM_ARCH_5TE__) -#include "opensslconf_armeabi.h" -#elif defined(__ARM_ARCH_7A__) && !defined(__ARM_PCS_VFP) -#include "opensslconf_armeabi_v7a.h" -#elif defined(__ARM_ARCH_7A__) && defined(__ARM_PCS_VFP) -#include "opensslconf_armeabi_v7a_hard.h" -#elif defined(__aarch64__) -#include "opensslconf_arm64_v8a.h" -#elif defined(__i386__) -#include "opensslconf_x86.h" -#elif defined(__x86_64__) -#include "opensslconf_x86_64.h" -#elif defined(__mips__) && !defined(__mips64) -#include "opensslconf_mips.h" -#elif defined(__mips__) && defined(__mips64) -#include "opensslconf_mips64.h" -#else -#error "Unsupported ABI" -#endif -""" -LATEST_FULL_VERSION = { - '3.5': '3.5.1', - '3.6': '3.6.4' -} - -def realpath(fname): - """ - Own implementation of os.realpath which may be broken in some python versions - Returns: the absolute path o - - """ - - if not os.path.islink(fname): - return os.path.abspath(fname) - - abs_path = os.path.abspath(fname).split(os.sep)[:-1] - rel_path = os.readlink(fname) - - if os.path.abspath(rel_path) == rel_path: - return rel_path - - rel_path = rel_path.split(os.sep) - for folder in rel_path: - if folder == '..': - abs_path.pop() - else: - abs_path.append(folder) - return os.sep.join(abs_path) - -class Python3Recipe(TargetPythonRecipe): - version = '3.5' - url = '' - name = 'python3crystax' - - depends = ['hostpython3crystax'] - conflicts = ['python2', 'python3'] - - from_crystax = True - - def download_if_necessary(self): - if 'openssl' in self.ctx.recipe_build_order or self.version == '3.6': - full_version = LATEST_FULL_VERSION[self.version] - Python3Recipe.url = 'https://www.python.org/ftp/python/{0}.{1}.{2}/Python-{0}.{1}.{2}.tgz'.format(*full_version.split('.')) - super(Python3Recipe, self).download_if_necessary() - - def get_dir_name(self): - name = super(Python3Recipe, self).get_dir_name() - name += '-version{}'.format(self.version) - return name - - def copy_include_dir(self, source, target): - ensure_dir(target) - for fname in os.listdir(source): - sh.ln('-sf', realpath(join(source, fname)), join(target, fname)) - - def _patch_dev_defaults(self, fp, target_ver): - for line in fp: - if 'OPENSSL_VERSIONS=' in line: - versions = line.split('"')[1].split(' ') - if versions[0] == target_ver: - raise ValueError('Patch not needed') - - if target_ver in versions: - versions.remove(target_ver) - - versions.insert(0, target_ver) - - yield 'OPENSSL_VERSIONS="{}"\n'.format(' '.join(versions)) - else: - yield line - - def patch_dev_defaults(self, ssl_recipe): - def_fname = join(self.ctx.ndk_dir, 'build', 'tools', 'dev-defaults.sh') - try: - with open(def_fname, 'r') as fp: - s = ''.join(self._patch_dev_defaults(fp, - str(ssl_recipe.version))) - with open(def_fname, 'w') as fp: - fp.write(s) - - except ValueError: - pass - - def check_for_sslso(self, ssl_recipe, arch): - # type: (Recipe, str) - dynlib_dir = join(self.ctx.ndk_dir, 'sources', 'python', self.version, - 'libs', arch.arch, 'modules') - - if os.path.exists(join(dynlib_dir, '_ssl.so')): - return 10, 'Shared object exists in ndk' - - # find out why _ssl.so is missing - - source_dir = join(self.ctx.ndk_dir, 'sources', 'openssl', ssl_recipe.version) - if not os.path.exists(source_dir): - return 0, 'Openssl version not present' - - # these two path checks are lifted straight from: - # crystax-ndk/build/tools/build-target-python.sh - if not os.path.exists(join(source_dir, 'Android.mk')): - return 1.1, 'Android.mk is missing in openssl source' - - include_dir = join(source_dir, 'include','openssl') - if not os.path.exists(join(include_dir, 'opensslconf.h')): - return 1.2, 'Openssl include dir missing' - - under_scored_arch = arch.arch.replace('-', '_') - if not os.path.lexists(join(include_dir, - 'opensslconf_{}.h'.format(under_scored_arch))): - return 1.3, 'Opensslconf arch header missing from include' - - - - # lastly a check to see whether shared objects for the correct arch - # is present in the ndk - if not os.path.exists(join(source_dir, 'libs', arch.arch)): - return 2, 'Openssl libs for this arch is missing in ndk' - - return 5, 'Ready to recompile python' - - def find_Android_mk(self): - openssl_dir = join(self.ctx.ndk_dir, 'sources', 'openssl') - for version in os.listdir(openssl_dir): - mk_path = join(openssl_dir, version, 'Android.mk') - if os.path.exists(mk_path): - return mk_path - - def prebuild_arch(self, arch): - super(Python3Recipe, self).prebuild_arch(arch) - if self.version == '3.6': - Python3Recipe.patches = ['patch_python3.6.patch'] - build_dir = self.get_build_dir(arch.arch) - shprint(sh.ln, '-sf', - realpath(join(build_dir, 'Lib/site-packages/README.txt')), - join(build_dir, 'Lib/site-packages/README')) - python_build_files = ['android.mk', 'config.c', 'interpreter.c'] - ndk_build_tools_python_dir = join(self.ctx.ndk_dir, 'build', 'tools', 'build-target-python') - for python_build_file in python_build_files: - shprint(sh.cp, join(ndk_build_tools_python_dir, python_build_file+'.3.5'), - join(ndk_build_tools_python_dir, python_build_file+'.3.6')) - ndk_sources_python_dir = join(self.ctx.ndk_dir, 'sources', 'python') - if not os.path.exists(join(ndk_sources_python_dir, '3.6')): - os.mkdir(join(ndk_sources_python_dir, '3.6')) - sh.sed('s#3.5#3.6#', - join(ndk_sources_python_dir, '3.5/Android.mk'), - _out=join(ndk_sources_python_dir, '3.6/Android.mk')) - - def build_arch(self, arch): - # If openssl is needed we may have to recompile cPython to get the - # ssl.py module working properly - if self.from_crystax and 'openssl' in self.ctx.recipe_build_order: - info('Openssl and crystax-python combination may require ' - 'recompilation of python...') - ssl_recipe = self.get_recipe('openssl', self.ctx) - stage, msg = self.check_for_sslso(ssl_recipe, arch) - stage = 0 if stage < 5 else stage - info(msg) - openssl_build_dir = ssl_recipe.get_build_dir(arch.arch) - openssl_ndk_dir = join(self.ctx.ndk_dir, 'sources', 'openssl', - ssl_recipe.version) - - if stage < 2: - info('Copying openssl headers and Android.mk to ndk') - ensure_dir(openssl_ndk_dir) - if stage < 1.2: - # copy include folder and Android.mk to ndk - mk_path = self.find_Android_mk() - if mk_path is None: - raise IOError('Android.mk file could not be found in ' - 'any versions in ndk->sources->openssl') - shprint(sh.cp, mk_path, openssl_ndk_dir) - - include_dir = join(openssl_build_dir, 'include') - if stage < 1.3: - ndk_include_dir = join(openssl_ndk_dir, 'include', 'openssl') - self.copy_include_dir(join(include_dir, 'openssl'), ndk_include_dir) - - target_conf = join(openssl_ndk_dir, 'include', 'openssl', - 'opensslconf.h') - shprint(sh.rm, '-f', target_conf) - # overwrite opensslconf.h - with open(target_conf, 'w') as fp: - fp.write(OPENSSLCONF) - - if stage < 1.4: - # move current conf to arch specific conf in ndk - under_scored_arch = arch.arch.replace('-', '_') - shprint(sh.ln, '-sf', - realpath(join(include_dir, 'openssl', 'opensslconf.h')), - join(openssl_ndk_dir, 'include', 'openssl', - 'opensslconf_{}.h'.format(under_scored_arch)) - ) - - if stage < 3: - info('Copying openssl libs to ndk') - arch_ndk_lib = join(openssl_ndk_dir, 'libs', arch.arch) - ensure_dir(arch_ndk_lib) - shprint(sh.ln, '-sf', - realpath(join(openssl_build_dir, 'libcrypto{}.so'.format(ssl_recipe.version))), - join(openssl_build_dir, 'libcrypto.so')) - shprint(sh.ln, '-sf', - realpath(join(openssl_build_dir, 'libssl{}.so'.format(ssl_recipe.version))), - join(openssl_build_dir, 'libssl.so')) - libs = ['libcrypto.a', 'libcrypto.so', 'libssl.a', 'libssl.so'] - cmd = [join(openssl_build_dir, lib) for lib in libs] + [arch_ndk_lib] - shprint(sh.cp, '-f', *cmd) - - if stage < 10: - info('Recompiling python-crystax') - self.patch_dev_defaults(ssl_recipe) - build_script = join(self.ctx.ndk_dir, 'build', 'tools', - 'build-target-python.sh') - - shprint(Command(build_script), - '--ndk-dir={}'.format(self.ctx.ndk_dir), - '--abis={}'.format(arch.arch), - '-j5', '--verbose', - self.get_build_dir(arch.arch)) - - info('Extracting CrystaX python3 from NDK package') - dirn = self.ctx.get_python_install_dir() - ensure_dir(dirn) - self.ctx.hostpython = 'python{}'.format(self.version) - -recipe = Python3Recipe() diff --git a/src/python-for-android/recipes/python3crystax/patch_python3.6.patch b/src/python-for-android/recipes/python3crystax/patch_python3.6.patch deleted file mode 100644 index 4402d1b..0000000 --- a/src/python-for-android/recipes/python3crystax/patch_python3.6.patch +++ /dev/null @@ -1,89 +0,0 @@ -diff --git a/Modules/expat/xmlparse.c b/Modules/expat/xmlparse.c ---- a/Modules/expat/xmlparse.c -+++ b/Modules/expat/xmlparse.c -@@ -84,6 +84,8 @@ - # define LOAD_LIBRARY_SEARCH_SYSTEM32 0x00000800 - #endif - -+#define XML_POOR_ENTROPY 1 -+ - #if !defined(HAVE_GETRANDOM) && !defined(HAVE_SYSCALL_GETRANDOM) \ - && !defined(HAVE_ARC4RANDOM_BUF) && !defined(HAVE_ARC4RANDOM) \ - && !defined(XML_DEV_URANDOM) \ -diff --git a/Modules/getpath.c b/Modules/getpath.c ---- a/Modules/getpath.c -+++ b/Modules/getpath.c -@@ -101,8 +101,35 @@ - #endif - - --#if !defined(PREFIX) || !defined(EXEC_PREFIX) || !defined(VERSION) || !defined(VPATH) --#error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" -+ /* These variables were set this way in old versions of Python, but -+ changed somewhere between 3.5.0 and 3.5.3. Here we just force -+ the old way again. A better solution would be to work out where -+ they should be defined, and make the CrystaX build scripts do -+ so. */ -+ -+/* #if !defined(PREFIX) || !defined(EXEC_PREFIX) || !defined(VERSION) || !defined(VPATH) */ -+/* #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" */ -+/* #endif */ -+ -+#ifndef VERSION -+#define VERSION "2.1" -+#endif -+ -+#ifndef VPATH -+#define VPATH "." -+#endif -+ -+#ifndef PREFIX -+# define PREFIX "/usr/local" -+#endif -+ -+#ifndef EXEC_PREFIX -+#define EXEC_PREFIX PREFIX -+#endif -+ -+#ifndef PYTHONPATH -+#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ -+ EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" - #endif - - #ifndef LANDMARK -diff --git a/Modules/timemodule.c b/Modules/timemodule.c ---- a/Modules/timemodule.c -+++ b/Modules/timemodule.c -@@ -358,18 +358,20 @@ time_gmtime(PyObject *self, PyObject *args) - #endif - } - --#ifndef HAVE_TIMEGM --static time_t --timegm(struct tm *p) --{ -- /* XXX: the following implementation will not work for tm_year < 1970. -- but it is likely that platforms that don't have timegm do not support -- negative timestamps anyways. */ -- return p->tm_sec + p->tm_min*60 + p->tm_hour*3600 + p->tm_yday*86400 + -- (p->tm_year-70)*31536000 + ((p->tm_year-69)/4)*86400 - -- ((p->tm_year-1)/100)*86400 + ((p->tm_year+299)/400)*86400; --} --#endif -+/* In the Android build, HAVE_TIMEGM apparently should be defined but isn't. A better fix would be to work out why and fix that. */ -+ -+/* #ifndef HAVE_TIMEGM */ -+/* static time_t */ -+/* timegm(struct tm *p) */ -+/* { */ -+/* /\* XXX: the following implementation will not work for tm_year < 1970. */ -+/* but it is likely that platforms that don't have timegm do not support */ -+/* negative timestamps anyways. *\/ */ -+/* return p->tm_sec + p->tm_min*60 + p->tm_hour*3600 + p->tm_yday*86400 + */ -+/* (p->tm_year-70)*31536000 + ((p->tm_year-69)/4)*86400 - */ -+/* ((p->tm_year-1)/100)*86400 + ((p->tm_year+299)/400)*86400; */ -+/* } */ -+/* #endif */ - - PyDoc_STRVAR(gmtime_doc, - "gmtime([seconds]) -> (tm_year, tm_mon, tm_mday, tm_hour, tm_min,\n\ diff --git a/src/python-for-android/recipes/pyyaml/__init__.py b/src/python-for-android/recipes/pyyaml/__init__.py deleted file mode 100644 index 4ad8279..0000000 --- a/src/python-for-android/recipes/pyyaml/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -from pythonforandroid.recipe import PythonRecipe - - -class PyYamlRecipe(PythonRecipe): - version = "3.12" - url = 'http://pyyaml.org/download/pyyaml/PyYAML-{version}.tar.gz' - depends = [('python2', 'python3crystax'), "setuptools"] - site_packages_name = 'pyyaml' - - -recipe = PyYamlRecipe() diff --git a/src/python-for-android/recipes/requests/__init__.py b/src/python-for-android/recipes/requests/__init__.py deleted file mode 100644 index 3e0ec66..0000000 --- a/src/python-for-android/recipes/requests/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -from pythonforandroid.recipe import PythonRecipe - -class RequestsRecipe(PythonRecipe): - version = '2.13.0' - url = 'https://github.com/kennethreitz/requests/archive/v{version}.tar.gz' - depends = [('hostpython2', 'hostpython3crystax'), 'setuptools'] - site_packages_name = 'requests' - call_hostpython_via_targetpython = False - -recipe = RequestsRecipe() diff --git a/src/python-for-android/recipes/scrypt/__init__.py b/src/python-for-android/recipes/scrypt/__init__.py deleted file mode 100644 index 0058639..0000000 --- a/src/python-for-android/recipes/scrypt/__init__.py +++ /dev/null @@ -1,35 +0,0 @@ -import os -from pythonforandroid.recipe import CythonRecipe - - -class ScryptRecipe(CythonRecipe): - - version = '0.8.6' - url = 'https://bitbucket.org/mhallin/py-scrypt/get/v{version}.zip' - depends = [('python2', 'python3crystax'), 'setuptools', 'openssl'] - call_hostpython_via_targetpython = False - patches = ["remove_librt.patch"] - - def get_recipe_env(self, arch, with_flags_in_cc=True): - """ - Adds openssl recipe to include and library path. - """ - env = super(ScryptRecipe, self).get_recipe_env(arch, with_flags_in_cc) - openssl_build_dir = self.get_recipe( - 'openssl', self.ctx).get_build_dir(arch.arch) - env['CFLAGS'] += ' -I{}'.format(os.path.join(openssl_build_dir, 'include')) - env['LDFLAGS'] += ' -L{}'.format( - self.ctx.get_libs_dir(arch.arch) + - '-L{}'.format(self.ctx.libs_dir)) + ' -L{}'.format( - openssl_build_dir) - # required additional library and path for Crystax - if self.ctx.ndk == 'crystax': - # only keeps major.minor (discards patch) - python_version = self.ctx.python_recipe.version[0:3] - ndk_dir_python = os.path.join(self.ctx.ndk_dir, 'sources/python/', python_version) - env['LDFLAGS'] += ' -L{}'.format(os.path.join(ndk_dir_python, 'libs', arch.arch)) - env['LDFLAGS'] += ' -lpython{}m'.format(python_version) - return env - - -recipe = ScryptRecipe() diff --git a/src/python-for-android/recipes/scrypt/remove_librt.patch b/src/python-for-android/recipes/scrypt/remove_librt.patch deleted file mode 100644 index 270bab2..0000000 --- a/src/python-for-android/recipes/scrypt/remove_librt.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/setup.py 2018-05-06 23:25:08.757522119 +0200 -+++ b/setup.py 2018-05-06 23:25:30.269797365 +0200 -@@ -15,7 +15,6 @@ - - if sys.platform.startswith('linux'): - define_macros = [('HAVE_CLOCK_GETTIME', '1'), -- ('HAVE_LIBRT', '1'), - ('HAVE_POSIX_MEMALIGN', '1'), - ('HAVE_STRUCT_SYSINFO', '1'), - ('HAVE_STRUCT_SYSINFO_MEM_UNIT', '1'), -@@ -23,8 +22,7 @@ - ('HAVE_SYSINFO', '1'), - ('HAVE_SYS_SYSINFO_H', '1'), - ('_FILE_OFFSET_BITS', '64')] -- libraries = ['crypto', 'rt'] -- includes = ['/usr/local/include', '/usr/include'] -+ libraries = ['crypto'] - CFLAGS.append('-O2') - elif sys.platform.startswith('win32'): - define_macros = [('inline', '__inline')] diff --git a/src/python-for-android/recipes/secp256k1/__init__.py b/src/python-for-android/recipes/secp256k1/__init__.py deleted file mode 100644 index 5b74c86..0000000 --- a/src/python-for-android/recipes/secp256k1/__init__.py +++ /dev/null @@ -1,39 +0,0 @@ -import os -from pythonforandroid.recipe import PythonRecipe - - -class Secp256k1Recipe(PythonRecipe): - - url = 'https://github.com/ludbb/secp256k1-py/archive/master.zip' - - call_hostpython_via_targetpython = False - - depends = [ - 'openssl', ('hostpython2', 'hostpython3crystax'), - ('python2', 'python3crystax'), 'setuptools', - 'libffi', 'cffi', 'libsecp256k1'] - - patches = [ - "cross_compile.patch", "drop_setup_requires.patch", - "pkg-config.patch", "find_lib.patch", "no-download.patch"] - - def get_recipe_env(self, arch=None, with_flags_in_cc=True): - env = super(Secp256k1Recipe, self).get_recipe_env(arch, with_flags_in_cc) - libsecp256k1 = self.get_recipe('libsecp256k1', self.ctx) - libsecp256k1_dir = libsecp256k1.get_build_dir(arch.arch) - env['LDFLAGS'] += ' -L{}'.format(libsecp256k1_dir) - env['CFLAGS'] = ' -I' + os.path.join(libsecp256k1_dir, 'include') - # only keeps major.minor (discards patch) - python_version = self.ctx.python_recipe.version[0:3] - # required additional library and path for Crystax - if self.ctx.ndk == 'crystax': - ndk_dir_python = os.path.join(self.ctx.ndk_dir, 'sources/python/', python_version) - env['LDFLAGS'] += ' -L{}'.format(os.path.join(ndk_dir_python, 'libs', arch.arch)) - env['LDFLAGS'] += ' -lpython{}m'.format(python_version) - else: - env['LDFLAGS'] += " -lpython{}".format(python_version) - env['LDFLAGS'] += " -lsecp256k1" - return env - - -recipe = Secp256k1Recipe() diff --git a/src/python-for-android/recipes/secp256k1/cross_compile.patch b/src/python-for-android/recipes/secp256k1/cross_compile.patch deleted file mode 100644 index bfef228..0000000 --- a/src/python-for-android/recipes/secp256k1/cross_compile.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/setup.py b/setup.py -index bba4bce..b86b369 100644 ---- a/setup.py -+++ b/setup.py -@@ -191,6 +192,7 @@ class build_clib(_build_clib): - "--disable-dependency-tracking", - "--with-pic", - "--enable-module-recovery", -+ "--host=%s" % os.environ['TOOLCHAIN_PREFIX'], - "--prefix", - os.path.abspath(self.build_clib), - ] diff --git a/src/python-for-android/recipes/secp256k1/drop_setup_requires.patch b/src/python-for-android/recipes/secp256k1/drop_setup_requires.patch deleted file mode 100644 index 3be0293..0000000 --- a/src/python-for-android/recipes/secp256k1/drop_setup_requires.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/setup.py b/setup.py -index bba4bce..bfffbbc 100644 ---- a/setup.py -+++ b/setup.py -@@ -263,7 +263,6 @@ setup( - author_email='lud@tutanota.com', - license='MIT', - -- setup_requires=['cffi>=1.3.0', 'pytest-runner==2.6.2'], - install_requires=['cffi>=1.3.0'], - tests_require=['pytest==2.8.7'], - diff --git a/src/python-for-android/recipes/secp256k1/find_lib.patch b/src/python-for-android/recipes/secp256k1/find_lib.patch deleted file mode 100644 index 87997d5..0000000 --- a/src/python-for-android/recipes/secp256k1/find_lib.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/setup_support.py b/setup_support.py -index 68a2a7f..b84f420 100644 ---- a/setup_support.py -+++ b/setup_support.py -@@ -68,6 +68,8 @@ def build_flags(library, type_, path): - - - def _find_lib(): -+ # we're picking up the recipe one -+ return True - from cffi import FFI - ffi = FFI() - try: diff --git a/src/python-for-android/recipes/secp256k1/no-download.patch b/src/python-for-android/recipes/secp256k1/no-download.patch deleted file mode 100644 index e905a39..0000000 --- a/src/python-for-android/recipes/secp256k1/no-download.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/setup.py b/setup.py -index bba4bce..5ea0228 100644 ---- a/setup.py -+++ b/setup.py -@@ -55,6 +55,8 @@ except OSError: - - - def download_library(command): -+ # we will use the custom libsecp256k1 recipe -+ return - if command.dry_run: - return - libdir = absolute("libsecp256k1") diff --git a/src/python-for-android/recipes/secp256k1/pkg-config.patch b/src/python-for-android/recipes/secp256k1/pkg-config.patch deleted file mode 100644 index bb1e344..0000000 --- a/src/python-for-android/recipes/secp256k1/pkg-config.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff --git a/setup.py b/setup.py -index bba4bce..609481c 100644 ---- a/setup.py -+++ b/setup.py -@@ -48,10 +48,7 @@ if [int(i) for i in setuptools_version.split('.')] < [3, 3]: - try: - subprocess.check_call(['pkg-config', '--version']) - except OSError: -- raise SystemExit( -- "'pkg-config' is required to install this package. " -- "Please see the README for details." -- ) -+ pass - - - def download_library(command): -diff --git a/setup_support.py b/setup_support.py -index 68a2a7f..ccbafac 100644 ---- a/setup_support.py -+++ b/setup_support.py -@@ -40,6 +40,7 @@ def absolute(*paths): - - def build_flags(library, type_, path): - """Return separated build flags from pkg-config output""" -+ return [] - - pkg_config_path = [path] - if "PKG_CONFIG_PATH" in os.environ: diff --git a/src/python-for-android/recipes/web3/__init__.py b/src/python-for-android/recipes/web3/__init__.py deleted file mode 100644 index bb1bc39..0000000 --- a/src/python-for-android/recipes/web3/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -from pythonforandroid.recipe import PythonRecipe - - -class Web3Recipe(PythonRecipe): - version = '4.8.1' - url = 'https://github.com/ethereum/web3.py/archive/v{version}.tar.gz' - depends = [('python2', 'python3crystax'), 'setuptools'] - patches = ['setup.patch'] - - -recipe = Web3Recipe() diff --git a/src/python-for-android/recipes/web3/setup.patch b/src/python-for-android/recipes/web3/setup.patch deleted file mode 100644 index a9c0130..0000000 --- a/src/python-for-android/recipes/web3/setup.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/setup.py b/setup.py -index fc78289..16e422b 100644 ---- a/setup.py -+++ b/setup.py -@@ -62,7 +62,6 @@ setup( - # *IMPORTANT*: Don't manually change the version here. Use the 'bumpversion' utility. - version='4.7.1', - description="""Web3.py""", -- long_description_markdown_filename='README.md', - author='Piper Merriam', - author_email='pipermerriam@gmail.com', - url='https://github.com/ethereum/web3.py', -@@ -80,8 +79,6 @@ setup( - "websockets>=6.0.0,<7.0.0", - "pypiwin32>=223;platform_system=='Windows'", - ], -- setup_requires=['setuptools-markdown'], -- python_requires='>=3.5.3,<4', - extras_require=extras_require, - py_modules=['web3', 'ens'], - license="MIT",