[Fix] Solving issues related to out-of-tree builds (#65)

* [Fix] Fix warning information when invoking pip install command

* add comment

* fix error
This commit is contained in:
Zaida Zhou 2021-07-24 15:08:11 +08:00 committed by GitHub
parent 34e0d56e75
commit 0bd1f4d2dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -471,6 +471,10 @@ def install_from_repo(repo_root: str,
install_cmd = ['python', '-m', 'pip', 'install']
if is_editable:
install_cmd.append('-e')
else:
# solving issues related to out-of-tree builds
# more datails at https://github.com/pypa/pip/issues/7555
install_cmd.append('--use-feature=in-tree-build')
install_cmd.append(repo_root)
if is_user_dir:
install_cmd.append('--user')