-
Notifications
You must be signed in to change notification settings - Fork 239
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
Changing PATH
in CIBW_ENVIRONMENT
can cause wrong Python to be used
#261
Comments
on linux there is not such problem because of different order of command execution. Before build is evaluated before extending path by python location. MacOS has same command order like windows. I think that solution from linux is best. if [ ! -z {before_build} ]; then
PATH="$PYBIN:$PATH" sh -c {before_build}
fi
# Build the wheel
rm -rf /tmp/built_wheel
mkdir /tmp/built_wheel
PATH="$PYBIN:$PATH" "$PYBIN/pip" wheel . -w /tmp/built_wheel --no-deps {build_verbosity_flag}
built_wheel=(/tmp/built_wheel/*.whl) |
Hmmmm, that's not consistent. I thought we'd made different platforms the same before.
I don't know about that. It might be good to have access to the |
Actually; something weirder is going on: The documentation isn't clear on what's happening; it just says
I would argue to do it for every build, after But ... I don't really know. Maybe there's better arguments, so some input would be nice. Afterthought: why do we do it before |
I think I agree with you here @YannickJadoul, in fact just today I noticed that linux has different behaviour - by coincidence, that is fixed in #256 as a side effect of my changes. It's important for the correct So I'm in favour of your original suggestion - asserting that python and pip are correct after CIBW_ENVIRONMENT is evaluated. And once #256 is merged, the behaviour should be consistent between platforms. |
See samuelcolvin/rtoml#8 (comment): if someone changes
PATH
inCIBW_ENVIRONMENT
, the newly installed Python (from nuget on Windows, but I'm guessing the same is possible on macOS or Linux; still need to check) is not used, but some other Python version of the system is used.So I think we should add some kind of check after applying
CIBW_ENVIRONMENT
that makes sure we're using thepython
executable we think we're using.(I'm happy to actually do it myself, actually, if no one else is eager to do this; but I currently don't have time to do it immediately, so I thought I'd make sure to report it.)
The text was updated successfully, but these errors were encountered: