commit
fe5add1699
4 changed files with 59 additions and 6 deletions
21
recipes/distribute/__init__.py
Normal file
21
recipes/distribute/__init__.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
from toolchain import PythonRecipe, shprint
|
||||
from os.path import join
|
||||
import sh, os
|
||||
|
||||
class DistributeRecipe(PythonRecipe):
|
||||
version = "0.7.3"
|
||||
# url = "https://github.com/mitsuhiko/click/archive/{version}.zip"
|
||||
url = "https://pypi.python.org/packages/source/d/distribute/distribute-{version}.zip"
|
||||
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()
|
||||
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 = DistributeRecipe()
|
|
@ -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()
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ class NumpyRecipe(CythonRecipe):
|
|||
url = "http://pypi.python.org/packages/source/n/numpy/numpy-{version}.tar.gz"
|
||||
library = "libnumpy.a"
|
||||
libraries = ["libnpymath.a", "libnpysort.a"]
|
||||
include_dir = "numpy/core/include"
|
||||
depends = ["python"]
|
||||
pbx_frameworks = ["Accelerate"]
|
||||
cythonize = False
|
||||
|
@ -51,5 +52,3 @@ class NumpyRecipe(CythonRecipe):
|
|||
shutil.rmtree(join(dest_dir, "tests"))
|
||||
|
||||
recipe = NumpyRecipe()
|
||||
|
||||
|
||||
|
|
21
recipes/pyyaml/__init__.py
Normal file
21
recipes/pyyaml/__init__.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
# pure-python package, this can be removed when we'll support any python package
|
||||
import os
|
||||
import sh
|
||||
from toolchain import PythonRecipe, shprint
|
||||
|
||||
class PyYamlRecipe(PythonRecipe):
|
||||
version = "3.11"
|
||||
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()
|
||||
dest_dir = os.path.join(self.ctx.dist_dir, "root", "python")
|
||||
build_env['PYTHONPATH'] = os.path.join(dest_dir, 'lib', 'python2.7', 'site-packages')
|
||||
shprint(hostpython, "setup.py", "install", "--prefix", dest_dir, _env=build_env)
|
||||
|
||||
recipe = PyYamlRecipe()
|
Loading…
Reference in a new issue