work on twisted related recipes

This commit is contained in:
Robert Niederreiter 2016-10-14 14:07:10 +02:00
parent bbd1dadb16
commit d4cb02ccf1
11 changed files with 128 additions and 35 deletions

View file

@ -1,21 +1,10 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
from toolchain import PythonRecipe
class AutobahnRecipe(PythonRecipe):
name = "autobahn"
version = "0.16.0"
url = "https://github.com/crossbario/autobahn-python/archive/v{version}.zip"
#depends = ["python", "setuptools", "zope_interface", "twisted"]
depends = ["python", "setuptools", "zope_interface", "twisted"]
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)
depends = ["twisted", "six", "txaio"]
recipe = AutobahnRecipe()

15
recipes/cffi/__init__.py Normal file
View file

@ -0,0 +1,15 @@
from toolchain import CythonRecipe
class CffiRecipe(CythonRecipe):
name = "cffi"
version = "1.8.3"
url = (
"https://pypi.python.org/packages/0a/f3/"
"686af8873b70028fccf67b15c78fd4e4667a3da995007afc71e786d61b0a/"
"cffi-{version}.tar.gz"
)
depends = ["libffi", "pycparser"]
cythonize = False
recipe = CffiRecipe()

View file

@ -0,0 +1,16 @@
from toolchain import CythonRecipe
class CryptographyRecipe(CythonRecipe):
name = "cryptography"
version = "1.5.2"
url = (
"https://pypi.python.org/packages/03/1a/"
"60984cb85cc38c4ebdfca27b32a6df6f1914959d8790f5a349608c78be61/"
"cryptography-{version}.tar.gz"
)
depends = ["host_setuptools", "six", "idna", "pyasn1"]
cythonize = False
recipe = CryptographyRecipe()

View file

@ -7,18 +7,15 @@ import shutil
class HostSetuptools(Recipe):
depends = ["hostpython"]
depends = ["openssl", "hostpython"]
archs = ["x86_64"]
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)
# Installed setuptools egg should be extracted in hostpython
# site-packages(v28.3.0)
shprint(hostpython, "./ez_setup.py")
recipe = HostSetuptools()

14
recipes/idna/__init__.py Normal file
View file

@ -0,0 +1,14 @@
from toolchain import PythonRecipe
class IdnaRecipe(PythonRecipe):
name = "idna"
version = "2.1"
url = (
"https://pypi.python.org/packages/fb/84/"
"8c27516fbaa8147acd2e431086b473c453c428e24e8fb99a1d89ce381851/"
"idna-{version}.tar.gz"
)
depends = ["python"]
recipe = IdnaRecipe()

View file

@ -0,0 +1,14 @@
from toolchain import PythonRecipe
class Pyasn1Recipe(PythonRecipe):
name = "pyasn1"
version = "0.1.9"
url = (
"https://pypi.python.org/packages/f7/83/"
"377e3dd2e95f9020dbd0dfd3c47aaa7deebe3c68d3857a4e51917146ae8b/"
"pyasn1-{version}.tar.gz"
)
depends = ["python"]
recipe = Pyasn1Recipe()

View file

@ -0,0 +1,14 @@
from toolchain import PythonRecipe
class PycparserRecipe(PythonRecipe):
name = "pycparser"
version = "2.14"
url = (
"https://pypi.python.org/packages/6d/31/"
"666614af3db0acf377876d48688c5d334b6e493b96d21aa7d332169bee50/"
"pycparser-{version}.tar.gz"
)
depends = ["python"]
recipe = PycparserRecipe()

View file

@ -0,0 +1,14 @@
from toolchain import PythonRecipe
class PyOpenSSLRecipe(PythonRecipe):
name = "OpenSSL"
version = "16.1.0"
url = (
"https://pypi.python.org/packages/15/1e/"
"79c75db50e57350a7cefb70b110255757e9abd380a50ebdc0cfd853b7450/"
"pyOpenSSL-{version}.tar.gz"
)
depends = ["openssl", "six", "cryptography"]
recipe = PyOpenSSLRecipe()

14
recipes/six/__init__.py Normal file
View file

@ -0,0 +1,14 @@
from toolchain import PythonRecipe
class SixRecipe(PythonRecipe):
name = "six"
version = "1.10.0"
url = (
"https://pypi.python.org/packages/b3/b2/"
"238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/"
"six-{version}.tar.gz"
)
depends = ["python"]
recipe = SixRecipe()

View file

@ -1,20 +1,12 @@
from toolchain import PythonRecipe, shprint
from os.path import join
import sh, os
from toolchain import CythonRecipe
class TwistedRecipe(PythonRecipe):
class TwistedRecipe(CythonRecipe):
name = "twisted"
version = "16.1.1"
url = "https://github.com/twisted/twisted/archive/twisted-{version}.zip"
depends = ["python", "zope_interface", "openssl"]
depends = ["pyopenssl", "zope_interface"]
cythonize = False
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 = TwistedRecipe()

14
recipes/txaio/__init__.py Normal file
View file

@ -0,0 +1,14 @@
from toolchain import PythonRecipe
class TxaioRecipe(PythonRecipe):
name = "txaio"
version = "2.5.1"
url = (
"https://pypi.python.org/packages/45/e1/"
"f7d88767d65dbfc20d4b4aa0dad657dbbe8ca629ead2bef24da04630a12a/"
"txaio-{version}.tar.gz"
)
depends = ["six"]
recipe = TxaioRecipe()