Package: python3-virtualenvwrapper
Version: 6.1.1-1
Severity: grave
Tags: patch
Justification: renders package unusable

Dear Maintainer,

After upgrading to 6.1.1-1, sourcing virtualenvwrapper.sh fails:

  $ source /usr/share/virtualenvwrapper/virtualenvwrapper.sh
  ERROR: Python with virtualenvwrapper module not found!
  Either, install virtualenvwrapper module for the default python3 interpreter
  or set VIRTUALENVWRAPPER_PYTHON to the interpreter to use.

The script probes the interpreter with `python3 -m
virtualenvwrapper.hook_loader --help`, and that import fails:

  $ python3 -m virtualenvwrapper.hook_loader --help
  ...
  ModuleNotFoundError: No module named 'virtualenvwrapper.version'

hook_loader.py now imports virtualenvwrapper.version (4.8.4 did not),
but python3-virtualenvwrapper 6.1.1-1 ships no
virtualenvwrapper/version.py, and its metadata is installed as
virtualenvwrapper-0.0.0.egg-info. Setting VIRTUALENVWRAPPER_PYTHON does
not help, because every hook runs through hook_loader. Downgrading to
4.8.4-4 restores a working setup.

The upstream PyPI sdist ships virtualenvwrapper/version.py, written by
setuptools_scm (`write_to` in pyproject.toml). debian/clean, added in
6.1.1-1, deletes that file, and since python3-setuptools-scm is not in
Build-Depends nothing regenerates it during the build, so setuptools
also falls back to version 0.0.0.

This is already fixed in the packaging repository on Salsa: commits
0b997ab ("add build-dep python3-setuptools-scm to avoid version 0.0.0")
and dbb105c ("switch to pybuild-plugin-pyproject") landed on master
after the debian/6.1.1-1 tag (1e9524b), so the uploaded package does
not include them.
The patch below is that debian/control change, rebased on 6.1.1-1.

I built both debian/6.1.1-1 and current master in a clean
debian:unstable container. The tag reproduces the error above. Master
ships virtualenvwrapper/version.py and virtualenvwrapper-6.1.1.dist-
info, `python3 -m virtualenvwrapper.hook_loader --version` prints
6.1.1, and sourcing virtualenvwrapper.sh followed by mkvirtualenv and
workon works.

The autopkgtest-pkg-python import test cannot catch this regression,
because `import virtualenvwrapper` still succeeds (it is a namespace
package). A debian/tests smoke test running `python3 -m
virtualenvwrapper.hook_loader --version` would.

Workaround until a fixed upload, for anyone hitting this:

  echo "version = '6.1.1'" | \
    sudo tee /usr/lib/python3/dist-packages/virtualenvwrapper/version.py

Could you please upload a 6.1.1-2 from current master?

Cheers,

-- 
Marcelo Jorge Vieira
xmpp:[email protected]
https://metaldot.alucinados.com

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to