File tree 1 file changed +5
-2
lines changed
pythonforandroid/recipes/protobuf_cpp
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,10 @@ def build_arch(self, arch):
98
98
# Install python bindings
99
99
self .install_python_package (arch )
100
100
101
+ # Create __init__.py which is missing (cf. https://github.com/protocolbuffers/protobuf/issues/1296
102
+ # and https://stackoverflow.com/questions/13862562/google-protocol-buffers-not-found-when-trying-to-freeze-python-app)
103
+ open (join (self .ctx .get_site_packages_dir (), 'google' , '__init__.py' ), 'a' ).close ()
104
+
101
105
def install_python_package (self , arch ):
102
106
env = self .get_recipe_env (arch )
103
107
@@ -132,11 +136,10 @@ def get_recipe_env(self, arch):
132
136
env ['CXXFLAGS' ] += ' -frtti'
133
137
env ['CXXFLAGS' ] += ' -fexceptions'
134
138
env ['LDFLAGS' ] += (
139
+ ' -lgnustl_shared -landroid -llog' +
135
140
' -L' + self .ctx .ndk_dir +
136
141
'/sources/cxx-stl/gnu-libstdc++/' + self .ctx .toolchain_version +
137
142
'/libs/' + arch .arch )
138
- env ['LIBS' ] = env .get ('LIBS' , '' ) + ' -lgnustl_shared -landroid -llog'
139
-
140
143
return env
141
144
142
145
You can’t perform that action at this time.
0 commit comments