1
1
from pythonforandroid .recipe import PythonRecipe
2
2
from pythonforandroid .toolchain import current_directory
3
+ from os .path import join
3
4
import sh
4
5
5
6
@@ -9,10 +10,18 @@ class ZopeInterfaceRecipe(PythonRecipe):
9
10
version = '4.1.3'
10
11
url = 'https://pypi.python.org/packages/source/z/zope.interface/zope.interface-{version}.tar.gz'
11
12
site_packages_name = 'zope.interface'
12
-
13
- depends = [('python2' , 'python3crystax' )]
13
+ depends = ['setuptools' ]
14
14
patches = ['no_tests.patch' ]
15
15
16
+ def build_arch (self , arch ):
17
+ super (ZopeInterfaceRecipe , self ).build_arch (arch )
18
+ # The zope.interface module lacks of the __init__.py file in one of his
19
+ # folders (once is installed), that leads into an ImportError.
20
+ # Here we intentionally apply a patch to solve that, so, in case that
21
+ # this is solved in the future an error will be triggered
22
+ zope_install = join (self .ctx .get_site_packages_dir (arch .arch ), 'zope' )
23
+ self .apply_patch ('fix-init.patch' , arch .arch , build_dir = zope_install )
24
+
16
25
def prebuild_arch (self , arch ):
17
26
super (ZopeInterfaceRecipe , self ).prebuild_arch (arch )
18
27
with current_directory (self .get_build_dir (arch .arch )):
0 commit comments