Skip to content

Commit 1af2bcf

Browse files
committed
Added twisted, setuptools and zope_interface
1 parent c3736ee commit 1af2bcf

File tree

3 files changed

+77
-0
lines changed

3 files changed

+77
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
from pythonforandroid.toolchain import (
3+
PythonRecipe,
4+
Recipe,
5+
current_directory,
6+
info,
7+
shprint,
8+
)
9+
from os.path import join
10+
import sh
11+
12+
13+
class SetuptoolsRecipe(PythonRecipe):
14+
version = '18.3.1'
15+
url = 'https://pypi.python.org/packages/source/s/setuptools/setuptools-{version}.tar.gz'
16+
17+
depends = ['python2']
18+
19+
call_hostpython_via_targetpython = False
20+
install_in_hostpython = True
21+
22+
23+
recipe = SetuptoolsRecipe()
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
import glob
3+
from pythonforandroid.toolchain import (
4+
CythonRecipe,
5+
Recipe,
6+
current_directory,
7+
info,
8+
shprint,
9+
)
10+
from os.path import join
11+
import sh
12+
13+
14+
class TwistedRecipe(CythonRecipe):
15+
version = '15.4.0'
16+
url = 'https://pypi.python.org/packages/source/T/Twisted/Twisted-{version}.tar.bz2'
17+
18+
depends = ['setuptools', 'zope_interface']
19+
20+
call_hostpython_via_targetpython = False
21+
install_in_hostpython = True
22+
23+
def prebuild_arch(self, arch):
24+
super(TwistedRecipe, self).prebuild_arch(arch)
25+
# TODO Need to whitelist tty.pyo and termios.so here
26+
print('Should remove twisted tests etc. here, but skipping for now')
27+
28+
def get_recipe_env(self, arch):
29+
env = super(TwistedRecipe, self).get_recipe_env(arch)
30+
# We add BUILDLIB_PATH to PYTHONPATH so twisted can find _io.so
31+
env['PYTHONPATH'] = ':'.join([
32+
self.ctx.get_site_packages_dir(),
33+
env['BUILDLIB_PATH'],
34+
])
35+
return env
36+
37+
recipe = TwistedRecipe()
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
from pythonforandroid.toolchain import PythonRecipe, shprint, current_directory
3+
from os.path import join
4+
import sh
5+
6+
7+
class ZopeRecipe(PythonRecipe):
8+
version = '4.1.2'
9+
url = 'https://pypi.python.org/packages/source/z/zope.interface/zope.interface-{version}.tar.gz'
10+
11+
depends = ['python2']
12+
13+
def build_arch(self, arch):
14+
super(ZopeRecipe, self).build_arch(arch)
15+
print('Should remove zope tests etc. here, but skipping for now')
16+
17+
recipe = ZopeRecipe()

0 commit comments

Comments
 (0)