Skip to content

Commit f8e5c05

Browse files
committed
⬆️ Bump sh module to v2, refs #2746
1 parent e982301 commit f8e5c05

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

pythonforandroid/build.py

+3-3
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/recipe.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,7 @@ def unpack(self, arch):
467467
elif extraction_filename.endswith(
468468
('.tar.gz', '.tgz', '.tar.bz2', '.tbz2', '.tar.xz', '.txz')):
469469
sh.tar('xf', extraction_filename)
470-
root_directory = sh.tar('tf', extraction_filename).stdout.decode(
471-
'utf-8').split('\n')[0].split('/')[0]
470+
root_directory = sh.tar('tf', extraction_filename).split('\n')[0].split('/')[0]
472471
if root_directory != basename(directory_name):
473472
move(root_directory, directory_name)
474473
else:

pythonforandroid/recipes/python3/__init__.py

+1-1
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'))().strip()
324324

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

setup.py

+1-1
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)