mirror of
https://github.com/python-poetry/install.python-poetry.org.git
synced 2024-11-25 07:20:56 -05:00
Fix poetry installer with homebrew python
This commit is contained in:
parent
e518c55933
commit
53bcf30fa7
1 changed files with 8 additions and 1 deletions
|
@ -314,7 +314,14 @@ class VirtualEnvironment:
|
|||
import ensurepip # noqa: F401
|
||||
import venv
|
||||
|
||||
builder = venv.EnvBuilder(clear=True, with_pip=True, symlinks=False)
|
||||
use_symlinks = False
|
||||
if os.path.islink(sys.executable):
|
||||
link_target = os.readlink(sys.executable)
|
||||
# if sys.executable is a relative symlink, such as python, installed
|
||||
# from homebrew on MacOS, it will not work once copied
|
||||
use_symlinks = not os.path.isabs(link_target)
|
||||
|
||||
builder = venv.EnvBuilder(clear=True, with_pip=True, symlinks=use_symlinks)
|
||||
context = builder.ensure_directories(target)
|
||||
|
||||
if (
|
||||
|
|
Loading…
Reference in a new issue