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
4 changes: 0 additions & 4 deletions ci/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ class TargetPython(Enum):
'hostpython3crystax',
# https://github.com/kivy/python-for-android/issues/1354
'kiwisolver',
# https://github.com/kivy/python-for-android/issues/1399
'libglob',
'libmysqlclient',
'libsecp256k1',
'libtribler',
Expand Down Expand Up @@ -69,8 +67,6 @@ class TargetPython(Enum):
# enum34 is not compatible with Python 3.6 standard library
# https://stackoverflow.com/a/45716067/185510
'enum34',
# https://github.com/kivy/python-for-android/issues/1399
'libglob',
# build_dir = glob.glob('build/lib.*')[0]
# IndexError: list index out of range
'secp256k1',
Expand Down
26 changes: 8 additions & 18 deletions pythonforandroid/recipes/libglob/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,32 +45,22 @@ def build_arch(self, arch):
if not exists(path):
info("creating {}".format(path))
shprint(sh.mkdir, '-p', path)
cli = env['CC'].split()
cc = sh.Command(cli[0])
cli = env['CC'].split()[0]
# makes sure first CC command is the compiler rather than ccache, refs:
# https://github.com/kivy/python-for-android/issues/1399
if 'ccache' in cli:
cli = env['CC'].split()[1]
cc = sh.Command(cli)

with current_directory(self.get_build_dir(arch.arch)):
cflags = env['CFLAGS'].split()
cflags.extend(['-I.', '-c', '-l.', 'glob.c', '-I.']) # , '-o', 'glob.o'])
cflags.extend(['-I.', '-c', '-l.', 'glob.c', '-I.'])
shprint(cc, *cflags, _env=env)

cflags = env['CFLAGS'].split()
srindex = cflags.index('--sysroot')
if srindex:
cflags[srindex+1] = self.ctx.ndk_platform
cflags.extend(['-shared', '-I.', 'glob.o', '-o', 'libglob.so'])
cflags.extend(env['LDFLAGS'].split())
shprint(cc, *cflags, _env=env)

shprint(sh.cp, 'libglob.so', join(self.ctx.libs_dir, arch.arch))
shprint(sh.cp, "libglob.so", join(self.ctx.get_python_install_dir(), 'lib'))
# drop header in to the Python include directory
shprint(sh.cp, "glob.h", join(self.ctx.get_python_install_dir(),
'include/python{}'.format(
self.ctx.python_recipe.version[0:3]
)
)
)
include_path = join(self.ctx.python_recipe.get_build_dir(arch.arch), 'Include')
shprint(sh.cp, "glob.h", include_path)


recipe = LibGlobRecipe()