sysconfig-debian-schemes.patch uses an incorrect test for a virtual
environment:

if 'real_prefix' in sys.__dict__ or 'VIRTUAL_ENV' in os.environ:

Both sys.real_prefix and VIRTUAL_ENV are only set by virtualenv, not
venv, and then only when the virtualenv is activated by
VENV_ROOT/bin/activate, not when VENV_ROOT/bin/python is launched
directly by its path.

This patch corrects the test to

if sys.base_prefix != sys.prefix:

which works on Python ≥ 3.3.

(Also submitted to https://bugs.debian.org/cgi-
bin/bugreport.cgi?bug=1006707.)

** Patch added: "python3.10_3.10.2-5_venv.debdiff"
   
https://bugs.launchpad.net/ubuntu/+source/python3.10/+bug/1962791/+attachment/5566147/+files/python3.10_3.10.2-5_venv.debdiff

** Tags added: patch patch-forwarded-debian

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1962791

Title:
  python3 -m venv installs pip to incorrect path VENV_ROOT/local/bin/pip

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python3.10/+bug/1962791/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to