finish recipes for sdk
This commit is contained in:
parent
4d0020cc0d
commit
166ae895a0
58 changed files with 805 additions and 157 deletions
|
@ -10,17 +10,25 @@ kivy_ios.egg-info/entry_points.txt
|
|||
kivy_ios.egg-info/requires.txt
|
||||
kivy_ios.egg-info/top_level.txt
|
||||
kivy_ios/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/__pycache__/context_managers.cpython-37.pyc
|
||||
kivy_ios/__pycache__/context_managers.cpython-38.pyc
|
||||
kivy_ios/__pycache__/toolchain.cpython-37.pyc
|
||||
kivy_ios/__pycache__/toolchain.cpython-38.pyc
|
||||
kivy_ios/recipes/__init__.py
|
||||
kivy_ios/recipes/hostpython.py
|
||||
kivy_ios/recipes/python.py
|
||||
kivy_ios/recipes/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/recipes/__pycache__/python.cpython-37.pyc
|
||||
kivy_ios/recipes/__pycache__/python.cpython-38.pyc
|
||||
kivy_ios/recipes/aiohttp/__init__.py
|
||||
kivy_ios/recipes/aioupnp/__init__.py
|
||||
kivy_ios/recipes/appdirs/__init__.py
|
||||
kivy_ios/recipes/appdirs/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/asn1crypto/__init__.py
|
||||
kivy_ios/recipes/asn1crypto/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/async-timeout/__init__.py
|
||||
kivy_ios/recipes/attrs/__init__.py
|
||||
kivy_ios/recipes/attrs/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/audiostream/__init__.py
|
||||
|
@ -29,8 +37,15 @@ kivy_ios/recipes/base58/__init__.py
|
|||
kivy_ios/recipes/base58/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/cffi/__init__.py
|
||||
kivy_ios/recipes/cffi/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/chardet/__init__.py
|
||||
kivy_ios/recipes/click/__init__.py
|
||||
kivy_ios/recipes/click/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/coincurve/__init__.py
|
||||
kivy_ios/recipes/coincurve/cross_compile.patch
|
||||
kivy_ios/recipes/coincurve/drop_setup_requires.patch
|
||||
kivy_ios/recipes/coincurve/find_lib.patch
|
||||
kivy_ios/recipes/coincurve/no-download.patch
|
||||
kivy_ios/recipes/coincurve/setup.py.patch
|
||||
kivy_ios/recipes/colorama/__init__.py
|
||||
kivy_ios/recipes/colorama/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/cryptography/__init__.py
|
||||
|
@ -41,6 +56,7 @@ kivy_ios/recipes/curly/__init__.py
|
|||
kivy_ios/recipes/curly/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/cymunk/__init__.py
|
||||
kivy_ios/recipes/cymunk/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/defusedxml/__init__.py
|
||||
kivy_ios/recipes/docopt/__init__.py
|
||||
kivy_ios/recipes/docopt/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/ecdsa/__init__.py
|
||||
|
@ -54,11 +70,15 @@ kivy_ios/recipes/flask/__init__.py
|
|||
kivy_ios/recipes/flask/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/freetype/__init__.py
|
||||
kivy_ios/recipes/freetype/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/freetype/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/recipes/hachoir/__init__.py
|
||||
kivy_ios/recipes/host_cffi/__init__.py
|
||||
kivy_ios/recipes/host_setuptools/__init__.py
|
||||
kivy_ios/recipes/host_setuptools/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/host_setuptools/setuptools/README.rst
|
||||
kivy_ios/recipes/host_setuptools3/__init__.py
|
||||
kivy_ios/recipes/host_setuptools3/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/host_setuptools3/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/recipes/host_setuptools3/setuptools/README.rst
|
||||
kivy_ios/recipes/hostlibffi/__init__.py
|
||||
kivy_ios/recipes/hostlibffi/ffi-3.0.13-sysv.S.patch
|
||||
|
@ -69,15 +89,20 @@ kivy_ios/recipes/hostlibffi/public_include.patch
|
|||
kivy_ios/recipes/hostlibffi/staticlib.patch
|
||||
kivy_ios/recipes/hostlibffi/staticlib2.patch
|
||||
kivy_ios/recipes/hostlibffi/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/hostlibffi/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/recipes/hostopenssl/__init__.py
|
||||
kivy_ios/recipes/hostopenssl/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/hostopenssl/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/recipes/hostpython3/ModulesSetup
|
||||
kivy_ios/recipes/hostpython3/__init__.py
|
||||
kivy_ios/recipes/hostpython3/pyconfig_detection.patch
|
||||
kivy_ios/recipes/hostpython3/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/hostpython3/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/recipes/idna/__init__.py
|
||||
kivy_ios/recipes/idna/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/ios/__init__.py
|
||||
kivy_ios/recipes/ios/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/ios/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/recipes/ios/src/ios.pyx
|
||||
kivy_ios/recipes/ios/src/ios_browser.m
|
||||
kivy_ios/recipes/ios/src/ios_filechooser.m
|
||||
|
@ -99,6 +124,7 @@ kivy_ios/recipes/kivent_core/__init__.py
|
|||
kivy_ios/recipes/kivent_core/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/kivy/__init__.py
|
||||
kivy_ios/recipes/kivy/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/kivy/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/recipes/lbry/__init__.py
|
||||
kivy_ios/recipes/lbry/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/libcurl/__init__.py
|
||||
|
@ -108,15 +134,20 @@ kivy_ios/recipes/libffi/ffi-3.0.13-sysv.S.patch
|
|||
kivy_ios/recipes/libffi/fix-win32-unreferenced-symbol.patch
|
||||
kivy_ios/recipes/libffi/generate-darwin-source-and-headers-python3-items.patch
|
||||
kivy_ios/recipes/libffi/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/libffi/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/recipes/libjpeg/__init__.py
|
||||
kivy_ios/recipes/libjpeg/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/libpng/__init__.py
|
||||
kivy_ios/recipes/libpng/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/libsecp256k1/__init__.py
|
||||
kivy_ios/recipes/libzbar/__init__.py
|
||||
kivy_ios/recipes/libzbar/werror.patch
|
||||
kivy_ios/recipes/libzbar/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/markupsafe/__init__.py
|
||||
kivy_ios/recipes/markupsafe/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/mock/__init__.py
|
||||
kivy_ios/recipes/msgpack/__init__.py
|
||||
kivy_ios/recipes/multidict/__init__.py
|
||||
kivy_ios/recipes/netifaces/__init__.py
|
||||
kivy_ios/recipes/netifaces/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/numpy/__init__.py
|
||||
|
@ -124,6 +155,7 @@ kivy_ios/recipes/numpy/numpy-1.16.4.patch
|
|||
kivy_ios/recipes/numpy/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/openssl/__init__.py
|
||||
kivy_ios/recipes/openssl/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/openssl/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/recipes/pbkdf2/__init__.py
|
||||
kivy_ios/recipes/pbkdf2/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/photolibrary/__init__.py
|
||||
|
@ -132,19 +164,23 @@ kivy_ios/recipes/pillow/__init__.py
|
|||
kivy_ios/recipes/pillow/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/plyer/__init__.py
|
||||
kivy_ios/recipes/plyer/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/prometheus_client/__init__.py
|
||||
kivy_ios/recipes/protobuf/__init__.py
|
||||
kivy_ios/recipes/protobuf/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/pyasn1/__init__.py
|
||||
kivy_ios/recipes/pyasn1-modules/__init__.py
|
||||
kivy_ios/recipes/pyasn1-modules/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/pyasn1/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/pycparser/__init__.py
|
||||
kivy_ios/recipes/pycrypto/__init__.py
|
||||
kivy_ios/recipes/pycrypto/hash_SHA2_template.c.patch
|
||||
kivy_ios/recipes/pycrypto/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/pykka/__init__.py
|
||||
kivy_ios/recipes/pykka/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/pylru/__init__.py
|
||||
kivy_ios/recipes/pyobjus/__init__.py
|
||||
kivy_ios/recipes/pyobjus/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/pyobjus/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/recipes/python3/ModulesSetup
|
||||
kivy_ios/recipes/python3/ModulesSetup.mobile
|
||||
kivy_ios/recipes/python3/__init__.py
|
||||
|
@ -157,6 +193,7 @@ kivy_ios/recipes/python3/posixmodule.patch
|
|||
kivy_ios/recipes/python3/pyconfig_detection.patch
|
||||
kivy_ios/recipes/python3/random.patch
|
||||
kivy_ios/recipes/python3/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/python3/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/recipes/python3/mock_modules/_sqlite3/__init__.py
|
||||
kivy_ios/recipes/python3/mock_modules/_sqlite3/_sqlite3.cpython-38-darwin.so
|
||||
kivy_ios/recipes/pyyaml/__init__.py
|
||||
|
@ -164,18 +201,23 @@ kivy_ios/recipes/pyyaml/__pycache__/__init__.cpython-37.pyc
|
|||
kivy_ios/recipes/sdl2/__init__.py
|
||||
kivy_ios/recipes/sdl2/uikit-transparent.patch
|
||||
kivy_ios/recipes/sdl2/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/sdl2/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/recipes/sdl2_image/__init__.py
|
||||
kivy_ios/recipes/sdl2_image/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/sdl2_image/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/recipes/sdl2_mixer/__init__.py
|
||||
kivy_ios/recipes/sdl2_mixer/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/sdl2_mixer/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/recipes/sdl2_ttf/__init__.py
|
||||
kivy_ios/recipes/sdl2_ttf/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/sdl2_ttf/__pycache__/__init__.cpython-38.pyc
|
||||
kivy_ios/recipes/setuptools/__init__.py
|
||||
kivy_ios/recipes/setuptools/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/six/__init__.py
|
||||
kivy_ios/recipes/six/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/werkzeug/__init__.py
|
||||
kivy_ios/recipes/werkzeug/__pycache__/__init__.cpython-37.pyc
|
||||
kivy_ios/recipes/yarl/__init__.py
|
||||
kivy_ios/recipes/zbarlight/__init__.py
|
||||
kivy_ios/recipes/zbarlight/zbarlight_1_2.patch
|
||||
kivy_ios/recipes/zbarlight/__pycache__/__init__.cpython-37.pyc
|
||||
|
|
23
kivy_ios/recipes/aiohttp/__init__.py
Normal file
23
kivy_ios/recipes/aiohttp/__init__.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
# pure-python package, this can be removed when we'll support any python package
|
||||
import os
|
||||
import sh
|
||||
from kivy_ios.toolchain import CythonRecipe, shprint
|
||||
from os.path import join
|
||||
|
||||
|
||||
class AioHttpRecipe(CythonRecipe):
|
||||
version = "3.5.4"
|
||||
url = "https://pypi.python.org/packages/source/a/aiohttp/aiohttp-{version}.tar.gz"
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
recipe = AioHttpRecipe()
|
29
kivy_ios/recipes/aioupnp/__init__.py
Normal file
29
kivy_ios/recipes/aioupnp/__init__.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
# pure-python package, this can be removed when we'll support any python package
|
||||
import os
|
||||
import sh
|
||||
from kivy_ios.toolchain import CythonRecipe, shprint
|
||||
from os.path import join
|
||||
|
||||
class AioupnpRecipe(CythonRecipe):
|
||||
version = "0.0.17"
|
||||
url = "https://pypi.python.org/packages/source/a/aioupnp/aioupnp-{version}.tar.gz"
|
||||
depends = ["python", "defusedxml"]
|
||||
|
||||
def prebuild_arch(self, arch):
|
||||
if self.has_marker("patched"):
|
||||
return
|
||||
self.apply_patch("exclude_netifaces.patch")
|
||||
self.apply_patch("none_netifaces.patch")
|
||||
self.set_marker("patched")
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
recipe = AioupnpRecipe()
|
10
kivy_ios/recipes/aioupnp/exclude_netifaces.patch
Normal file
10
kivy_ios/recipes/aioupnp/exclude_netifaces.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- a/setup.py 2020-09-28 10:20:48.000000000 +0100
|
||||
+++ b/setup.py 2020-09-28 10:21:12.000000000 +0100
|
||||
@@ -36,7 +36,6 @@
|
||||
packages=find_packages(exclude=('tests',)),
|
||||
entry_points={'console_scripts': console_scripts},
|
||||
install_requires=[
|
||||
- 'netifaces',
|
||||
'defusedxml'
|
||||
]
|
||||
)
|
16
kivy_ios/recipes/aioupnp/none_netifaces.patch
Normal file
16
kivy_ios/recipes/aioupnp/none_netifaces.patch
Normal file
|
@ -0,0 +1,16 @@
|
|||
--- a/aioupnp/interfaces.py 2020-09-28 10:23:40.000000000 +0100
|
||||
+++ b/aioupnp/interfaces.py 2020-09-28 10:23:56.000000000 +0100
|
||||
@@ -1,12 +1,11 @@
|
||||
import socket
|
||||
from collections import OrderedDict
|
||||
import typing
|
||||
-import netifaces
|
||||
from aioupnp.fault import UPnPError
|
||||
|
||||
|
||||
def get_netifaces():
|
||||
- return netifaces
|
||||
+ return None
|
||||
|
||||
|
||||
def ifaddresses(iface: str) -> typing.Dict[int, typing.List[typing.Dict[str, str]]]:
|
|
@ -5,7 +5,7 @@ import sh, os
|
|||
class AppdirsRecipe(PythonRecipe):
|
||||
version = "1.4.3"
|
||||
url = "https://pypi.python.org/packages/source/a/appdirs/appdirs-{version}.tar.gz"
|
||||
depends = ["python", "setuptools"]
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
|
@ -13,7 +13,7 @@ class AppdirsRecipe(PythonRecipe):
|
|||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import sh, os
|
|||
class Asn1CryptoRecipe(PythonRecipe):
|
||||
version = "0.24.0"
|
||||
url = "https://pypi.python.org/packages/source/a/asn1crypto/asn1crypto-{version}.tar.gz"
|
||||
depends = ["python", "setuptools"]
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
|
@ -13,7 +13,7 @@ class Asn1CryptoRecipe(PythonRecipe):
|
|||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
|
22
kivy_ios/recipes/async-timeout/__init__.py
Normal file
22
kivy_ios/recipes/async-timeout/__init__.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# pure-python package, this can be removed when we'll support any python package
|
||||
import os
|
||||
import sh
|
||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
||||
|
||||
|
||||
class AsyncTimeoutRecipe(PythonRecipe):
|
||||
version = "3.0.1"
|
||||
url = "https://pypi.python.org/packages/source/a/async-timeout/async-timeout-{version}.tar.gz"
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
recipe = AsyncTimeoutRecipe()
|
|
@ -5,7 +5,7 @@ import sh, os
|
|||
class AttrsRecipe(PythonRecipe):
|
||||
version = "18.1.0"
|
||||
url = "https://pypi.python.org/packages/source/a/attrs/attrs-{version}.tar.gz"
|
||||
depends = ["python", "setuptools"]
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
|
@ -13,7 +13,7 @@ class AttrsRecipe(PythonRecipe):
|
|||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@ from os.path import join
|
|||
import sh, os
|
||||
|
||||
class Base58Recipe(PythonRecipe):
|
||||
version = "0.2.2"
|
||||
version = "1.0.0"
|
||||
url = "https://pypi.python.org/packages/source/b/base58/base58-{version}.tar.gz"
|
||||
depends = ["python", "setuptools"]
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
|
@ -13,7 +13,7 @@ class Base58Recipe(PythonRecipe):
|
|||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
|
|
@ -6,10 +6,10 @@ import sh
|
|||
|
||||
class CffiRecipe(CythonRecipe):
|
||||
name = "cffi"
|
||||
version = "1.11.5"
|
||||
version = "1.14.3"
|
||||
url = "https://pypi.python.org/packages/source/c/cffi/cffi-{version}.tar.gz"
|
||||
library = "libcffi.a"
|
||||
depends = ["host_cffi", "libffi", "setuptools", "pycparser"]
|
||||
depends = ["host_cffi", "libffi", "pycparser"]
|
||||
cythonize = False
|
||||
|
||||
def get_recipe_env(self, arch):
|
||||
|
@ -26,23 +26,26 @@ class CffiRecipe(CythonRecipe):
|
|||
os.chdir(build_dir)
|
||||
|
||||
# manually create expected directory in build directory
|
||||
scripts_dir = join("build", "scripts-2.7")
|
||||
scripts_dir = join("build", "scripts-3.8")
|
||||
if not os.path.exists(scripts_dir):
|
||||
os.makedirs(scripts_dir)
|
||||
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "build_ext", _env=build_env)
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
# hack: copy _cffi_backend.so from hostpython
|
||||
so_file = "_cffi_backend.so"
|
||||
egg_name = "cffi-1.11.5-py2.7-macosx-10.4-x86_64.egg" # harded - needs to change
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python", "lib", "python2.7", "site-packages", egg_name)
|
||||
src_dir = join(self.ctx.dist_dir, "hostpython", "lib", "python2.7", "site-packages", egg_name)
|
||||
so_file = "_cffi_backend.cpython-38-darwin.so"
|
||||
egg_name = "cffi-1.14.3-py3.8-macosx-10.15-x86_64.egg" # harded - needs to change
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3", "lib", "python3.8", "site-packages", egg_name)
|
||||
dest_dir_main = join(self.ctx.dist_dir, "root", "python3", "lib", "python3.8", "site-packages")
|
||||
|
||||
src_dir = join(self.ctx.dist_dir, "hostpython3", "lib", "python3.8", "site-packages", egg_name)
|
||||
sh.cp(join(src_dir, so_file), join(dest_dir, so_file))
|
||||
sh.cp(join(src_dir, so_file), join(dest_dir_main, so_file))
|
||||
|
||||
|
||||
recipe = CffiRecipe()
|
||||
|
|
23
kivy_ios/recipes/chardet/__init__.py
Normal file
23
kivy_ios/recipes/chardet/__init__.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
# pure-python package, this can be removed when we'll support any python package
|
||||
import os
|
||||
import sh
|
||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
||||
|
||||
|
||||
class ChardetRecipe(PythonRecipe):
|
||||
version = "3.0.4"
|
||||
url = "https://pypi.python.org/packages/source/c/chardet/chardet-{version}.tar.gz"
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
||||
recipe = ChardetRecipe()
|
76
kivy_ios/recipes/coincurve/__init__.py
Normal file
76
kivy_ios/recipes/coincurve/__init__.py
Normal file
|
@ -0,0 +1,76 @@
|
|||
import sh
|
||||
import os
|
||||
from os.path import join
|
||||
|
||||
from kivy_ios.toolchain import CythonRecipe, Recipe, shprint
|
||||
from kivy_ios.context_managers import cd
|
||||
|
||||
|
||||
class CoincurveRecipe(CythonRecipe):
|
||||
version = "7.1.0"
|
||||
url = "https://github.com/ofek/coincurve/archive/{version}.tar.gz"
|
||||
depends = ["python3", "libffi", "cffi", "pycparser", "libsecp256k1"]
|
||||
library = 'libcoincurve.a'
|
||||
pre_build_ext = True
|
||||
include_per_arch = True
|
||||
|
||||
def dest_dir(self):
|
||||
return join(self.ctx.dist_dir, "root", "python3")
|
||||
|
||||
def prebuild_arch(self, arch):
|
||||
# common to all archs
|
||||
if self.has_marker("patched"):
|
||||
return
|
||||
self.apply_patch("cross_compile.patch")
|
||||
self.apply_patch("drop_setup_requires.patch")
|
||||
self.apply_patch("find_lib.patch")
|
||||
self.apply_patch("no-download.patch")
|
||||
self.apply_patch("setup.py.patch")
|
||||
self.set_marker("patched")
|
||||
|
||||
def get_recipe_env(self, arch):
|
||||
env = arch.get_env()
|
||||
# sets linker to use the correct gcc (cross compiler)
|
||||
env['TOOLCHAIN_PREFIX'] = arch.triple
|
||||
env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl'
|
||||
libsecp256k1 = self.get_recipe('libsecp256k1', self.ctx)
|
||||
libsecp256k1_dir = libsecp256k1.get_build_dir(arch.arch)
|
||||
env['LDFLAGS'] += ' -L{}'.format(os.path.join(libsecp256k1_dir, '.libs'))
|
||||
env['CFLAGS'] += ' -I' + os.path.join(libsecp256k1_dir, 'include')
|
||||
|
||||
target_python = Recipe.get_recipe('python3', self.ctx).get_build_dir(arch.arch)
|
||||
env['LDFLAGS'] += ' -L' + target_python
|
||||
|
||||
print(env['LDFLAGS'])
|
||||
|
||||
python_version = '3.8'
|
||||
env["PYTHONPATH"] = join(self.dest_dir(), "lib", "python3.8", "site-packages")
|
||||
env['PYTHON_ROOT'] = join(self.ctx.dist_dir, "root", "python3")
|
||||
env['CFLAGS'] += ' -I' + env['PYTHON_ROOT'] + '/include/python{}'.format(python_version)
|
||||
env['LDFLAGS'] += " -lpython{}".format(python_version)
|
||||
env['LDFLAGS'] += " -lsecp256k1 -lssl -lcrypto -lffi -lz"
|
||||
return env
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
def postbuild_arch(self, arch):
|
||||
py_arch = arch.arch
|
||||
if py_arch == "arm64":
|
||||
py_arch = "x86_64"
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
build_env = self.get_recipe_env(arch)
|
||||
tmp_folder = 'build/temp.macosx-10.15-{}-3.8/build/temp.macosx-10.15-{}-3.8'.format(py_arch, py_arch)
|
||||
shprint(sh.Command(build_env['AR']),
|
||||
"-q",
|
||||
"{}/{}".format(self.build_dir, self.library),
|
||||
"{}/{}/_libsecp256k1.o".format(self.build_dir, tmp_folder))
|
||||
|
||||
recipe = CoincurveRecipe()
|
12
kivy_ios/recipes/coincurve/cross_compile.patch
Normal file
12
kivy_ios/recipes/coincurve/cross_compile.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
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),
|
12
kivy_ios/recipes/coincurve/drop_setup_requires.patch
Normal file
12
kivy_ios/recipes/coincurve/drop_setup_requires.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
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={
|
13
kivy_ios/recipes/coincurve/find_lib.patch
Normal file
13
kivy_ios/recipes/coincurve/find_lib.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
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:
|
13
kivy_ios/recipes/coincurve/no-download.patch
Normal file
13
kivy_ios/recipes/coincurve/no-download.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
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')
|
22
kivy_ios/recipes/coincurve/setup.py.patch
Normal file
22
kivy_ios/recipes/coincurve/setup.py.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
From bf3a0684e9b0af29d9777f61d6e7e1d3cc0f2803 Mon Sep 17 00:00:00 2001
|
||||
From: Kieran Prasch <kieranprasch@gmail.com>
|
||||
Date: Thu, 19 Jul 2018 14:11:48 -0700
|
||||
Subject: [PATCH] Exclude tests in setup.py
|
||||
|
||||
---
|
||||
setup.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 0b579f1..0a793ed 100644
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -277,7 +277,7 @@ def has_c_libraries(self):
|
||||
install_requires=['asn1crypto', 'cffi>=1.3.0'],
|
||||
tests_require=['pytest>=2.8.7'],
|
||||
|
||||
- packages=find_packages(exclude=('_cffi_build', '_cffi_build.*', 'libsecp256k1')),
|
||||
+ packages=find_packages(exclude=('_cffi_build', '_cffi_build.*', 'libsecp256k1', 'tests')),
|
||||
|
||||
distclass=Distribution,
|
||||
zip_safe=False,
|
|
@ -6,14 +6,14 @@ class ColoramaRecipe(PythonRecipe):
|
|||
version = "0.3.7"
|
||||
url = "https://pypi.python.org/packages/source/c/colorama/colorama-{version}.tar.gz"
|
||||
depends = ["python"]
|
||||
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
|
|
@ -1,60 +1,54 @@
|
|||
from os.path import join
|
||||
from kivy_ios.toolchain import CythonRecipe, PythonRecipe, Recipe
|
||||
from kivy_ios.toolchain import shprint
|
||||
from kivy_ios.toolchain import CythonRecipe, Recipe, shprint
|
||||
from kivy_ios.context_managers import cd
|
||||
import os
|
||||
import sh
|
||||
|
||||
|
||||
class CryptographyRecipe(CythonRecipe):
|
||||
name = "cryptography"
|
||||
version = "2.2.2"
|
||||
version = "3.1.1"
|
||||
url = "https://pypi.python.org/packages/source/c/cryptography/cryptography-{version}.tar.gz"
|
||||
library = "libcryptography.a"
|
||||
depends = ["host_setuptools", "host_cffi", "setuptools", "asn1crypto",
|
||||
"cffi", "enum34", "idna", "ipaddress", "six"]
|
||||
cythonize = False
|
||||
|
||||
def prebuild_arch(self, arch):
|
||||
if self.has_marker("patched"):
|
||||
return
|
||||
self.apply_patch("getentropy.patch")
|
||||
self.apply_patch("osrandom.patch")
|
||||
self.set_marker("patched")
|
||||
depends = ["host_setuptools3", "host_cffi", "cffi", "asn1crypto", "idna", "six"]
|
||||
python_depends = ["setuptools"]
|
||||
cythonize = True
|
||||
pre_build_ext = True
|
||||
|
||||
def dest_dir(self):
|
||||
return join(self.ctx.dist_dir, "root", "python3")
|
||||
|
||||
def get_recipe_env(self, arch):
|
||||
env = super(CryptographyRecipe, self).get_recipe_env(arch)
|
||||
r = self.get_recipe('openssl', self.ctx)
|
||||
openssl_dir = r.get_build_dir(arch.arch)
|
||||
target_python = Recipe.get_recipe('python', self.ctx).get_build_dir(arch.arch)
|
||||
target_python = Recipe.get_recipe('python3', self.ctx).get_build_dir(arch.arch)
|
||||
env['LDFLAGS'] += ' -L' + target_python
|
||||
|
||||
env['PYTHON_ROOT'] = join(self.ctx.dist_dir, "root", "python")
|
||||
env['PYTHON_ROOT'] = join(self.ctx.dist_dir, "root", "python3")
|
||||
env["CC"] = "clang -Qunused-arguments -fcolor-diagnostics"
|
||||
env['CFLAGS'] += ' -I' + env['PYTHON_ROOT'] + '/include/python2.7' + \
|
||||
env['CFLAGS'] += ' -I' + env['PYTHON_ROOT'] + '/include/python3.8' + \
|
||||
' -I' + join(openssl_dir, 'include') + \
|
||||
' -I' + join(self.ctx.dist_dir, "include", arch.arch, "libffi")
|
||||
env['LDFLAGS'] += ' -L' + env['PYTHON_ROOT'] + '/lib' + \
|
||||
' -L' + openssl_dir + \
|
||||
' -lpython2.7' + \
|
||||
' -lssl' + r.version + \
|
||||
' -lcrypto' + r.version
|
||||
' -lpython3.8' + \
|
||||
' -lssl' + \
|
||||
' -lcrypto' + \
|
||||
' -lffi' + \
|
||||
' -lcffi'
|
||||
return env
|
||||
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
|
||||
# manually create expected directory in build directory
|
||||
scripts_dir = join("build", "scripts-2.7")
|
||||
if not os.path.exists(scripts_dir):
|
||||
os.makedirs(scripts_dir)
|
||||
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
pythonpath = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
build_env['PYTHONPATH'] = pythonpath
|
||||
args = [hostpython, "setup.py", "install", "--prefix", dest_dir]
|
||||
shprint(*args, _env=build_env)
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
with cd(build_dir):
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
||||
recipe = CryptographyRecipe()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
--- cryptography-2.2.2/src/_cffi_src/openssl/src/osrandom_engine.c 2018-03-27 15:12:05.000000000 +0100
|
||||
+++ cryptography-2.2.2-patch/src/_cffi_src/openssl/src/osrandom_engine.c 2018-06-02 05:21:49.000000000 +0100
|
||||
@@ -205,14 +205,10 @@
|
||||
--- a/src/_cffi_src/openssl/src/osrandom_engine.c 2019-01-22 17:41:49.000000000 +0100
|
||||
+++ b/src/_cffi_src/openssl/src/osrandom_engine.c 2019-08-12 11:47:03.000000000 +0100
|
||||
@@ -243,14 +243,10 @@
|
||||
#if !defined(__APPLE__)
|
||||
getentropy_works = CRYPTOGRAPHY_OSRANDOM_GETENTROPY_WORKS;
|
||||
#else
|
||||
|
@ -19,14 +19,14 @@
|
|||
}
|
||||
#endif
|
||||
return 1;
|
||||
@@ -228,22 +224,7 @@
|
||||
@@ -266,22 +262,7 @@
|
||||
return dev_urandom_read(buffer, size);
|
||||
#endif
|
||||
case CRYPTOGRAPHY_OSRANDOM_GETENTROPY_WORKS:
|
||||
- while (size > 0) {
|
||||
- /* OpenBSD and macOS restrict maximum buffer size to 256. */
|
||||
- len = size > 256 ? 256 : (size_t)size;
|
||||
- res = getentropy(buffer, len);
|
||||
- len = size > 256 ? 256 : size;
|
||||
- res = getentropy(buffer, (size_t)len);
|
||||
- if (res < 0) {
|
||||
- ERR_Cryptography_OSRandom_error(
|
||||
- CRYPTOGRAPHY_OSRANDOM_F_RAND_BYTES,
|
||||
|
|
23
kivy_ios/recipes/defusedxml/__init__.py
Normal file
23
kivy_ios/recipes/defusedxml/__init__.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
# pure-python package, this can be removed when we'll support any python package
|
||||
import os
|
||||
import sh
|
||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
||||
|
||||
|
||||
class DefusedXmlRecipe(PythonRecipe):
|
||||
version = "0.6.0"
|
||||
url = "https://pypi.python.org/packages/source/d/defusedxml/defusedxml-{version}.tar.gz"
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
||||
recipe = DefusedXmlRecipe()
|
|
@ -5,15 +5,15 @@ import sh, os
|
|||
class DocoptRecipe(PythonRecipe):
|
||||
version = "0.6.2"
|
||||
url = "https://pypi.python.org/packages/source/d/docopt/docopt-{version}.tar.gz"
|
||||
depends = ["python", "setuptools"]
|
||||
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
|
|
@ -5,15 +5,15 @@ import sh, os
|
|||
class EcdsaRecipe(PythonRecipe):
|
||||
version = "0.13"
|
||||
url = "https://pypi.python.org/packages/source/e/ecdsa/ecdsa-{version}.tar.gz"
|
||||
depends = ["python", "setuptools"]
|
||||
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ class FlaskRecipe(PythonRecipe):
|
|||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
|
23
kivy_ios/recipes/hachoir/__init__.py
Normal file
23
kivy_ios/recipes/hachoir/__init__.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
# pure-python package, this can be removed when we'll support any python package
|
||||
import os
|
||||
import sh
|
||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
||||
|
||||
|
||||
class HachoirRecipe(PythonRecipe):
|
||||
version = "3.1.1"
|
||||
url = "https://pypi.python.org/packages/source/h/hachoir/hachoir-{version}.tar.gz"
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
||||
recipe = HachoirRecipe()
|
61
kivy_ios/recipes/host_cffi/__init__.py
Normal file
61
kivy_ios/recipes/host_cffi/__init__.py
Normal file
|
@ -0,0 +1,61 @@
|
|||
from os.path import join
|
||||
from kivy_ios.toolchain import Recipe, shprint
|
||||
import os
|
||||
import sh
|
||||
|
||||
libffi_tpl = """
|
||||
prefix=%PREFIX%
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/build/Release
|
||||
includedir=${libdir}/build_macosx-x86_64/include
|
||||
|
||||
Name: libffi
|
||||
Description: Library supporting Foreign Function Interfaces
|
||||
Version: %VERSION%
|
||||
Libs: -L${libdir} -lffi
|
||||
Cflags: -I${includedir}
|
||||
"""
|
||||
|
||||
class HostCffiRecipe(Recipe):
|
||||
name = "host_cffi"
|
||||
version = "1.14.3"
|
||||
archs = ["x86_64"]
|
||||
url = "https://pypi.python.org/packages/source/c/cffi/cffi-{version}.tar.gz"
|
||||
depends = ["hostlibffi", "pycparser"]
|
||||
|
||||
def get_recipe_env(self, arch):
|
||||
sdk_path = sh.xcrun("--sdk", "macosx", "--show-sdk-path").strip()
|
||||
env = super(HostCffiRecipe, self).get_recipe_env(arch)
|
||||
env["CC"] = "clang -Qunused-arguments -fcolor-diagnostics"
|
||||
env["LDFLAGS"] = " ".join([
|
||||
"-undefined dynamic_lookup",
|
||||
#"-shared",
|
||||
"-L{}".format(join(self.ctx.dist_dir, "hostlibffi", "usr", "local", "lib"))
|
||||
])
|
||||
env["CFLAGS"] = " ".join([
|
||||
"--sysroot={}".format(sdk_path),
|
||||
"-I{}".format(join(self.ctx.dist_dir, "hostlibffi", "usr", "local", "include"))
|
||||
])
|
||||
return env
|
||||
|
||||
def prebuild_arch(self, arch):
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
build_env = self.get_recipe_env(arch)
|
||||
os.chdir(build_dir)
|
||||
|
||||
# generate a fake libffi pkg-config to let cffi use it
|
||||
hostlibffi = Recipe.get_recipe("hostlibffi", self.ctx)
|
||||
with open("libffi.pc", "w") as fd:
|
||||
tpl = libffi_tpl.replace("%PREFIX%",
|
||||
hostlibffi.get_build_dir(arch.arch))
|
||||
tpl = tpl.replace("%VERSION%", hostlibffi.version)
|
||||
fd.write(tpl)
|
||||
|
||||
build_env["PKG_CONFIG"] = "/usr/local/bin/pkg-config"
|
||||
build_env["PKG_CONFIG_PATH"] = build_dir
|
||||
|
||||
shprint(hostpython, "setup.py", "build_ext", _env=build_env)
|
||||
shprint(hostpython, "setup.py", "install", _env=build_env)
|
||||
|
||||
recipe = HostCffiRecipe()
|
|
@ -18,13 +18,13 @@ class HostSetuptools(Recipe):
|
|||
# python package installations using setuptools will raise exceptions.
|
||||
# Setuptools version 28.3.0
|
||||
site_packages_path = join(
|
||||
self.ctx.dist_dir, 'hostpython',
|
||||
'lib', 'python3.7', 'site-packages')
|
||||
self.ctx.dist_dir, 'hostpython3',
|
||||
'lib', 'python3.8', 'site-packages')
|
||||
os.chdir(site_packages_path)
|
||||
with open('setuptools.pth', 'r') as f:
|
||||
setuptools_egg_path = f.read().strip('./').strip('\n')
|
||||
unzip = sh.Command('unzip')
|
||||
shprint(unzip, setuptools_egg_path)
|
||||
shprint(unzip, '-o', setuptools_egg_path)
|
||||
os.remove(setuptools_egg_path)
|
||||
os.remove('setuptools.pth')
|
||||
os.remove('easy-install.pth')
|
||||
|
|
|
@ -5,7 +5,7 @@ import sh, os
|
|||
class IdnaRecipe(PythonRecipe):
|
||||
version = "2.6"
|
||||
url = "https://pypi.python.org/packages/source/i/idna/idna-{version}.tar.gz"
|
||||
depends = ["python", "setuptools"]
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
|
@ -13,7 +13,7 @@ class IdnaRecipe(PythonRecipe):
|
|||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
|
|
@ -8,20 +8,6 @@ class IosRecipe(CythonRecipe):
|
|||
depends = ["python"]
|
||||
pbx_frameworks = ["MessageUI", "CoreMotion", "UIKit", "WebKit", "Photos"]
|
||||
|
||||
def prebuild_arch(self, arch):
|
||||
from os.path import join
|
||||
destdir = self.get_build_dir(arch.arch)
|
||||
local_arch = arch.arch
|
||||
if arch.arch == "arm64" :
|
||||
local_arch = "aarch64"
|
||||
if arch.arch == "armv7" :
|
||||
local_arch = "arm"
|
||||
build_dir = join(destdir, "../../../python", arch.arch, "Python-2.7.13", "build", "lib.darwin-{}-2.7".format(local_arch))
|
||||
print("build_dir = "+build_dir)
|
||||
copyfile = join(build_dir,"_sysconfigdata.py")
|
||||
# Copy _sysconfigdata.py for this architecture across
|
||||
self.copy_file(copyfile, destdir)
|
||||
|
||||
def install(self):
|
||||
self.install_python_package(
|
||||
name=self.so_filename("ios"), is_dir=False)
|
||||
|
|
|
@ -5,7 +5,7 @@ import sh, os
|
|||
class IpaddressRecipe(PythonRecipe):
|
||||
version = "1.0.22"
|
||||
url = "https://pypi.python.org/packages/source/i/ipaddress/ipaddress-{version}.tar.gz"
|
||||
depends = ["python", "setuptools"]
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
|
@ -13,7 +13,7 @@ class IpaddressRecipe(PythonRecipe):
|
|||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import sh, os
|
|||
class JsonschemaRecipe(PythonRecipe):
|
||||
version = "2.6.0"
|
||||
url = "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-{version}.tar.gz"
|
||||
depends = ["python", "setuptools", "functools32"]
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
|
@ -13,7 +13,7 @@ class JsonschemaRecipe(PythonRecipe):
|
|||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
|
|
@ -5,15 +5,15 @@ import sh, os
|
|||
class KeyringRecipe(PythonRecipe):
|
||||
version = "10.4.0"
|
||||
url = "https://pypi.python.org/packages/source/k/keyring/keyring-{version}.tar.gz"
|
||||
depends = ["python", "setuptools"]
|
||||
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ class KiventCoreRecipe(CythonRecipe):
|
|||
# build_env = arch.get_env()
|
||||
build_env = self.get_recipe_env(arch)
|
||||
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.7', 'site-packages')
|
||||
|
||||
# Add Architecture specific kivy path for 'import kivy' to PYTHONPATH
|
||||
|
|
|
@ -31,20 +31,6 @@ class KivyRecipe(CythonRecipe):
|
|||
join(self.ctx.dist_dir, "include", "common", "sdl2_mixer")])
|
||||
return env
|
||||
|
||||
def prebuild_arch(self, arch):
|
||||
from os.path import join
|
||||
destdir = self.get_build_dir(arch.arch)
|
||||
local_arch = arch.arch
|
||||
if arch.arch == "arm64" :
|
||||
local_arch = "aarch64"
|
||||
if arch.arch == "armv7" :
|
||||
local_arch = "arm"
|
||||
build_dir = join(destdir, "../../../python", arch.arch, "Python-2.7.13", "build", "lib.darwin-{}-2.7".format(local_arch))
|
||||
print("build_dir = "+build_dir)
|
||||
copyfile = join(build_dir,"_sysconfigdata.py")
|
||||
# Copy _sysconfigdata.py for this architecture across
|
||||
self.copy_file(copyfile, destdir)
|
||||
|
||||
def build_arch(self, arch):
|
||||
self._patch_setup()
|
||||
super().build_arch(arch)
|
||||
|
|
|
@ -3,22 +3,25 @@ from os.path import join
|
|||
import sh, os
|
||||
|
||||
class LbryRecipe(PythonRecipe):
|
||||
version = "v0.81.0"
|
||||
version = "f7eed62"
|
||||
url = "https://github.com/lbryio/lbry/archive/{version}.tar.gz"
|
||||
depends = [
|
||||
"python",
|
||||
"setuptools",
|
||||
"ios",
|
||||
"pyobjus",
|
||||
"kivy",
|
||||
|
||||
# install_requires dependencies
|
||||
"aiohttp",
|
||||
"aioupnp",
|
||||
"appdirs",
|
||||
"argparse",
|
||||
"async_timeout",
|
||||
"async-timeout",
|
||||
"base58",
|
||||
"chardet",
|
||||
"coincurve",
|
||||
"colorama",
|
||||
"cryptography",
|
||||
"defusedxml"
|
||||
"defusedxml",
|
||||
"docopt",
|
||||
"ecdsa",
|
||||
"hachoir",
|
||||
|
@ -26,19 +29,26 @@ class LbryRecipe(PythonRecipe):
|
|||
"mock",
|
||||
"msgpack",
|
||||
"pbkdf2",
|
||||
"prometheus_client"
|
||||
"prometheus_client",
|
||||
"protobuf",
|
||||
"pylru",
|
||||
"pyyaml",
|
||||
"six",
|
||||
"six"
|
||||
]
|
||||
|
||||
def prebuild_arch(self, arch):
|
||||
if self.has_marker("patched"):
|
||||
return
|
||||
self.apply_patch("setup_override.patch")
|
||||
self.set_marker("patched")
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
|
33
kivy_ios/recipes/lbry/setup_override.patch
Normal file
33
kivy_ios/recipes/lbry/setup_override.patch
Normal file
|
@ -0,0 +1,33 @@
|
|||
--- a/setup.py 2020-09-28 10:43:56.000000000 +0100
|
||||
+++ b/setup.py 2020-09-28 10:44:34.000000000 +0100
|
||||
@@ -32,29 +32,7 @@
|
||||
'orchstr8=lbry.wallet.orchstr8.cli:main',
|
||||
],
|
||||
},
|
||||
- install_requires=[
|
||||
- 'aiohttp==3.5.4',
|
||||
- 'aioupnp==0.0.17',
|
||||
- 'appdirs==1.4.3',
|
||||
- 'certifi>=2018.11.29',
|
||||
- 'colorama==0.3.7',
|
||||
- 'distro==1.4.0',
|
||||
- 'base58==1.0.0',
|
||||
- 'cffi==1.13.2',
|
||||
- 'cryptography==2.5',
|
||||
- 'protobuf==3.6.1',
|
||||
- 'msgpack==0.6.1',
|
||||
- 'prometheus_client==0.7.1',
|
||||
- 'ecdsa==0.13.3',
|
||||
- 'pyyaml==5.3.1',
|
||||
- 'docopt==0.6.2',
|
||||
- 'hachoir',
|
||||
- 'multidict==4.6.1',
|
||||
- 'coincurve==11.0.0',
|
||||
- 'pbkdf2==1.3',
|
||||
- 'attrs==18.2.0',
|
||||
- 'pylru==1.1.0'
|
||||
- ] + PLYVEL,
|
||||
+ install_requires=[],
|
||||
classifiers=[
|
||||
'Framework :: AsyncIO',
|
||||
'Intended Audience :: Developers',
|
29
kivy_ios/recipes/libsecp256k1/__init__.py
Normal file
29
kivy_ios/recipes/libsecp256k1/__init__.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
from kivy_ios.toolchain import Recipe, shprint
|
||||
from os.path import join, exists
|
||||
from multiprocessing import cpu_count
|
||||
import sh
|
||||
|
||||
class LibSecp256k1Recipe(Recipe):
|
||||
version = 'b0452e6'
|
||||
url = 'https://github.com/bitcoin-core/secp256k1/archive/{version}.zip'
|
||||
library = '.libs/libsecp256k1.a'
|
||||
include_per_arch = True
|
||||
|
||||
def build_arch(self, arch):
|
||||
super(LibSecp256k1Recipe, self).build_arch(arch)
|
||||
env = self.get_recipe_env(arch)
|
||||
|
||||
if not exists(join(self.build_dir, "configure")):
|
||||
shprint(sh.Command('./autogen.sh'))
|
||||
shprint(
|
||||
sh.Command('./configure'),
|
||||
'--host=' + arch.triple,
|
||||
'--prefix=/',
|
||||
'--enable-module-recovery',
|
||||
'--enable-experimental',
|
||||
'--enable-module-ecdh',
|
||||
'--disable-shared',
|
||||
_env=env)
|
||||
shprint(sh.make, '-j' + str(cpu_count()), _env=env)
|
||||
|
||||
recipe = LibSecp256k1Recipe()
|
23
kivy_ios/recipes/mock/__init__.py
Normal file
23
kivy_ios/recipes/mock/__init__.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
# pure-python package, this can be removed when we'll support any python package
|
||||
import os
|
||||
import sh
|
||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
||||
|
||||
|
||||
class MockRecipe(PythonRecipe):
|
||||
version = "4.0.2"
|
||||
url = "https://pypi.python.org/packages/source/m/mock/mock-{version}.tar.gz"
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
||||
recipe = MockRecipe()
|
23
kivy_ios/recipes/msgpack/__init__.py
Normal file
23
kivy_ios/recipes/msgpack/__init__.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
# pure-python package, this can be removed when we'll support any python package
|
||||
import os
|
||||
import sh
|
||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
||||
|
||||
|
||||
class MsgpackRecipe(PythonRecipe):
|
||||
version = "0.6.1"
|
||||
url = "https://pypi.python.org/packages/source/m/msgpack/msgpack-{version}.tar.gz"
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
||||
recipe = MsgpackRecipe()
|
22
kivy_ios/recipes/multidict/__init__.py
Normal file
22
kivy_ios/recipes/multidict/__init__.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# pure-python package, this can be removed when we'll support any python package
|
||||
import os
|
||||
import sh
|
||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
||||
|
||||
|
||||
class MultidictRecipe(PythonRecipe):
|
||||
version = "4.5.2"
|
||||
url = "https://pypi.python.org/packages/source/m/multidict/multidict-{version}.tar.gz"
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
recipe = MultidictRecipe()
|
|
@ -5,7 +5,7 @@ import sh, os
|
|||
class Pbkdf2Recipe(PythonRecipe):
|
||||
version = "1.3"
|
||||
url = "https://pypi.python.org/packages/source/p/pbkdf2/pbkdf2-{version}.tar.gz"
|
||||
depends = ["python", "setuptools"]
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
|
@ -13,8 +13,8 @@ class Pbkdf2Recipe(PythonRecipe):
|
|||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
||||
recipe = Pbkdf2Recipe()
|
||||
|
|
23
kivy_ios/recipes/prometheus_client/__init__.py
Normal file
23
kivy_ios/recipes/prometheus_client/__init__.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
# pure-python package, this can be removed when we'll support any python package
|
||||
import os
|
||||
import sh
|
||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
||||
|
||||
|
||||
class PrometheusClientRecipe(PythonRecipe):
|
||||
version = "0.8.0"
|
||||
url = "https://pypi.python.org/packages/source/p/prometheus_client/prometheus_client-{version}.tar.gz"
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
||||
recipe = PrometheusClientRecipe()
|
|
@ -3,9 +3,9 @@ from os.path import join
|
|||
import sh, os
|
||||
|
||||
class ProtobufRecipe(PythonRecipe):
|
||||
version = "3.2.0"
|
||||
version = "3.6.1"
|
||||
url = "https://pypi.python.org/packages/source/p/protobuf/protobuf-{version}.tar.gz"
|
||||
depends = ["python", "setuptools", "six"]
|
||||
depends = ["python", "six"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
|
@ -13,8 +13,7 @@ class ProtobufRecipe(PythonRecipe):
|
|||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
build_env['PATH'] = ''
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
|
|
@ -5,15 +5,15 @@ import sh, os
|
|||
class Pyasn1ModulesRecipe(PythonRecipe):
|
||||
version = "0.2.1"
|
||||
url = "https://pypi.python.org/packages/source/p/pyasn1-modules/pyasn1-modules-{version}.tar.gz"
|
||||
depends = ["python", "setuptools", "pyasn1"]
|
||||
|
||||
depends = ["python", "pyasn1"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import sh, os
|
|||
class Pyasn1Recipe(PythonRecipe):
|
||||
version = "0.4.3"
|
||||
url = "https://pypi.python.org/packages/source/p/pyasn1/pyasn1-{version}.tar.gz"
|
||||
depends = ["python", "setuptools"]
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
|
@ -13,8 +13,9 @@ class Pyasn1Recipe(PythonRecipe):
|
|||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
||||
recipe = Pyasn1Recipe()
|
||||
|
|
23
kivy_ios/recipes/pycparser/__init__.py
Normal file
23
kivy_ios/recipes/pycparser/__init__.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
# pure-python package, this can be removed when we'll support any python package
|
||||
import os
|
||||
import sh
|
||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
||||
|
||||
|
||||
class PycparserRecipe(PythonRecipe):
|
||||
version = "2.20"
|
||||
url = "https://pypi.python.org/packages/source/p/pycparser/pycparser-{version}.tar.gz"
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
||||
recipe = PycparserRecipe()
|
|
@ -33,7 +33,7 @@ class PycryptoRecipe(CythonRecipe):
|
|||
build_dir = self.get_build_dir(arch.arch)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.7', 'site-packages')
|
||||
with cd(build_dir):
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
|
23
kivy_ios/recipes/pylru/__init__.py
Normal file
23
kivy_ios/recipes/pylru/__init__.py
Normal file
|
@ -0,0 +1,23 @@
|
|||
# pure-python package, this can be removed when we'll support any python package
|
||||
import os
|
||||
import sh
|
||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
||||
|
||||
|
||||
class PylruRecipe(PythonRecipe):
|
||||
version = "1.2.0"
|
||||
url = "https://pypi.python.org/packages/source/p/pylru/pylru-{version}.tar.gz"
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
||||
recipe = PylruRecipe()
|
|
@ -28,7 +28,7 @@ _lsprof _lsprof.o rotatingtree.c
|
|||
# _lzma _lzmamodule.c -I$(srcdir)/../xz/include -L$(srcdir)/../Support/XZ -llzma
|
||||
_md5 md5module.c
|
||||
_multibytecodec cjkcodecs/multibytecodec.c
|
||||
# _multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c
|
||||
#multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c
|
||||
_opcode _opcode.c
|
||||
_queue _queuemodule.c
|
||||
_pickle _pickle.c
|
||||
|
@ -48,7 +48,7 @@ cmath cmathmodule.c _math.c
|
|||
fcntl fcntlmodule.c
|
||||
grp grpmodule.c
|
||||
math mathmodule.c
|
||||
# mmap mmapmodule.c
|
||||
mmap mmapmodule.c -I/usr/include
|
||||
parser parsermodule.c
|
||||
pyexpat expat/xmlparse.c \
|
||||
expat/xmlrole.c \
|
||||
|
|
|
@ -33,6 +33,7 @@ class Python3Recipe(Recipe):
|
|||
self.apply_patch("posixmodule.patch")
|
||||
self.apply_patch("dynload_shlib.patch")
|
||||
self.apply_patch("disable_explicit_blake2.patch")
|
||||
self.apply_patch("disable_mremap.patch")
|
||||
self.apply_patch("pyconfig_detection.patch")
|
||||
self.copy_file("ModulesSetup", "Modules/Setup.local")
|
||||
self.append_file("ModulesSetup.mobile", "Modules/Setup.local")
|
||||
|
@ -172,7 +173,7 @@ class Python3Recipe(Recipe):
|
|||
# cleanup python libraries
|
||||
with cd(join(
|
||||
self.ctx.dist_dir, "root", "python3", "lib", "python3.8")):
|
||||
sh.rm("-rf", "wsgiref", "curses", "idlelib", "lib2to3",
|
||||
sh.rm("-rf", "curses", "idlelib", "lib2to3",
|
||||
"ensurepip", "turtledemo", "lib-dynload", "venv",
|
||||
"pydoc_data")
|
||||
sh.find(".", "-path", "*/test*/*", "-delete")
|
||||
|
|
34
kivy_ios/recipes/python3/disable_mremap.patch
Normal file
34
kivy_ios/recipes/python3/disable_mremap.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
--- a/Modules/mmapmodule.c 2020-09-28 21:41:42.000000000 +0100
|
||||
+++ b/Modules/mmapmodule.c 2020-09-28 21:42:35.000000000 +0100
|
||||
@@ -527,11 +527,11 @@
|
||||
#endif /* MS_WINDOWS */
|
||||
|
||||
#ifdef UNIX
|
||||
-#ifndef HAVE_MREMAP
|
||||
+//#ifndef HAVE_MREMAP
|
||||
PyErr_SetString(PyExc_SystemError,
|
||||
"mmap: resizing not available--no mremap()");
|
||||
return NULL;
|
||||
-#else
|
||||
+/*#else
|
||||
void *newmap;
|
||||
|
||||
if (self->fd != -1 && ftruncate(self->fd, self->offset + new_size) == -1) {
|
||||
@@ -546,7 +546,7 @@
|
||||
newmap = mremap(self->data, self->size, self->data, new_size, 0);
|
||||
#else
|
||||
newmap = mremap(self->data, self->size, new_size, 0);
|
||||
-#endif /* __NetBSD__ */
|
||||
+#endif
|
||||
#endif
|
||||
if (newmap == (void *)-1)
|
||||
{
|
||||
@@ -556,7 +556,7 @@
|
||||
self->data = newmap;
|
||||
self->size = new_size;
|
||||
Py_RETURN_NONE;
|
||||
-#endif /* HAVE_MREMAP */
|
||||
+#endif */
|
||||
#endif /* UNIX */
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@ from kivy_ios.toolchain import PythonRecipe, shprint
|
|||
|
||||
|
||||
class PyYamlRecipe(PythonRecipe):
|
||||
version = "3.12"
|
||||
version = "5.3.1"
|
||||
url = "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-{version}.tar.gz"
|
||||
depends = ["python"]
|
||||
|
||||
|
@ -15,8 +15,8 @@ class PyYamlRecipe(PythonRecipe):
|
|||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python")
|
||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.7', 'site-packages')
|
||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
||||
|
|
|
@ -1,31 +1,23 @@
|
|||
from kivy_ios.toolchain import CythonRecipe
|
||||
# pure-python package, this can be removed when we'll support any python package
|
||||
import os
|
||||
import sh
|
||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
||||
|
||||
|
||||
class SetuptoolsRecipe(CythonRecipe):
|
||||
name = "setuptools"
|
||||
version = "18.5"
|
||||
url = "https://pypi.python.org/packages/source/s/setuptools/setuptools-{version}.tar.gz"
|
||||
depends = ["python", "host_setuptools"]
|
||||
cythonize = False
|
||||
|
||||
def get_recipe_env(self, arch):
|
||||
env = super(SetuptoolsRecipe, self).get_recipe_env(arch)
|
||||
env["PYTHONPATH"] = self.get_build_dir(arch.arch) + "/iosbuild/lib/python3.8/site-packages"
|
||||
return env
|
||||
class SetuptoolsRecipe(PythonRecipe):
|
||||
version = "41.0.0"
|
||||
url = "https://pypi.python.org/packages/source/s/setuptools/setuptools-{version}.zip"
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
import sh
|
||||
from toolchain import shprint
|
||||
from os import chdir
|
||||
arch = self.filtered_archs[0]
|
||||
|
||||
build_env = arch.get_env()
|
||||
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
chdir(build_dir)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", self.ctx.install_dir, "--old-and-unmanageable")
|
||||
# "--single-version-externally-managed", "--root", "/", "-O2")
|
||||
build_env = arch.get_env()
|
||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
||||
recipe = SetuptoolsRecipe()
|
||||
recipe = ChardetRecipe()
|
||||
|
|
|
@ -5,7 +5,7 @@ import sh, os
|
|||
class SixRecipe(PythonRecipe):
|
||||
version = "1.11.0"
|
||||
url = "https://pypi.python.org/packages/source/s/six/six-{version}.tar.gz"
|
||||
depends = ["python", "setuptools"]
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
|
@ -13,7 +13,7 @@ class SixRecipe(PythonRecipe):
|
|||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
|
|
22
kivy_ios/recipes/yarl/__init__.py
Normal file
22
kivy_ios/recipes/yarl/__init__.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
# pure-python package, this can be removed when we'll support any python package
|
||||
import os
|
||||
import sh
|
||||
from kivy_ios.toolchain import PythonRecipe, shprint
|
||||
|
||||
|
||||
class YarlRecipe(PythonRecipe):
|
||||
version = "1.3.0"
|
||||
url = "https://pypi.python.org/packages/source/y/yarl/yarl-{version}.tar.gz"
|
||||
depends = ["python"]
|
||||
|
||||
def install(self):
|
||||
arch = list(self.filtered_archs)[0]
|
||||
build_dir = self.get_build_dir(arch.arch)
|
||||
os.chdir(build_dir)
|
||||
hostpython = sh.Command(self.ctx.hostpython)
|
||||
build_env = arch.get_env()
|
||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
recipe = YarlRecipe()
|
|
@ -16,7 +16,7 @@ class ZbarLightRecipe(Recipe):
|
|||
|
||||
def get_zbar_env(self, arch):
|
||||
build_env = arch.get_env()
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python")
|
||||
dest_dir = join(self.ctx.dist_dir, "root", "python3")
|
||||
build_env["IOSROOT"] = self.ctx.root_dir
|
||||
build_env["IOSSDKROOT"] = arch.sysroot
|
||||
build_env["LDSHARED"] = join(self.ctx.root_dir, "tools", "liblink")
|
||||
|
|
1
pybuilddir.txt
Normal file
1
pybuilddir.txt
Normal file
|
@ -0,0 +1 @@
|
|||
build/lib.ios-x86_64-3.7
|
Loading…
Reference in a new issue