Merge pull request #509 from lbryio/sdk-requirements-cleanup
clean up python sdk requirements
This commit is contained in:
commit
b21776c517
15 changed files with 5 additions and 168 deletions
|
@ -36,7 +36,7 @@ version.filename = %(source.dir)s/main.py
|
||||||
|
|
||||||
# (list) Application requirements
|
# (list) Application requirements
|
||||||
# comma seperated e.g. requirements = sqlite3,kivy
|
# 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
|
# (str) Custom source folders for requirements
|
||||||
# Sets custom source for any requirements with recipes
|
# Sets custom source for any requirements with recipes
|
||||||
|
|
|
@ -36,7 +36,7 @@ version.filename = %(source.dir)s/main.py
|
||||||
|
|
||||||
# (list) Application requirements
|
# (list) Application requirements
|
||||||
# comma seperated e.g. requirements = sqlite3,kivy
|
# 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
|
# (str) Custom source folders for requirements
|
||||||
# Sets custom source for any requirements with recipes
|
# Sets custom source for any requirements with recipes
|
||||||
|
|
|
@ -36,7 +36,7 @@ version.filename = %(source.dir)s/main.py
|
||||||
|
|
||||||
# (list) Application requirements
|
# (list) Application requirements
|
||||||
# comma seperated e.g. requirements = sqlite3,kivy
|
# 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
|
# (str) Custom source folders for requirements
|
||||||
# Sets custom source for any requirements with recipes
|
# Sets custom source for any requirements with recipes
|
||||||
|
|
|
@ -5,7 +5,7 @@ from pythonforandroid.recipe import CompiledComponentsPythonRecipe
|
||||||
|
|
||||||
class CffiRecipe(CompiledComponentsPythonRecipe):
|
class CffiRecipe(CompiledComponentsPythonRecipe):
|
||||||
name = 'cffi'
|
name = 'cffi'
|
||||||
version = '1.11.5'
|
version = '1.12.1'
|
||||||
url = 'https://pypi.python.org/packages/source/c/cffi/cffi-{version}.tar.gz'
|
url = 'https://pypi.python.org/packages/source/c/cffi/cffi-{version}.tar.gz'
|
||||||
|
|
||||||
depends = [('python2', 'python3crystax'), 'setuptools', 'pycparser', 'libffi']
|
depends = [('python2', 'python3crystax'), 'setuptools', 'pycparser', 'libffi']
|
||||||
|
|
|
@ -4,11 +4,10 @@ import os
|
||||||
|
|
||||||
class CryptographyRecipe(CompiledComponentsPythonRecipe):
|
class CryptographyRecipe(CompiledComponentsPythonRecipe):
|
||||||
name = 'cryptography'
|
name = 'cryptography'
|
||||||
version = '2.3.1'
|
version = '2.5'
|
||||||
url = 'https://github.com/pyca/cryptography/archive/{version}.tar.gz'
|
url = 'https://github.com/pyca/cryptography/archive/{version}.tar.gz'
|
||||||
depends = [('python2', 'python3crystax'), 'openssl', 'idna', 'pyasn1', 'six', 'setuptools', 'ipaddress', 'cffi']
|
depends = [('python2', 'python3crystax'), 'openssl', 'idna', 'pyasn1', 'six', 'setuptools', 'ipaddress', 'cffi']
|
||||||
call_hostpython_via_targetpython = False
|
call_hostpython_via_targetpython = False
|
||||||
patches = ['force-urandom.patch']
|
|
||||||
|
|
||||||
def get_recipe_env(self, arch):
|
def get_recipe_env(self, arch):
|
||||||
env = super(CryptographyRecipe, self).get_recipe_env(arch)
|
env = super(CryptographyRecipe, self).get_recipe_env(arch)
|
||||||
|
|
|
@ -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
|
|
|
@ -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()
|
|
|
@ -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()
|
|
|
@ -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()
|
|
|
@ -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()
|
|
|
@ -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()
|
|
|
@ -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()
|
|
|
@ -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()
|
|
|
@ -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)
|
|
|
@ -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,
|
|
Loading…
Reference in a new issue