File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
pythonforandroid/recipes/protobuf_cpp Expand file tree Collapse file tree 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):
9898 # Install python bindings
9999 self .install_python_package (arch )
100100
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+
101105 def install_python_package (self , arch ):
102106 env = self .get_recipe_env (arch )
103107
@@ -132,11 +136,10 @@ def get_recipe_env(self, arch):
132136 env ['CXXFLAGS' ] += ' -frtti'
133137 env ['CXXFLAGS' ] += ' -fexceptions'
134138 env ['LDFLAGS' ] += (
139+ ' -lgnustl_shared -landroid -llog' +
135140 ' -L' + self .ctx .ndk_dir +
136141 '/sources/cxx-stl/gnu-libstdc++/' + self .ctx .toolchain_version +
137142 '/libs/' + arch .arch )
138- env ['LIBS' ] = env .get ('LIBS' , '' ) + ' -lgnustl_shared -landroid -llog'
139-
140143 return env
141144
142145
You can’t perform that action at this time.
0 commit comments