🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
1 messages
1 total messages Started by Nico Della Torre Mon, 12 Oct 2026 18:10
Bug#1150720: dh-virtualenv: bin/activate keeps the build directory with recent venv and virtualenv
#614
Author: Nico Della Torre
Date: Mon, 12 Oct 2026 18:10
47 lines
3299 bytes
Package: dh-virtualenv
Version: 1.2.2-3
Severity: normal

dh_virtualenv rewrites the VIRTUAL_ENV assignments in bin/activate,
bin/activate.csh and bin/activate.fish with regular expressions anchored
at the start of the line (^VIRTUAL_ENV=, ^setenv VIRTUAL_ENV,
^set -gx VIRTUAL_ENV).

Recent versions of venv (Python >= 3.12) and virtualenv (>= 20.36)
indent the assignment in bin/activate inside a case or if block, so it
is no longer matched and the installed script still points to the build
directory, e.g.:

    VIRTUAL_ENV=/build/foo/debian/foo/opt/venvs/foo

With virtualenv 21.5.1 in unstable, sourcing the installed
/opt/venvs/foo/bin/activate prints

    Virtual environment directory /build/foo/debian/foo/opt/venvs/foo does not exist!

and python from the virtualenv is not put in PATH. The csh and fish
patterns also match the VIRTUAL_ENV_PROMPT lines and overwrite them with
the VIRTUAL_ENV assignment.

Steps to reproduce: build any package with
"dh $@ --with python-virtualenv", install it and source
/opt/venvs/<package>/bin/activate in bash.

Replacing the build path of the virtualenv in all the bin/activate*
scripts, instead of matching each assignment, works for every shell and
script layout.



-- System Information:
Debian Release: forky/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 7.2.9+deb14-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE=it
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads