Package: dh-virtualenv
Version: 1.3
Severity: normal

Dear Maintainer,

dh_virtualenv --setuptools makes the build fail with every virtualenv
in a supported release (20.17 in bookworm, 20.31 in trixie, 21.5 in
sid).

dh-virtualenv passes a bare --setuptools to virtualenv. That option
dates from virtualenv < 20, where it chose setuptools over distribute.
Since virtualenv 20 --setuptools takes the version of setuptools to
install, so it swallows the destination directory:

    $ cat debian/rules
    #!/usr/bin/make -f
    %:
        dh $@ --with python-virtualenv --setuptools
    $ dpkg-buildpackage -us -uc -b
    [...]
    virtualenv: error: the following arguments are required: dest

The same happens with "virtualenv --setuptools /tmp/venv" directly.

Passing --setuptools=bundle instead works with virtualenv 20.17, 20.31
and 21.5, and installs the setuptools shipped with virtualenv. That is
also the useful meaning of the option today: since Python 3.12
virtualenv no longer installs setuptools by default.

The unit test checked the bare flag, so the failure was not noticed.
The --builtin-venv case was fixed separately in #1104696.

Nico Della Torre


-- 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

Reply via email to