Skip to content

Commit 511ff39

Browse files
committed
⬆️ Bump to sh 2
1 parent f526e6b commit 511ff39

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

pythonforandroid/build.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@
2929
def get_targets(sdk_dir):
3030
if exists(join(sdk_dir, 'cmdline-tools', 'latest', 'bin', 'avdmanager')):
3131
avdmanager = sh.Command(join(sdk_dir, 'cmdline-tools', 'latest', 'bin', 'avdmanager'))
32-
targets = avdmanager('list', 'target').stdout.decode('utf-8').split('\n')
32+
targets = avdmanager('list', 'target').split('\n')
3333

3434
elif exists(join(sdk_dir, 'tools', 'bin', 'avdmanager')):
3535
avdmanager = sh.Command(join(sdk_dir, 'tools', 'bin', 'avdmanager'))
36-
targets = avdmanager('list', 'target').stdout.decode('utf-8').split('\n')
36+
targets = avdmanager('list', 'target').split('\n')
3737
elif exists(join(sdk_dir, 'tools', 'android')):
3838
android = sh.Command(join(sdk_dir, 'tools', 'android'))
39-
targets = android('list').stdout.decode('utf-8').split('\n')
39+
targets = android('list').split('\n')
4040
else:
4141
raise BuildInterruptingException(
4242
'Could not find `android` or `sdkmanager` binaries in Android SDK',

pythonforandroid/logger.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ def shprint(command, *args, **kwargs):
166166
output = command(*args, **kwargs)
167167
for line in output:
168168
if isinstance(line, bytes):
169+
# TODO: adjust?
169170
line = line.decode('utf-8', errors='replace')
170171
if logger.level > logging.DEBUG:
171172
if full_debug:

pythonforandroid/recipe.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,8 +469,7 @@ def unpack(self, arch):
469469
elif extraction_filename.endswith(
470470
('.tar.gz', '.tgz', '.tar.bz2', '.tbz2', '.tar.xz', '.txz')):
471471
sh.tar('xf', extraction_filename)
472-
root_directory = sh.tar('tf', extraction_filename).stdout.decode(
473-
'utf-8').split('\n')[0].split('/')[0]
472+
root_directory = sh.tar('tf', extraction_filename).split('\n')[0].split('/')[0]
474473
if root_directory != basename(directory_name):
475474
move(root_directory, directory_name)
476475
else:

pythonforandroid/recipes/python3/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def build_arch(self, arch):
320320

321321
android_build = sh.Command(
322322
join(recipe_build_dir,
323-
'config.guess'))().stdout.strip().decode('utf-8')
323+
'config.guess'))()
324324

325325
with current_directory(build_dir):
326326
if not exists('config.status'):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# https://github.com/kivy/buildozer/issues/722
2222
install_reqs = [
2323
'appdirs', 'colorama>=0.3.3', 'jinja2',
24-
'sh>=1.10, <2.0; sys_platform!="win32"',
24+
'sh>=2, <3.0; sys_platform!="win32"',
2525
'build', 'toml', 'packaging', 'setuptools', 'wheel~=0.43.0'
2626
]
2727
# (build and toml are used by pythonpackage.py)

0 commit comments

Comments
 (0)