Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Python distutils extension to create virtualenv built distributions.

Project Description

Implements a python distutils bdist_venv2 command for creating a virtualenv built distribution.

It was based on what was already done by:

but incorporates ideas from:


sudo pip install bdist-venv2


Say you want to distribute a project called my-project. Get to its

cd ~/code/my-project/src

Make sure you are not in a virtualenv (you can’t create a virtualenv from within a virtualenv). If you in one exit it:


You can either create a “relocatable” virtualenv ala bdist_venv:

python bdist_venv2 -f gztar

or one “fixed-up” to be unpacked to a particular location:

python bdist_venv2 -l /usr/lib/my-package -f gztar

You’ll find the results in dist which might look something like:

ls dist

depending on your environment.


python bdist_venv2 --help

Common commands: (see '--help-commands' for more) build      will build the package underneath 'build/' install    will install the package

Global options:
  --verbose (-v)  run verbosely (default)
  --quiet (-q)    run quietly (turns verbosity off)
  --dry-run (-n)  don't actually do anything
  --help (-h)     show detailed help message
  --no-user-cfg   ignore pydistutils.cfg in your home directory

Options for 'bdist_venv2' command:
  --bdist-dir (-b)     temporary directory for creating the distribution
  --location-dir (-l)  location where virtualenv will be installed to
                       (default: relocatable)
  --extras (-e)        list of extras to included in the virtualenv
  --plat-name (-p)     platform name to embed in generated filenames (default:
  --keep-temp (-k)     keep the installation tree around after creating the
  --keep-compiled      keep compiled files in the distribution
  --dist-name (-n)     name of the built distribution
  --dist-dir (-d)      directory to put final built distributions in
  --format (-f)        archive format to create (tar, ztar, gztar, zip)
                       (default: none)
  --owner (-u)         Owner name used when creating a tar file (default:
                       current user)
  --group (-g)         Group name used when creating a tar file (default:
                       current group)

usage: [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: --help [cmd1 cmd2 ...]
   or: --help-commands
   or: cmd --help

0.1.2 (2014-01-05)

Initial release.

Release History

Release History

This version
History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
bdist-venv2-0.1.3.tar.gz (6.0 kB) Copy SHA256 Checksum SHA256 Source Jan 7, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting