The standard python -m venv module does not understand the --verbose option, but dh_virtualenv adds this to the command line if itself got it from the command line or via the DH_VERBOSE=1 environment setting like in the following example:
dh_virtualenv --python python3 --builtin-venv
/usr/bin/dh_virtualenv:60: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()
arguments = inspect.getargspec(DebHelper.__init__).args
I: dh_virtualenv:71: dh-3pc: Processing package...
I: dh_virtualenv:71: dh-3pc: Adding autoscripts...
I: dh_virtualenv:71: dh-3pc: Creating virtualenv
usage: venv [-h] [--system-site-packages] [--symlinks | --copies] [--clear]
[--upgrade] [--without-pip] [--prompt PROMPT] [--upgrade-deps]
ENV_DIR [ENV_DIR ...]
venv: error: unrecognized arguments: --verbose
Traceback (most recent call last):
File "/usr/bin/dh_virtualenv", line 111, in <module>
sys.exit(main() or 0)
File "/usr/bin/dh_virtualenv", line 88, in main
deploy.create_virtualenv()
File "/usr/lib/python3/dist-packages/dh_virtualenv/deployment.py", line 164, in create_virtualenv
subprocess.check_call(virtualenv)
File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python3', '-m', 'venv', '--verbose', 'debian/dh-3pc/opt/dh-3pc']' returned non-zero exit status 2.
Sorry, this issue has already been fixed by 02dbaa46ef2c75c5863628cc8f77d37a18d2c051 on Nov 13, 2020. About ten days after the release of dh-virtualenv 1.2.2, the latest release to day. :-( One more reason to #355...
The standard
python -m venv
module does not understand the--verbose
option, butdh_virtualenv
adds this to the command line if itself got it from the command line or via theDH_VERBOSE=1
environment setting like in the following example: