2016-01-26 22:37:33 +01:00
|
|
|
# pure-python package, this can be removed when we'll support any python package
|
2016-02-14 14:42:47 +01:00
|
|
|
import os
|
|
|
|
import sh
|
2020-05-03 16:23:08 +02:00
|
|
|
from kivy_ios.toolchain import PythonRecipe, shprint
|
2016-01-26 22:37:33 +01:00
|
|
|
|
|
|
|
|
|
|
|
class PyYamlRecipe(PythonRecipe):
|
2020-09-28 23:29:32 +02:00
|
|
|
version = "5.3.1"
|
2016-01-26 22:37:33 +01:00
|
|
|
url = "https://pypi.python.org/packages/source/P/PyYAML/PyYAML-{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()
|
2020-09-28 23:29:32 +02:00
|
|
|
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python3")
|
|
|
|
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python3.8', 'site-packages')
|
2016-01-26 22:37:33 +01:00
|
|
|
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
|
|
|
|
2020-04-25 18:28:16 +02:00
|
|
|
|
2016-01-26 22:37:33 +01:00
|
|
|
recipe = PyYamlRecipe()
|