fix host_setuptools

reset kivy download url
This commit is contained in:
Robert Niederreiter 2016-10-14 10:31:18 +02:00
parent d6f2e3f8d2
commit d79e7cf1a9
5 changed files with 15 additions and 19 deletions

View file

@ -9,25 +9,11 @@ import shutil
class HostSetuptools(Recipe):
depends = ["hostpython"]
archs = ["x86_64"]
url = ""
url = "setuptools"
def prebuild_arch(self, arch):
hostpython = sh.Command(self.ctx.hostpython)
sh.curl("-O", "https://bootstrap.pypa.io/ez_setup.py")
dest_dir = join(self.ctx.dist_dir, "root", "python")
build_env = arch.get_env()
build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
# shprint(hostpython, "./ez_setup.py", "--to-dir", dest_dir)
shprint(hostpython, "./ez_setup.py", _env=build_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", "python")
# build_env['PYTHONPATH'] = join(dest_dir, 'lib', 'python2.7', 'site-packages')
# shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
shprint(hostpython, "./ez_setup.py")
recipe = HostSetuptools()

View file

@ -0,0 +1 @@
Make toolchain happy

View file

@ -0,0 +1 @@
_ssl _ssl.c -DUSE_SSL -lssl -lcrypto

View file

@ -8,7 +8,8 @@ import shutil
class HostpythonRecipe(Recipe):
version = "2.7.1"
url = "https://www.python.org/ftp/python/{version}/Python-{version}.tar.bz2"
depends = ["hostlibffi", ]
depends = ["hostlibffi"]
optional_depends = ["openssl"]
archs = ["x86_64"]
def init_with_ctx(self, ctx):
@ -19,13 +20,15 @@ class HostpythonRecipe(Recipe):
print("Global: hostpgen located at {}".format(self.ctx.hostpgen))
def prebuild_arch(self, arch):
if self.has_marker("patched"):
if self.has_marker("patched"):
return
self.copy_file("_scproxy.py", "Lib/_scproxy.py")
self.apply_patch("ssize-t-max.patch")
self.apply_patch("dynload.patch")
self.apply_patch("static-_sqlite3.patch")
self.copy_file("ModulesSetup", "Modules/Setup.local")
if "openssl.build_all" in self.ctx.state:
self.append_file("ModulesSetup.openssl", "Modules/Setup.local")
self.set_marker("patched")
def postbuild_arch(self, arch):
@ -59,6 +62,11 @@ class HostpythonRecipe(Recipe):
"--sysroot={}".format(sdk_path),
"-I{}".format(join(self.ctx.dist_dir, "hostlibffi", "usr", "local", "include"))
])
if "openssl.build_all" in self.ctx.state:
build_env["CFLAGS"] += " -I{}".format(join(self.ctx.dist_dir, "include",
"x86_64", "openssl"))
configure = sh.Command(join(self.build_dir, "configure"))
shprint(configure,
"--prefix={}".format(join(self.ctx.dist_dir, "hostpython")),

View file

@ -4,7 +4,7 @@ from os.path import join
class KivyRecipe(CythonRecipe):
version = "1.9.1"
url = "https://github.com/rnixx/kivy/archive/master.zip"
url = "https://github.com/kivy/kivy/archive/{version}.zip"
library = "libkivy.a"
depends = ["python", "sdl2", "sdl2_image", "sdl2_mixer", "sdl2_ttf", "ios"]
pbx_frameworks = ["OpenGLES", "Accelerate"]