MCPcopy Index your code
hub / github.com/kivy/python-for-android / strip_libraries

Method strip_libraries

pythonforandroid/bootstrap.py:419–439  ·  view source on GitHub ↗
(self, arch)

Source from the content-addressed store, hash-verified

417 shprint(sh.cp, '-a', *so_files, so_tgt_dir)
418
419 def strip_libraries(self, arch):
420 info('Stripping libraries')
421 env = arch.get_env()
422 tokens = shlex.split(env['STRIP'])
423 strip = sh.Command(tokens[0])
424 if len(tokens) > 1:
425 strip = strip.bake(tokens[1:])
426
427 libs_dir = join(self.dist_dir, f'_python_bundle__{arch.arch}',
428 '_python_bundle', 'modules')
429 filens = shprint(sh.find, libs_dir, join(self.dist_dir, 'libs'),
430 '-iname', '*.so', _env=env).stdout.decode('utf-8')
431
432 logger.info('Stripping libraries in private dir')
433 for filen in filens.split('\n'):
434 if not filen:
435 continue # skip the last ''
436 try:
437 strip(filen, _env=env)
438 except sh.ErrorReturnCode_1:
439 logger.debug('Failed to strip ' + filen)
440
441 def fry_eggs(self, sitepackages):
442 info('Frying eggs in {}'.format(sitepackages))

Calls 2

shprintFunction · 0.90
get_envMethod · 0.80

Tested by 1

test_bootstrap_stripMethod · 0.64