From 3a3cb2266669309f58e644c6f694b3ab9da86868 Mon Sep 17 00:00:00 2001 From: Stepan Rakhimov Date: Sun, 14 Feb 2016 14:49:25 +0100 Subject: [PATCH] my failed try to fix setuptools --- recipes/host_setuptools/__init__.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/recipes/host_setuptools/__init__.py b/recipes/host_setuptools/__init__.py index 95e6ff9..ccd0ffe 100644 --- a/recipes/host_setuptools/__init__.py +++ b/recipes/host_setuptools/__init__.py @@ -8,14 +8,26 @@ import shutil class HostSetuptools(Recipe): depends = ["hostpython"] - archs = 'i386' + archs = ["x86_64"] url = "" def prebuild_arch(self, arch): hostpython = sh.Command(self.ctx.hostpython) sh.curl("-O", "https://bootstrap.pypa.io/ez_setup.py") - shprint(hostpython, "./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) recipe = HostSetuptools() - -