From 874a28d82c403dd869b46c316eaa047027fb374a Mon Sep 17 00:00:00 2001 From: Andy Kipp Date: Mon, 3 May 2021 11:23:49 +0300 Subject: [PATCH 1/4] Update app.py --- python_appimage/commands/build/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python_appimage/commands/build/app.py b/python_appimage/commands/build/app.py index 5ba68ef..be8ed58 100644 --- a/python_appimage/commands/build/app.py +++ b/python_appimage/commands/build/app.py @@ -228,8 +228,9 @@ def execute(appdir, name=None, python_version=None, linux_tag=None, # Bundle the requirements if requirements_list: + in_tree_build = '' if version <= '3.5' else '--use-feature=in-tree-build' deprecation = 'DEPRECATION: Python 2.7 reached the end of its life' - system(('./AppDir/AppRun', '-m', 'pip', 'install', '-U', '--use-feature=in-tree-build', + system(('./AppDir/AppRun', '-m', 'pip', 'install', '-U', in_tree_build, '--no-warn-script-location', 'pip'), exclude=deprecation) for requirement in requirements_list: if requirement.startswith('git+'): @@ -237,7 +238,7 @@ def execute(appdir, name=None, python_version=None, linux_tag=None, log('BUNDLE', name + ' from ' + url[4:]) else: log('BUNDLE', requirement) - system(('./AppDir/AppRun', '-m', 'pip', 'install', '-U', '--use-feature=in-tree-build', + system(('./AppDir/AppRun', '-m', 'pip', 'install', '-U', in_tree_build, '--no-warn-script-location', requirement), exclude=(deprecation, ' Running command git clone -q')) From e9315dbb852f5f929d9689e2efc0fbfa5120c449 Mon Sep 17 00:00:00 2001 From: Andy Kipp Date: Mon, 3 May 2021 11:34:44 +0300 Subject: [PATCH 2/4] Update app.py --- python_appimage/commands/build/app.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python_appimage/commands/build/app.py b/python_appimage/commands/build/app.py index be8ed58..1fc487d 100644 --- a/python_appimage/commands/build/app.py +++ b/python_appimage/commands/build/app.py @@ -229,7 +229,12 @@ def execute(appdir, name=None, python_version=None, linux_tag=None, # Bundle the requirements if requirements_list: in_tree_build = '' if version <= '3.5' else '--use-feature=in-tree-build' - deprecation = 'DEPRECATION: Python 2.7 reached the end of its life' + + deprecation = ( + 'DEPRECATION: Python 2.7 reached the end of its life', + 'DEPRECATION: Python 3.5 reached the end of its life' + ) + system(('./AppDir/AppRun', '-m', 'pip', 'install', '-U', in_tree_build, '--no-warn-script-location', 'pip'), exclude=deprecation) for requirement in requirements_list: From 639884b8ae438ad47533c561e32c71b070292a0a Mon Sep 17 00:00:00 2001 From: Andy Kipp Date: Mon, 3 May 2021 11:42:03 +0300 Subject: [PATCH 3/4] Check pip version --- python_appimage/commands/build/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python_appimage/commands/build/app.py b/python_appimage/commands/build/app.py index 1fc487d..4e5598c 100644 --- a/python_appimage/commands/build/app.py +++ b/python_appimage/commands/build/app.py @@ -228,7 +228,8 @@ def execute(appdir, name=None, python_version=None, linux_tag=None, # Bundle the requirements if requirements_list: - in_tree_build = '' if version <= '3.5' else '--use-feature=in-tree-build' + pip_version = system(('./AppDir/AppRun','-m', 'pip','--version')).split(' ')[1] + in_tree_build = '' if pip_version <= '21' else '--use-feature=in-tree-build' deprecation = ( 'DEPRECATION: Python 2.7 reached the end of its life', From 1db6dd10a52a11a7254695096aefb61bcb6c0208 Mon Sep 17 00:00:00 2001 From: Andy Kipp Date: Mon, 3 May 2021 11:44:25 +0300 Subject: [PATCH 4/4] Update app.py --- python_appimage/commands/build/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_appimage/commands/build/app.py b/python_appimage/commands/build/app.py index 4e5598c..bdae110 100644 --- a/python_appimage/commands/build/app.py +++ b/python_appimage/commands/build/app.py @@ -229,7 +229,7 @@ def execute(appdir, name=None, python_version=None, linux_tag=None, # Bundle the requirements if requirements_list: pip_version = system(('./AppDir/AppRun','-m', 'pip','--version')).split(' ')[1] - in_tree_build = '' if pip_version <= '21' else '--use-feature=in-tree-build' + in_tree_build = '' if pip_version < '21' else '--use-feature=in-tree-build' deprecation = ( 'DEPRECATION: Python 2.7 reached the end of its life',