Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions pythonforandroid/recipes/libzmq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@


class LibZMQRecipe(Recipe):
version = '4.1.4'
url = 'http://download.zeromq.org/zeromq-{version}.tar.gz'
version = '4.3.1'
url = 'https://github.com/zeromq/libzmq/releases/download/v{version}/zeromq-{version}.zip'
depends = []

def should_build(self, arch):
Expand All @@ -31,14 +31,14 @@ def build_arch(self, arch):
bash = sh.Command('sh')
shprint(
bash, './configure',
'--host=arm-linux-androideabi',
'--host={}'.format(arch.command_prefix),
'--without-documentation',
'--prefix={}'.format(prefix),
'--with-libsodium=no',
_env=env)
shprint(sh.make, _env=env)
shprint(sh.make, 'install', _env=env)
shutil.copyfile('.libs/libzmq.so', join(
shutil.copyfile('src/.libs/libzmq.so', join(
self.ctx.get_libs_dir(arch.arch), 'libzmq.so'))

bootstrap_obj_dir = join(self.ctx.bootstrap.build_dir, 'obj', 'local', arch.arch)
Expand All @@ -55,6 +55,9 @@ def build_arch(self, arch):
self.ctx.get_libs_dir(arch.arch)
)

def get_include_dirs(self, arch):
return [join(self.get_build_dir(arch.arch), 'include')]

def get_recipe_env(self, arch):
# XXX should stl be configuration for the toolchain itself?
env = super(LibZMQRecipe, self).get_recipe_env(arch)
Expand All @@ -69,6 +72,8 @@ def get_recipe_env(self, arch):
env['CXXFLAGS'] += ' -lgnustl_shared'
env['LDFLAGS'] += ' -L{}/sources/cxx-stl/gnu-libstdc++/{}/libs/{}'.format(
self.ctx.ndk_dir, self.ctx.toolchain_version, arch)
env['CXXFLAGS'] += ' --sysroot={}/platforms/android-{}/arch-arm'.format(
self.ctx.ndk_dir, self.ctx.ndk_api)
return env


Expand Down
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/pyzmq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def build_cython_components(self, arch):
[global]
zmq_prefix = {}
skip_check_zmq = True
""".format(libzmq_prefix))
""".format(libzmq_prefix).encode())

return super(PyZMQRecipe, self).build_cython_components(arch)

Expand Down