diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml index faee561..724721d 100644 --- a/.github/workflows/installer.yml +++ b/.github/workflows/installer.yml @@ -25,7 +25,7 @@ jobs: strategy: matrix: os: [Ubuntu, macOS, Windows] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11"] args: - "" - "--preview" diff --git a/install-poetry.py b/install-poetry.py index 4a96007..b854e6f 100644 --- a/install-poetry.py +++ b/install-poetry.py @@ -314,7 +314,14 @@ def make(cls, target: Path) -> "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 (