1
1
from pythonforandroid .recipe import PythonRecipe
2
2
from pythonforandroid .toolchain import current_directory
3
+ from pythonforandroid .toolchain import shprint
4
+ from os .path import join , exists
3
5
import sh
4
6
5
7
@@ -10,9 +12,19 @@ class ZopeInterfaceRecipe(PythonRecipe):
10
12
url = 'https://pypi.python.org/packages/source/z/zope.interface/zope.interface-{version}.tar.gz'
11
13
site_packages_name = 'zope.interface'
12
14
13
- depends = [('python2' , 'python3crystax' )]
14
15
patches = ['no_tests.patch' ]
15
16
17
+ def build_arch (self , arch ):
18
+ super (ZopeInterfaceRecipe , self ).build_arch (arch )
19
+ # The zope.interface module lacks of the __init__.py file in one of his
20
+ # folders, that leads into: ImportError: No module named zope.interface
21
+ # Here we create the missing `init` file (this affects to version 4.1.3
22
+ # (is this also true for latest versions of zope.interface?)
23
+ zope_init_file = join (self .ctx .get_site_packages_dir (arch .arch ),
24
+ 'zope' , '__init__.py' )
25
+ if not exists (zope_init_file ):
26
+ shprint (sh .touch , zope_init_file )
27
+
16
28
def prebuild_arch (self , arch ):
17
29
super (ZopeInterfaceRecipe , self ).prebuild_arch (arch )
18
30
with current_directory (self .get_build_dir (arch .arch )):
0 commit comments