Browse files

Merge branch 'release/1.7'

  • Loading branch information...
2 parents b8a7db8 + 7002060 commit 1405b48b1d6347ed350e40f5cd5df96c0836eb9e @jezdez jezdez committed Nov 30, 2011
@@ -13,11 +13,15 @@ Jannis Leidel
+Alex Grönholm
Antonio Cuni
Armin Ronacher
+Chris McDonough
+Christian Stefanescu
Christopher Nilsson
Curt Micol
Douglas Creager
+Gunnlaugur Thor Briem
Jeff Hammel
Jorge Vargas
Josh Bronson
@@ -19,7 +19,7 @@
('', 'setuptools-0.6c11-py2.5.egg'),
('', 'setuptools-0.6c11-py2.4.egg'),
('', ''),
- ('', 'distribute-0.6.19.tar.gz'),
+ ('', 'distribute-0.6.24.tar.gz'),
('', 'pip-1.0.2.tar.gz'),
@@ -42,7 +42,7 @@
# The short X.Y version.
-release = "1.6.4"
+release = "1.7"
version = ".".join(release.split(".")[:2])
# There are two options for replacing |today|: either, you set today to some
@@ -27,9 +27,16 @@ Project <>`_ and is now maintained by a
It is licensed under an
`MIT-style permissive license <>`_.
-You can install it with ``easy_install virtualenv``, or the `latest
+You can install it with ``pip install virtualenv``, or the `latest
development version <>`_
-with ``easy_install virtualenv==dev``.
+with ``pip install virtualenv==dev``.
+You can also use ``easy_install``, or if you have no Python package manager
+available at all, you can just grab the single file ``_ and run
+it with ``python``.
What It Does
@@ -79,9 +86,65 @@ Distribute instead of setuptools, just call virtualenv like this::
You can also set the environment variable VIRTUALENV_USE_DISTRIBUTE.
A new virtualenv also includes the `pip <>`_
-installer, so you can use `ENV/bin/pip`` to install additional packages into
+installer, so you can use ``ENV/bin/pip`` to install additional packages into
the environment.
+Environment variables and configuration files
+virtualenv can not only be configured by passing command line options such as
+``--distribute`` but also by two other means:
+- Environment variables
+ Each command line option is automatically used to look for environment
+ variables with the name format ``VIRTUALENV_<UPPER_NAME>``. That means
+ the name of the command line options are capitalized and have dashes
+ (``'-'``) replaced with underscores (``'_'``).
+ For example, to automatically install Distribute instead of setuptools
+ you can also set an environment variable::
+ $ python ENV
+ It's the same as passing the option to virtualenv directly::
+ $ python --distribute ENV
+ This also works for appending command line options, like ``--find-links``.
+ Just leave an empty space between the passsed values, e.g.::
+ $ export VIRTUALENV_EXTRA_SEARCH_DIR="/path/to/dists /path/to/other/dists"
+ $ virtualenv ENV
+ is the same as calling::
+ $ python --extra-search-dir=/path/to/dists --extra-search-dir=/path/to/other/dists ENV
+- Config files
+ virtualenv also looks for a standard ini config file. On Unix and Mac OS X
+ that's ``$HOME/.virtualenv/virtualenv.ini`` and on Windows, it's
+ ``%HOME%\\virtualenv\\virtualenv.ini``.
+ The names of the settings are derived from the long command line option,
+ e.g. the option ``--distribute`` would look like this::
+ [virtualenv]
+ distribute = true
+ Appending options like ``--extra-search-dir`` can be written on multiple
+ lines::
+ [virtualenv]
+ extra-search-dir =
+ /path/to/dists
+ /path/to/other/dists
+Please have a look at the output of ``virtualenv --help`` for a full list
+of supported options.
Windows Notes
@@ -172,7 +235,7 @@ Here's a more concrete example of how you could use this::
f = open('', 'w').write(output)
Another example is available `here
activate script
@@ -189,7 +252,7 @@ directory. (You have to use ``source`` because it changes your shell
environment in-place.) This is all it does; it's purely a convenience. If
you directly run a script or the python interpreter from the virtualenv's
``bin/`` directory (e.g. ``path/to/env/bin/pip`` or
-``/path/to/env/bin/python``) there's no need for activation.
+``/path/to/env/bin/python``) there's no need for activation.
After activating an environment you can use the function ``deactivate`` to
undo the changes to your ``$PATH``.
@@ -207,15 +270,16 @@ On Windows you just do::
And use ``deactivate.bat`` to undo the changes.
-The ``--no-site-packages`` Option
+The ``--system-site-packages`` Option
+If you build with ``virtualenv --system-site-packages ENV``, your virtual
+environment will inherit packages from ``/usr/lib/python2.7/site-packages``
+(or wherever your global site-packages directory is).
-If you build with ``virtualenv --no-site-packages ENV`` it will *not*
-inherit any packages from ``/usr/lib/python2.5/site-packages`` (or
-wherever your global site-packages directory is). This can be used if
-you don't have control over site-packages and don't want to depend on
-the packages there, or you just want more isolation from the global
+This can be used if you have control over the global site-packages directory,
+and you want to depend on the packages there. If you want isolation from the
+global system, do not use this flag.
Using Virtualenv without ``bin/python``
@@ -236,11 +300,12 @@ can setup the environment like::
This will change ``sys.path`` and even change ``sys.prefix``, but also allow
you to use an existing interpreter. Items in your environment will show up
first on ``sys.path``, before global items. However, global items will
-always be accessible -- this technique does not support the
-``--no-site-packages`` flag. Also, this cannot undo the activation of other
-environments, or modules that have been imported. You shouldn't try to, for
-instance, activate an environment before a web request; you should activate
-*one* environment as early as possible, and not do it again in that process.
+always be accessible (as if the ``--system-site-packages`` flag had been used
+in creating the environment, whether it was or not). Also, this cannot undo
+the activation of other environments, or modules that have been imported.
+You shouldn't try to, for instance, activate an environment before a web
+request; you should activate *one* environment as early as possible, and not
+do it again in that process.
Making Environments Relocatable
@@ -277,8 +342,8 @@ libraries on the system, if those C libraries are located somewhere
different (either different versions, or a different filesystem
-Currently the ``--no-site-packages`` option will not be honored if you
-use this on an environment.
+If you use this flag to create an environment, currently, the
+``--system-site-packages`` option will be implied.
The ``--extra-search-dir`` Option
@@ -1,10 +1,24 @@
Changes & News
-Next release (1.7) schedule
+1.7 (2011-11-30)
-Beta release mid-July 2011, final release early August.
+* Updated embedded Distribute release to 0.6.24. Thanks Alex Grönholm.
+* Made ``--no-site-packages`` behavior the default behavior. The
+ ``--no-site-packages`` flag is still permitted, but displays a warning when
+ used. Thanks Chris McDonough.
+* New flag: ``--system-site-packages``; this flag should be passed to get the
+ previous default global-site-package-including behavior back.
+* Added ability to set command options as environment variables and options
+ in a ``virtualenv.ini`` file.
+* Fixed various encoding related issues with paths. Thanks Gunnlaugur Thor Briem.
+* Made ```` script executable.
1.6.4 (2011-07-21)
@@ -26,7 +26,7 @@
# If you change the version here, change it in and
# docs/ as well
- version="1.6.4",
+ version="1.7",
description="Virtual Python Environment builder",
@@ -4,7 +4,7 @@
def test_version():
"""Should have a version string"""
- assert virtualenv.virtualenv_version == "1.6.4", "Should have version"
+ assert virtualenv.virtualenv_version == "1.7", "Should have version"
Oops, something went wrong.

0 comments on commit 1405b48

Please sign in to comment.