-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix strip in bootstrap #1607
Fix strip in bootstrap #1607
Changes from 5 commits
7a515d0
a2e63c9
73d13ad
8cd69dc
7ad0207
06f2d39
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
from os.path import (join, dirname, isdir, normpath, splitext, basename) | ||
from os import listdir, walk, sep | ||
import sh | ||
import shlex | ||
import glob | ||
import importlib | ||
import os | ||
|
@@ -263,11 +264,10 @@ def strip_libraries(self, arch): | |
info('Python was loaded from CrystaX, skipping strip') | ||
return | ||
env = arch.get_env() | ||
strip = which('arm-linux-androideabi-strip', env['PATH']) | ||
if strip is None: | ||
warning('Can\'t find strip in PATH...') | ||
return | ||
strip = sh.Command(strip) | ||
tokens = shlex.split(env['STRIP']) | ||
strip = sh.Command(tokens[0]) | ||
if len(tokens) > 1: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. have you tested this without the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, you're quite right, I misremembered what list slice syntax would do outside the bounds of the list. It's fine to revert this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Jonast Yes, I tested the
If we want to eliminate this warning, I think we still need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @j-devel oh weird, have never seen that (maybe I got a different version?). In that case definitely keep the check in |
||
strip = strip.bake(tokens[1:]) | ||
|
||
libs_dir = join(self.dist_dir, '_python_bundle', | ||
'_python_bundle', 'modules') | ||
|
@@ -278,6 +278,8 @@ def strip_libraries(self, arch): | |
|
||
logger.info('Stripping libraries in private dir') | ||
for filen in filens.split('\n'): | ||
if not filen: | ||
continue # skip the last '' | ||
try: | ||
strip(filen, _env=env) | ||
except sh.ErrorReturnCode_1: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since
which
is not used anymore, would you mind removing the import to please the CI 🙏There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Sorry about the CI. Thanks for your help.