From d79e7cf1a9113f7f0d5d84296ca63522e9d88be8 Mon Sep 17 00:00:00 2001 From: Robert Niederreiter Date: Fri, 14 Oct 2016 10:31:18 +0200 Subject: [PATCH] fix host_setuptools reset kivy download url --- recipes/host_setuptools/__init__.py | 18 ++---------------- recipes/host_setuptools/setuptools/README.rst | 1 + recipes/hostpython/ModulesSetup.openssl | 1 + recipes/hostpython/__init__.py | 12 ++++++++++-- recipes/kivy/__init__.py | 2 +- 5 files changed, 15 insertions(+), 19 deletions(-) create mode 100644 recipes/host_setuptools/setuptools/README.rst create mode 100644 recipes/hostpython/ModulesSetup.openssl diff --git a/recipes/host_setuptools/__init__.py b/recipes/host_setuptools/__init__.py index ccd0ffe..cc687be 100644 --- a/recipes/host_setuptools/__init__.py +++ b/recipes/host_setuptools/__init__.py @@ -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() diff --git a/recipes/host_setuptools/setuptools/README.rst b/recipes/host_setuptools/setuptools/README.rst new file mode 100644 index 0000000..f244a47 --- /dev/null +++ b/recipes/host_setuptools/setuptools/README.rst @@ -0,0 +1 @@ +Make toolchain happy diff --git a/recipes/hostpython/ModulesSetup.openssl b/recipes/hostpython/ModulesSetup.openssl new file mode 100644 index 0000000..331ec43 --- /dev/null +++ b/recipes/hostpython/ModulesSetup.openssl @@ -0,0 +1 @@ +_ssl _ssl.c -DUSE_SSL -lssl -lcrypto diff --git a/recipes/hostpython/__init__.py b/recipes/hostpython/__init__.py index e0e1588..0fc7274 100644 --- a/recipes/hostpython/__init__.py +++ b/recipes/hostpython/__init__.py @@ -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")), diff --git a/recipes/kivy/__init__.py b/recipes/kivy/__init__.py index 3da11e7..c941f26 100644 --- a/recipes/kivy/__init__.py +++ b/recipes/kivy/__init__.py @@ -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"]