Skip to content

Commit 8cd69dc

Browse files
committed
Simplify strip command construction and use shlex.split
1 parent 73d13ad commit 8cd69dc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pythonforandroid/bootstrap.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from os.path import (join, dirname, isdir, normpath, splitext, basename)
22
from os import listdir, walk, sep
33
import sh
4+
import shlex
45
import glob
56
import importlib
67
import os
@@ -263,8 +264,8 @@ def strip_libraries(self, arch):
263264
info('Python was loaded from CrystaX, skipping strip')
264265
return
265266
env = arch.get_env()
266-
tokens = env['STRIP'].split(' ')
267-
strip = reduce(lambda cmd, t: cmd.bake(t), tokens, sh.Command(tokens.pop(0)))
267+
tokens = shlex.split(env['STRIP'])
268+
strip = sh.Command(tokens[0]).bake(tokens[1:])
268269

269270
libs_dir = join(self.dist_dir, '_python_bundle',
270271
'_python_bundle', 'modules')

0 commit comments

Comments
 (0)