From 6bb128e38a630256853b9fd2c6e694f14862f3c1 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Sat, 30 Mar 2019 23:51:38 +0100 Subject: [PATCH] clean up python sdk requirements --- buildozer.spec.sample | 2 +- buildozer.spec.travis | 2 +- buildozer.spec.vagrant | 2 +- recipes/cffi/__init__.py | 2 +- recipes/cryptography/__init__.py | 3 +- recipes/cryptography/force-urandom.patch | 11 ------ recipes/incremental/__init__.py | 16 --------- recipes/ipaddress/__init__.py | 12 ------- recipes/pyasn1/__init__.py | 11 ------ recipes/pyopenssl/__init__.py | 13 ------- recipes/requests/__init__.py | 12 ------- recipes/twisted/__init__.py | 43 ------------------------ recipes/zope_interface/__init__.py | 21 ------------ recipes/zope_interface/no_tests.patch | 13 ------- recipes/zope_interface/setuptools.patch | 10 ------ 15 files changed, 5 insertions(+), 168 deletions(-) delete mode 100644 recipes/cryptography/force-urandom.patch delete mode 100644 recipes/incremental/__init__.py delete mode 100644 recipes/ipaddress/__init__.py delete mode 100644 recipes/pyasn1/__init__.py delete mode 100644 recipes/pyopenssl/__init__.py delete mode 100644 recipes/requests/__init__.py delete mode 100644 recipes/twisted/__init__.py delete mode 100644 recipes/zope_interface/__init__.py delete mode 100644 recipes/zope_interface/no_tests.patch delete mode 100644 recipes/zope_interface/setuptools.patch diff --git a/buildozer.spec.sample b/buildozer.spec.sample index 09778b3..75ae820 100644 --- a/buildozer.spec.sample +++ b/buildozer.spec.sample @@ -36,7 +36,7 @@ version.filename = %(source.dir)s/main.py # (list) Application requirements # comma seperated e.g. requirements = sqlite3,kivy -requirements = python3crystax, openssl, sqlite3, hostpython3crystax, android, distro, pyjnius, certifi==2018.4.16, constantly, incremental, appdirs==1.4.3, argparse==1.2.1, docopt, base58==1.0.0, colorama==0.3.7, dnspython==1.12.0, ecdsa==0.13, envparse, jsonrpclib==0.1.7, jsonschema==2.5.1, pbkdf2, pyyaml, qrcode==5.2.2, requests, seccure==0.3.1.3, attrs==18.1.0, pyasn1, pyasn1-modules, service_identity==16.0.0, six==1.9.0, txJSON-RPC, zope.interface==4.3.3, protobuf==3.6.1, keyring==10.4.0, txupnp, git+https://github.com/lbryio/lbryschema.git#egg=lbryschema, git+https://github.com/lbryio/lbry.git@v0.34.0#egg=lbrynet, git+https://github.com/lbryio/aioupnp.git#egg=aioupnp, asn1crypto, treq==17.8.0, funcsigs, mock, pbr, pyopenssl, twisted, idna, Automat, hyperlink, PyHamcrest, netifaces, cryptography, aiohttp==3.5.4, multidict==4.5.2, idna_ssl==1.1.0, typing_extensions==3.6.5, yarl, chardet==3.0.4, async_timeout==3.0.1, aiorpcX==0.9.0, git+https://github.com/lbryio/torba#egg=torba, coincurve +requirements = python3crystax, openssl, sqlite3, hostpython3crystax, android, distro==1.4.0, pyjnius, certifi==2018.11.29, appdirs==1.4.3, docopt==0.6.2, base58==1.0.0, colorama==0.3.7, ecdsa==0.13, jsonschema==2.6.0, pbkdf2==1.3, pyyaml, protobuf==3.6.1, keyring==10.4.0, git+https://github.com/lbryio/lbry.git@v0.34.0#egg=lbrynet, git+https://github.com/lbryio/aioupnp.git#egg=aioupnp, asn1crypto, mock, netifaces, cryptography, aiohttp==3.5.4, multidict==4.5.2, yarl==1.3.0, chardet==3.0.4, async_timeout==3.0.1, git+https://github.com/lbryio/torba#egg=torba, coincurve, msgpack==0.6.1, six, attrs==18.2.0, pylru # (str) Custom source folders for requirements # Sets custom source for any requirements with recipes diff --git a/buildozer.spec.travis b/buildozer.spec.travis index 09778b3..75ae820 100644 --- a/buildozer.spec.travis +++ b/buildozer.spec.travis @@ -36,7 +36,7 @@ version.filename = %(source.dir)s/main.py # (list) Application requirements # comma seperated e.g. requirements = sqlite3,kivy -requirements = python3crystax, openssl, sqlite3, hostpython3crystax, android, distro, pyjnius, certifi==2018.4.16, constantly, incremental, appdirs==1.4.3, argparse==1.2.1, docopt, base58==1.0.0, colorama==0.3.7, dnspython==1.12.0, ecdsa==0.13, envparse, jsonrpclib==0.1.7, jsonschema==2.5.1, pbkdf2, pyyaml, qrcode==5.2.2, requests, seccure==0.3.1.3, attrs==18.1.0, pyasn1, pyasn1-modules, service_identity==16.0.0, six==1.9.0, txJSON-RPC, zope.interface==4.3.3, protobuf==3.6.1, keyring==10.4.0, txupnp, git+https://github.com/lbryio/lbryschema.git#egg=lbryschema, git+https://github.com/lbryio/lbry.git@v0.34.0#egg=lbrynet, git+https://github.com/lbryio/aioupnp.git#egg=aioupnp, asn1crypto, treq==17.8.0, funcsigs, mock, pbr, pyopenssl, twisted, idna, Automat, hyperlink, PyHamcrest, netifaces, cryptography, aiohttp==3.5.4, multidict==4.5.2, idna_ssl==1.1.0, typing_extensions==3.6.5, yarl, chardet==3.0.4, async_timeout==3.0.1, aiorpcX==0.9.0, git+https://github.com/lbryio/torba#egg=torba, coincurve +requirements = python3crystax, openssl, sqlite3, hostpython3crystax, android, distro==1.4.0, pyjnius, certifi==2018.11.29, appdirs==1.4.3, docopt==0.6.2, base58==1.0.0, colorama==0.3.7, ecdsa==0.13, jsonschema==2.6.0, pbkdf2==1.3, pyyaml, protobuf==3.6.1, keyring==10.4.0, git+https://github.com/lbryio/lbry.git@v0.34.0#egg=lbrynet, git+https://github.com/lbryio/aioupnp.git#egg=aioupnp, asn1crypto, mock, netifaces, cryptography, aiohttp==3.5.4, multidict==4.5.2, yarl==1.3.0, chardet==3.0.4, async_timeout==3.0.1, git+https://github.com/lbryio/torba#egg=torba, coincurve, msgpack==0.6.1, six, attrs==18.2.0, pylru # (str) Custom source folders for requirements # Sets custom source for any requirements with recipes diff --git a/buildozer.spec.vagrant b/buildozer.spec.vagrant index 09778b3..75ae820 100644 --- a/buildozer.spec.vagrant +++ b/buildozer.spec.vagrant @@ -36,7 +36,7 @@ version.filename = %(source.dir)s/main.py # (list) Application requirements # comma seperated e.g. requirements = sqlite3,kivy -requirements = python3crystax, openssl, sqlite3, hostpython3crystax, android, distro, pyjnius, certifi==2018.4.16, constantly, incremental, appdirs==1.4.3, argparse==1.2.1, docopt, base58==1.0.0, colorama==0.3.7, dnspython==1.12.0, ecdsa==0.13, envparse, jsonrpclib==0.1.7, jsonschema==2.5.1, pbkdf2, pyyaml, qrcode==5.2.2, requests, seccure==0.3.1.3, attrs==18.1.0, pyasn1, pyasn1-modules, service_identity==16.0.0, six==1.9.0, txJSON-RPC, zope.interface==4.3.3, protobuf==3.6.1, keyring==10.4.0, txupnp, git+https://github.com/lbryio/lbryschema.git#egg=lbryschema, git+https://github.com/lbryio/lbry.git@v0.34.0#egg=lbrynet, git+https://github.com/lbryio/aioupnp.git#egg=aioupnp, asn1crypto, treq==17.8.0, funcsigs, mock, pbr, pyopenssl, twisted, idna, Automat, hyperlink, PyHamcrest, netifaces, cryptography, aiohttp==3.5.4, multidict==4.5.2, idna_ssl==1.1.0, typing_extensions==3.6.5, yarl, chardet==3.0.4, async_timeout==3.0.1, aiorpcX==0.9.0, git+https://github.com/lbryio/torba#egg=torba, coincurve +requirements = python3crystax, openssl, sqlite3, hostpython3crystax, android, distro==1.4.0, pyjnius, certifi==2018.11.29, appdirs==1.4.3, docopt==0.6.2, base58==1.0.0, colorama==0.3.7, ecdsa==0.13, jsonschema==2.6.0, pbkdf2==1.3, pyyaml, protobuf==3.6.1, keyring==10.4.0, git+https://github.com/lbryio/lbry.git@v0.34.0#egg=lbrynet, git+https://github.com/lbryio/aioupnp.git#egg=aioupnp, asn1crypto, mock, netifaces, cryptography, aiohttp==3.5.4, multidict==4.5.2, yarl==1.3.0, chardet==3.0.4, async_timeout==3.0.1, git+https://github.com/lbryio/torba#egg=torba, coincurve, msgpack==0.6.1, six, attrs==18.2.0, pylru # (str) Custom source folders for requirements # Sets custom source for any requirements with recipes diff --git a/recipes/cffi/__init__.py b/recipes/cffi/__init__.py index 2b3790d..ed1f76b 100644 --- a/recipes/cffi/__init__.py +++ b/recipes/cffi/__init__.py @@ -5,7 +5,7 @@ from pythonforandroid.recipe import CompiledComponentsPythonRecipe class CffiRecipe(CompiledComponentsPythonRecipe): name = 'cffi' - version = '1.11.5' + version = '1.12.1' url = 'https://pypi.python.org/packages/source/c/cffi/cffi-{version}.tar.gz' depends = [('python2', 'python3crystax'), 'setuptools', 'pycparser', 'libffi'] diff --git a/recipes/cryptography/__init__.py b/recipes/cryptography/__init__.py index c69ad61..a286ead 100644 --- a/recipes/cryptography/__init__.py +++ b/recipes/cryptography/__init__.py @@ -4,11 +4,10 @@ import os class CryptographyRecipe(CompiledComponentsPythonRecipe): name = 'cryptography' - version = '2.3.1' + version = '2.5' url = 'https://github.com/pyca/cryptography/archive/{version}.tar.gz' depends = [('python2', 'python3crystax'), 'openssl', 'idna', 'pyasn1', 'six', 'setuptools', 'ipaddress', 'cffi'] call_hostpython_via_targetpython = False - patches = ['force-urandom.patch'] def get_recipe_env(self, arch): env = super(CryptographyRecipe, self).get_recipe_env(arch) diff --git a/recipes/cryptography/force-urandom.patch b/recipes/cryptography/force-urandom.patch deleted file mode 100644 index dceeab3..0000000 --- a/recipes/cryptography/force-urandom.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- x/src/_cffi_src/openssl/src/osrandom_engine.h 2018-09-25 23:19:08.303397032 +0100 -+++ y/src/_cffi_src/openssl/src/osrandom_engine.h 2018-09-25 23:21:45.945980819 +0100 -@@ -42,7 +42,7 @@ - #define CRYPTOGRAPHY_OSRANDOM_ENGINE CRYPTOGRAPHY_OSRANDOM_ENGINE_GETENTROPY - #elif defined(__linux__) && defined(SYS_getrandom) - /* Linux 3.4.17+ */ -- #define CRYPTOGRAPHY_OSRANDOM_ENGINE CRYPTOGRAPHY_OSRANDOM_ENGINE_GETRANDOM -+ #define CRYPTOGRAPHY_OSRANDOM_ENGINE CRYPTOGRAPHY_OSRANDOM_ENGINE_DEV_URANDOM // force /dev/urandom - #else - /* Keep this as last entry, fall back to /dev/urandom */ - #define CRYPTOGRAPHY_OSRANDOM_ENGINE CRYPTOGRAPHY_OSRANDOM_ENGINE_DEV_URANDOM diff --git a/recipes/incremental/__init__.py b/recipes/incremental/__init__.py deleted file mode 100644 index f2a93a6..0000000 --- a/recipes/incremental/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ - -from pythonforandroid.recipe import PythonRecipe -from pythonforandroid.toolchain import shprint -import sh - - -class IncrementalRecipe(PythonRecipe): - version = '17.5.0' - url = 'https://pypi.python.org/packages/8f/26/02c4016aa95f45479eea37c90c34f8fab6775732ae62587a874b619ca097/incremental-{version}.tar.gz' - - depends = [('python2', 'python3crystax'), 'setuptools'] - - call_hostpython_via_targetpython = False - install_in_hostpython = True - -recipe = IncrementalRecipe() diff --git a/recipes/ipaddress/__init__.py b/recipes/ipaddress/__init__.py deleted file mode 100644 index 509ecc5..0000000 --- a/recipes/ipaddress/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -from pythonforandroid.recipe import PythonRecipe - - -class IpaddressRecipe(PythonRecipe): - name = 'ipaddress' - version = '1.0.16' - url = 'https://pypi.python.org/packages/source/i/ipaddress/ipaddress-{version}.tar.gz' - - depends = [('python2', 'python3crystax')] - - -recipe = IpaddressRecipe() \ No newline at end of file diff --git a/recipes/pyasn1/__init__.py b/recipes/pyasn1/__init__.py deleted file mode 100644 index b8e0d4f..0000000 --- a/recipes/pyasn1/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ - -from pythonforandroid.recipe import PythonRecipe - - -class PyASN1Recipe(PythonRecipe): - version = '0.4.2' - url = 'https://pypi.python.org/packages/source/p/pyasn1/pyasn1-{version}.tar.gz' - depends = [('python2', 'python3crystax')] - - -recipe = PyASN1Recipe() diff --git a/recipes/pyopenssl/__init__.py b/recipes/pyopenssl/__init__.py deleted file mode 100644 index c328470..0000000 --- a/recipes/pyopenssl/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -from pythonforandroid.recipe import PythonRecipe - - -class PyOpenSSLRecipe(PythonRecipe): - version = '17.4.0' - url = 'https://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-{version}.tar.gz' - depends = [('python2', 'python3crystax'), 'openssl', 'setuptools'] - site_packages_name = 'OpenSSL' - - call_hostpython_via_targetpython = False - - -recipe = PyOpenSSLRecipe() \ No newline at end of file diff --git a/recipes/requests/__init__.py b/recipes/requests/__init__.py deleted file mode 100644 index f7a0290..0000000 --- a/recipes/requests/__init__.py +++ /dev/null @@ -1,12 +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() \ No newline at end of file diff --git a/recipes/twisted/__init__.py b/recipes/twisted/__init__.py deleted file mode 100644 index 702fe35..0000000 --- a/recipes/twisted/__init__.py +++ /dev/null @@ -1,43 +0,0 @@ - -import glob -from pythonforandroid.recipe import CythonRecipe, Recipe -from pythonforandroid.toolchain import ( - current_directory, - info, - shprint, -) -from os.path import join -import sh - - -class TwistedRecipe(CythonRecipe): - version = '18.7.0' - url = 'https://github.com/twisted/twisted/archive/twisted-{version}.tar.gz' - - depends = ['setuptools', 'zope_interface', 'incremental', 'constantly'] - - call_hostpython_via_targetpython = False - install_in_hostpython = True - - def prebuild_arch(self, arch): - super(TwistedRecipe, self).prebuild_arch(arch) - # TODO Need to whitelist tty.pyo and termios.so here - print('Should remove twisted tests etc. here, but skipping for now') - - def get_recipe_env(self, arch): - env = super(TwistedRecipe, self).get_recipe_env(arch) - - # TODO: Move this and others to base Recipe class for Cython and CompiledComponent recipes - target_python = Recipe.get_recipe('python3crystax', self.ctx).get_build_dir(arch.arch) - env['PYTHON_ROOT'] = join(target_python, 'python-install') - env['CFLAGS'] += ' -I' + env['PYTHON_ROOT'] + '/include/python3.7' - env['LDFLAGS'] += ' -L' + env['PYTHON_ROOT'] + '/lib' + ' -lpython3.7m' - - # We add BUILDLIB_PATH to PYTHONPATH so twisted can find _io.so - env['PYTHONPATH'] = ':'.join([ - self.ctx.get_site_packages_dir(), - env['BUILDLIB_PATH'], - ]) - return env - -recipe = TwistedRecipe() diff --git a/recipes/zope_interface/__init__.py b/recipes/zope_interface/__init__.py deleted file mode 100644 index 3091f2a..0000000 --- a/recipes/zope_interface/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -from pythonforandroid.recipe import PythonRecipe -from pythonforandroid.toolchain import current_directory -import sh - - -class ZopeInterfaceRecipe(PythonRecipe): - name = 'zope_interface' - version = '4.2.0' - url = 'https://pypi.python.org/packages/source/z/zope.interface/zope.interface-{version}.tar.gz' - site_packages_name = 'zope.interface' - - depends = [('python2', 'python3crystax')] - patches = ['no_tests.patch'] - - def prebuild_arch(self, arch): - super(ZopeInterfaceRecipe, self).prebuild_arch(arch) - with current_directory(self.get_build_dir(arch.arch)): - sh.rm('-rf', 'src/zope/interface/tests', 'src/zope/interface/common/tests') - - -recipe = ZopeInterfaceRecipe() diff --git a/recipes/zope_interface/no_tests.patch b/recipes/zope_interface/no_tests.patch deleted file mode 100644 index 289c850..0000000 --- a/recipes/zope_interface/no_tests.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/setup.py 2016-06-10 14:56:35.000000000 +0100 -+++ b/setup.py 2018-09-29 09:28:25.676203522 +0100 -@@ -139,9 +139,8 @@ - "Topic :: Software Development :: Libraries :: Python Modules", - ], - -- packages = ['zope', 'zope.interface', 'zope.interface.tests'], -+ packages = ['zope', 'zope.interface'], - package_dir = {'': 'src'}, - cmdclass = {'build_ext': optional_build_ext, - }, -- test_suite = 'zope.interface.tests', - **extra) diff --git a/recipes/zope_interface/setuptools.patch b/recipes/zope_interface/setuptools.patch deleted file mode 100644 index 957027c..0000000 --- a/recipes/zope_interface/setuptools.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/setup.py 2016-12-14 00:02:45.000000000 +0100 -+++ b/setup.py 2018-09-29 00:14:20.235641125 +0100 -@@ -131,7 +131,6 @@ - include_package_data=True, - zip_safe=False, - tests_require=tests_require, -- install_requires=['setuptools'], - extras_require={ - 'docs': ['Sphinx', 'repoze.sphinx.autointerface'], - 'test': tests_require,