2020-09-25 01:06:37 +02:00
|
|
|
from kivy_ios.toolchain import CythonRecipe
|
2018-06-02 10:39:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
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)
|
2020-09-25 01:06:37 +02:00
|
|
|
env["PYTHONPATH"] = self.get_build_dir(arch.arch) + "/iosbuild/lib/python3.8/site-packages"
|
2018-06-02 10:39:18 +02:00
|
|
|
return env
|
|
|
|
|
|
|
|
def install(self):
|
|
|
|
import sh
|
|
|
|
from toolchain import shprint
|
|
|
|
from os import chdir
|
|
|
|
arch = self.filtered_archs[0]
|
|
|
|
|
|
|
|
build_env = arch.get_env()
|
|
|
|
|
|
|
|
build_dir = self.get_build_dir(arch.arch)
|
|
|
|
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")
|
|
|
|
|
|
|
|
|
|
|
|
recipe = SetuptoolsRecipe()
|