`venv` fails on PyPy3.7 7.3.5 win64 when called from `python.exe` (symlink or copy to/of pypy3)
When installing PyPy, cibuildwheel creates a symlink to pypy3 to provide users with a unified way of calling
python wether they're currently building for CPython or PyPy.
While integrating pypa/build in the workflow we found an issue regarding the
venv module failing to create a virtual environment from that symlink.
Given the support for symlink is marked something like "not supported" in the PyPy
venv module, I tried with a copy instead but it's still failing with the same error.
venv module to resolve symlink (using path
pathlib.Path.resolve()) seems to work fine.
The issue with the copy is that
python is a special name and PyPy tries to copy
venvlauncher.exe rather than
venvlauncher.exe does not exist.
Here's the ouput with some traces added to the
$ /c/cibw/pypy3.7-v7.3.5-win64/python.exe -u -m venv venv-pypy-python C:\cibw\pypy3.7-v7.3.5-win64\python.exe suffixes: ['libpypy3-c.dll', 'pypy3.exe', 'pypy3w.exe', 'python.exe'] binpath: C:\cibuildwheel\venv-pypy-python\Scripts libpypy3-c.dll symlink_or_copy: ok pypy3.exe symlink_or_copy: ok pypy3w.exe symlink_or_copy: ok python.exe Unable to copy 'C:\\cibw\\pypy3.7-v7.3.5-win64\\venvlauncher.exe' ['C:\\cibuildwheel\\venv-pypy-python\\Scripts\\python.exe', '-Im', 'ensurepip', '--upgrade', '--default-pip'] Error: [WinError 2] The system cannot find the file specified