mim install does not work with pip >= 22.1 (#117)

* get rid of --use-feature=in-tree-build from pip22.1

* fix long line

Co-authored-by: Anton Cherepkov <anton.cherepkov@checklens.ai>
This commit is contained in:
Anton Cherepkov 2022-06-13 12:55:53 +03:00 committed by GitHub
parent 7b9697f8ca
commit cd3b38d75f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -477,7 +477,12 @@ def install_from_repo(repo_root: str,
else:
# solving issues related to out-of-tree builds
# more datails at https://github.com/pypa/pip/issues/7555
if LooseVersion(pip.__version__) >= LooseVersion('21.1.1'):
# starting from pip==21.3 in-tree builds are the default
# and --use-feature=in-tree-build is ignored
# more details at https://pip.pypa.io/en/stable/news/#id82
# starting from pip==22.1 --use-feature=in-tree-build raises an error
if LooseVersion('21.1.1') <= LooseVersion(
pip.__version__) < LooseVersion('22.1'):
install_cmd.append('--use-feature=in-tree-build')
install_cmd.append(repo_root)
if is_user_dir: