Catch Python 2.7 deprecation warning

This commit is contained in:
Valentin Niess
2020-04-04 00:48:39 +02:00
parent 999fcf8083
commit 8c5bdaf5b7
5 changed files with 36 additions and 19 deletions

View File

@@ -132,8 +132,8 @@ def execute(appdir, name=None, python_version=None, linux_tag=None,
log('EXTRACT', '%s', os.path.basename(base_image))
urlretrieve(base_image, 'base.AppImage')
os.chmod('base.AppImage', stat.S_IRWXU)
system('./base.AppImage --appimage-extract')
system('mv squashfs-root AppDir')
system(('./base.AppImage', '--appimage-extract'))
system(('mv', 'squashfs-root', 'AppDir'))
# Bundle the desktop file
@@ -212,12 +212,14 @@ def execute(appdir, name=None, python_version=None, linux_tag=None,
# Bundle the requirements
if requirements_list:
system('./AppDir/AppRun -m pip install -U '
'--no-warn-script-location pip')
deprecation = 'DEPRECATION: Python 2.7 reached the end of its life'
system(('./AppDir/AppRun', '-m', 'pip', 'install', '-U',
'--no-warn-script-location', 'pip'), exclude=deprecation)
for requirement in requirements_list:
log('BUNDLE', requirement)
system('./AppDir/AppRun -m pip install -U '
'--no-warn-script-location ' + requirement)
system(('./AppDir/AppRun', '-m', 'pip', 'install', '-U',
'--no-warn-script-location', requirement),
exclude=deprecation)
# Bundle the entry point