Skip to main content

bdist-venv2

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:

Install

sudo pip install bdist-venv2

Example

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

cd ~/code/my-project/src
ls
...
setup.py
...

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

deactivate

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

python setup.py bdist_venv2 -f gztar

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

python setup.py bdist_venv2 -l /usr/lib/my-package -f gztar

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

ls dist
...
dist/my-package-0.1.0.linux_x86_64-py2.7.tar.gz
...

depending on your environment.

Usage

python setup.py bdist_venv2 --help

Common commands: (see '--help-commands' for more)

  setup.py build      will build the package underneath 'build/'
  setup.py 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:
                       linux-x86_64)
  --keep-temp (-k)     keep the installation tree around after creating the
                       distribution
  --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: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

0.1.2 (2014-01-05)

Initial release.

Release files for bdist-venv2 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bdist-venv2 0.1.3
File Size Uploaded
bdist-venv2-0.1.3.tar.gz 6.0 kB Details

Release files / bdist-venv2-0.1.3.tar.gz

Download URL bdist-venv2-0.1.3.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
155e4fbc3bf0eb912c4f0ecfccaa4dfbd2bf13df42a34df928965f9b0cf577de
BLAKE2b-256 checksum
How to use checksums
2da4f523d41d119887d9d5f73d60b6fad93486d6bc50a28843c56080c4adf951
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page