Install pure python packages like werkzeug
This commit is contained in:
parent
d4cb02ccf1
commit
1c37a80b81
7 changed files with 112 additions and 6 deletions
|
@ -1,4 +1,8 @@
|
|||
from os.path import join
|
||||
from toolchain import PythonRecipe
|
||||
from toolchain import shprint
|
||||
import os
|
||||
import sh
|
||||
|
||||
|
||||
class AutobahnRecipe(PythonRecipe):
|
||||
|
@ -7,4 +11,16 @@ class AutobahnRecipe(PythonRecipe):
|
|||
url = "https://github.com/crossbario/autobahn-python/archive/v{version}.zip"
|
||||
depends = ["twisted", "six", "txaio"]
|
||||
|
||||
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")
|
||||
pythonpath = join(dest_dir, 'lib', 'python2.7', 'site-packages')
|
||||
build_env['PYTHONPATH'] = pythonpath
|
||||
args = [hostpython, "setup.py", "install", "--prefix", dest_dir]
|
||||
shprint(*args, _env=build_env)
|
||||
|
||||
recipe = AutobahnRecipe()
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
from os.path import join
|
||||
from toolchain import PythonRecipe
|
||||
from toolchain import shprint
|
||||
import os
|
||||
import sh
|
||||
|
||||
|
||||
class IdnaRecipe(PythonRecipe):
|
||||
name = "idna"
|
||||
version = "2.1"
|
||||
url = (
|
||||
"https://pypi.python.org/packages/fb/84/"
|
||||
|
@ -11,4 +14,16 @@ class IdnaRecipe(PythonRecipe):
|
|||
)
|
||||
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")
|
||||
pythonpath = join(dest_dir, 'lib', 'python2.7', 'site-packages')
|
||||
build_env['PYTHONPATH'] = pythonpath
|
||||
args = [hostpython, "setup.py", "install", "--prefix", dest_dir]
|
||||
shprint(*args, _env=build_env)
|
||||
|
||||
recipe = IdnaRecipe()
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
from os.path import join
|
||||
from toolchain import PythonRecipe
|
||||
from toolchain import shprint
|
||||
import os
|
||||
import sh
|
||||
|
||||
|
||||
class Pyasn1Recipe(PythonRecipe):
|
||||
name = "pyasn1"
|
||||
version = "0.1.9"
|
||||
url = (
|
||||
"https://pypi.python.org/packages/f7/83/"
|
||||
|
@ -11,4 +14,16 @@ class Pyasn1Recipe(PythonRecipe):
|
|||
)
|
||||
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")
|
||||
pythonpath = join(dest_dir, 'lib', 'python2.7', 'site-packages')
|
||||
build_env['PYTHONPATH'] = pythonpath
|
||||
args = [hostpython, "setup.py", "install", "--prefix", dest_dir]
|
||||
shprint(*args, _env=build_env)
|
||||
|
||||
recipe = Pyasn1Recipe()
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
from os.path import join
|
||||
from toolchain import PythonRecipe
|
||||
from toolchain import shprint
|
||||
import os
|
||||
import sh
|
||||
|
||||
|
||||
class PycparserRecipe(PythonRecipe):
|
||||
name = "pycparser"
|
||||
version = "2.14"
|
||||
url = (
|
||||
"https://pypi.python.org/packages/6d/31/"
|
||||
|
@ -11,4 +14,16 @@ class PycparserRecipe(PythonRecipe):
|
|||
)
|
||||
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")
|
||||
pythonpath = join(dest_dir, 'lib', 'python2.7', 'site-packages')
|
||||
build_env['PYTHONPATH'] = pythonpath
|
||||
args = [hostpython, "setup.py", "install", "--prefix", dest_dir]
|
||||
shprint(*args, _env=build_env)
|
||||
|
||||
recipe = PycparserRecipe()
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
from os.path import join
|
||||
from toolchain import PythonRecipe
|
||||
from toolchain import shprint
|
||||
import os
|
||||
import sh
|
||||
|
||||
|
||||
class PyOpenSSLRecipe(PythonRecipe):
|
||||
name = "OpenSSL"
|
||||
version = "16.1.0"
|
||||
url = (
|
||||
"https://pypi.python.org/packages/15/1e/"
|
||||
|
@ -11,4 +14,16 @@ class PyOpenSSLRecipe(PythonRecipe):
|
|||
)
|
||||
depends = ["openssl", "six", "cryptography"]
|
||||
|
||||
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")
|
||||
pythonpath = join(dest_dir, 'lib', 'python2.7', 'site-packages')
|
||||
build_env['PYTHONPATH'] = pythonpath
|
||||
args = [hostpython, "setup.py", "install", "--prefix", dest_dir]
|
||||
shprint(*args, _env=build_env)
|
||||
|
||||
recipe = PyOpenSSLRecipe()
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
from os.path import join
|
||||
from toolchain import PythonRecipe
|
||||
from toolchain import shprint
|
||||
import os
|
||||
import sh
|
||||
|
||||
|
||||
class SixRecipe(PythonRecipe):
|
||||
name = "six"
|
||||
version = "1.10.0"
|
||||
url = (
|
||||
"https://pypi.python.org/packages/b3/b2/"
|
||||
|
@ -11,4 +14,16 @@ class SixRecipe(PythonRecipe):
|
|||
)
|
||||
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")
|
||||
pythonpath = join(dest_dir, 'lib', 'python2.7', 'site-packages')
|
||||
build_env['PYTHONPATH'] = pythonpath
|
||||
args = [hostpython, "setup.py", "install", "--prefix", dest_dir]
|
||||
shprint(*args, _env=build_env)
|
||||
|
||||
recipe = SixRecipe()
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
from os.path import join
|
||||
from toolchain import PythonRecipe
|
||||
from toolchain import shprint
|
||||
import os
|
||||
import sh
|
||||
|
||||
|
||||
class TxaioRecipe(PythonRecipe):
|
||||
name = "txaio"
|
||||
version = "2.5.1"
|
||||
url = (
|
||||
"https://pypi.python.org/packages/45/e1/"
|
||||
|
@ -11,4 +14,16 @@ class TxaioRecipe(PythonRecipe):
|
|||
)
|
||||
depends = ["six"]
|
||||
|
||||
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")
|
||||
pythonpath = join(dest_dir, 'lib', 'python2.7', 'site-packages')
|
||||
build_env['PYTHONPATH'] = pythonpath
|
||||
args = [hostpython, "setup.py", "install", "--prefix", dest_dir]
|
||||
shprint(*args, _env=build_env)
|
||||
|
||||
recipe = TxaioRecipe()
|
||||
|
|
Loading…
Reference in a new issue