spotify / dh-virtualenv

Python virtualenvs in Debian packages
http://dh-virtualenv.readthedocs.io/en/latest/
GNU General Public License v2.0
1.62k stars 185 forks source link

-m venv does not understand the --verbose option #360

Closed wferi closed 1 year ago

wferi commented 1 year ago

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.
wferi commented 1 year ago

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