New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows: python and python3 don't point to the same installation #915
Comments
On a second note, cibuildwheel explicitly calls As a user I would expect that cibuildwheel would use the same one. A few sanity checks are performed to ensure the installed cpython version matches the one |
On note one, that looks like a bug, we should be making sure both python and python3 are valid (and we do that on macOS, it seems, and I know manylinux does this, just not Windows). I'm a little surprised it's not there, but we should add it. How do you do that on Windows? I know symlinking isn't always available on Windows. On your second note, you never want cibuildwheel to use the host Python. That is only used to call cibuildwheel; there are no special requirements on it; on macOS, it probably will always be an unacceptable version of Python to build with (only official downloads have the proper compilation settings), and besides, it's not even related to the version you are trying to build. Python 3.10 host can build wheels for all versions of Python, it's not using the host Python 3.10. |
Yes, you are right. For a moment I forgot that there is another layer of abstraction in there. Sorry for the confusion! Back to the original issue: nuget only installs |
Thanks for the detailed bug report, @sbrodehl ! I agree, this looks like a bug on Windows. I think that Windows doesn't normally have the python3 alias, but if runners have it available on PATH, that's gonna cause issues. We already do symlinking with the pypy install on windows to make cibuildwheel/cibuildwheel/windows.py Line 115 in 08a6944
so I expect |
Great, if it works this would be my go to solution. I've gone ahead and drafted a pull request to add the symlink. Do you think that we need to make sure there is no |
Hey @joerick, can you please explain briefly (or point to further reading) what issues can arise if runners have a python3 alias in PATH? |
This issue, I believe is what he meant. :) According to PEP 394 the "correct" term for Python is |
Thank you very much! Feel free to link this issue to #917, or I will close it when the PR gets merged. |
Description
Hi guys!
I am building wheels with cibw, but noticed some issues with windows builds, where installed packages during
CIBW_BEFORE_BUILD
step would not show up as installed during the build step.As it turn out,
python3
is not pointing to the installed python version, but tp the hosts python version (?).Here is an example from the build log linked to, where
cp37
is used:python3
/c/hostedtoolcache/windows/Python/3.10.0/x64/python3
python
/c/cibw/python/python.3.7.9/tools/python
This differs from the behavior in linux and macos, where both
python
andpython3
point to the same installation, examples below.python3
/opt/python/cp310-cp310/bin/python3
python
/opt/python/cp310-cp310/bin/python
python3
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3
python
/tmp/cibw_bin/python
(which looks like a link to the version above)It would be great, if
python
on windows builds can also point to the installed cpython version, what do you think?Build log
https://github.com/lukeparser/lukeparser/runs/4182800043?check_suite_focus=true
CI config
https://github.com/lukeparser/lukeparser/blob/88fcaf2de9599c62fffd26c4f85fee99c17278ec/.github/workflows/cibuildwheel.yml#L100
The text was updated successfully, but these errors were encountered: