-
Notifications
You must be signed in to change notification settings - Fork 121
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
Custom default sysconfig INSTALL_SCHEME leads to superfulous "Virtual environment creation failed" #433
Comments
#310 is kinda related |
hroncok
added a commit
to hroncok/build
that referenced
this issue
Jan 31, 2022
…me if it exists Python distributors with custom default installation scheme can set a scheme that can't be used to expand the paths in a venv. This can happen if build itself is not installed in a venv. The distributors are encouraged to set a "venv" scheme to be used for this. See https://bugs.python.org/issue45413 and pypa/virtualenv#2208 Since Python that ships with the macOS developer tools does not have the "venv" scheme yet, we keep the special case below. Once it gains the "venv" scheme, it will be preferred. Fixes pypa#433
A draft PR without tests #434 |
hroncok
added a commit
to hroncok/build
that referenced
this issue
Jan 31, 2022
…me if it exists Python distributors with custom default installation scheme can set a scheme that can't be used to expand the paths in a venv. This can happen if build itself is not installed in a venv. The distributors are encouraged to set a "venv" scheme to be used for this. See https://bugs.python.org/issue45413 and pypa/virtualenv#2208 Since Python that ships with the macOS developer tools does not have the "venv" scheme yet, we keep the special case below. Once it gains the "venv" scheme, it will be preferred. Fixes pypa#433
Previous discussion: #215. |
FFY00
pushed a commit
that referenced
this issue
Mar 18, 2022
…me if it exists Python distributors with custom default installation scheme can set a scheme that can't be used to expand the paths in a venv. This can happen if build itself is not installed in a venv. The distributors are encouraged to set a "venv" scheme to be used for this. See https://bugs.python.org/issue45413 and pypa/virtualenv#2208 Since Python that ships with the macOS developer tools does not have the "venv" scheme yet, we keep the special case below. Once it gains the "venv" scheme, it will be preferred. Fixes #433
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
With the proposal in https://bugs.python.org/issue43976 we are using an approach in Fedora, that changes the default install scheme to use
/usr/local
paths. Essentially, we set:However, we have realized this breaks standard assumptions about virtual environments created by
virtualenv
.In
virtualenv
, we have fixed this in pypa/virtualenv#2208 by using a dedicated installation scheme called"venv"
. The standard libraryvenv
module does not read install schemes at all, but we have opened https://bugs.python.org/issue45413 anyway.In
build
, this causes problems that @vstinner reported to me on Fedora's Python IRC channel. tl;dr in here:build/src/build/env.py
Line 306 in 96f9188
The default install scheme is used. Hence on Fedora,
build
errors with:That is correct,
/tmp/build-env-.../local/bin/python
is missing, but there is/tmp/build-env-.../bin/python
which is completely OK.We'd like
build
to use the"venv"
scheme if it exists, as doesvirtualenv
itself:https://github.com/pypa/virtualenv/blob/bb2eeaca5a5c9818bf3b8b047f0e859c16905d26/src/virtualenv/discovery/py_info.py#L76-L80
(To check this out, use Python 3.10 on Fedora 36 or Python 3.11 on any Fedora version (installed via
dnf
from the official Fedora repositories. I think thatbuild
itself must not be installed in a virtual environment to reproduce this.)Would you accept a PR that fixes this? This should be fairly easy to fix, but I am unsure if I will be able to provide tests.
The text was updated successfully, but these errors were encountered: