Scroll to navigation

dh-virtualenv(1) DebHelper dh-virtualenv(1)

Name

dh-virtualenv - deploy a Python package in a self-contained virtualenv

SYNOPSIS

dh_virtualenv [OPTIONS]

DESCRIPTION

dh-virtualenv is a tool that aims to combine Debian packaging with self-contained virtualenv based Python deployments. To do this, the package extends debhelper's sequence by providing a new command in sequence, dh_virtualenv, which effectively replaces following commands from the sequence:

  • dh_auto_configure
  • dh_auto_build
  • dh_auto_test
  • dh_auto_install
  • dh_auto_clean



In the sequence the dh_virtualenv is inserted right before dh_installinit.

OPTIONS

Act on the package named PACKAGE
Do not act on the specified PACKAGE
Turn on verbose mode.
Pass extra index URL to pip
Preinstall a PACKAGE before running pip.
Tool used to install requirements.
Extra arg for the pip executable.
Extra arg for the virtualenv executable.
Base URL for PyPI server.
Install setuptools in the virtualenv.
Override virtualenv installation suffix
Force upgrade pip in virtualenv
Use FILE for requirements
--setuptools-test
Run setup.py test upon build (deprecated, needs setuptools < 72).
Use Python interpreter at PATH
Use built-in venv of Python 3
Don't run pip install .

QUICK GUIDE FOR MAINTAINERS

1.
Build depend on debhelper-compat (= 13), dh-virtualenv and python3
2.
Add python3, ${misc:Depends} and ${shlibs:Depends} to Depends
3.
Add python-virtualenv to dh's --with option

SEE ALSO

Online documentation can be found at <https://python-team.pages.debian.net/packages/dh-virtualenv/>

This package should also ship with the complete documentation under /usr/share/doc/dh-virtualenv.

Author

Nico Della Torre <nicoz91@ubuntu.com> for the Debian Python Team <team+python@tracker.debian.org>

Copyright

Copyright (C) 2013 Spotify AB, 2026 Nico Della Torre. Licensed under the GNU General Public License version 2 or later