Permalink
Browse files

Merge branch 'release/1.7'

  • Loading branch information...
2 parents b8a7db8 + 7002060 commit 1405b48b1d6347ed350e40f5cd5df96c0836eb9e @jezdez jezdez committed Nov 30, 2011
View
@@ -13,11 +13,15 @@ Jannis Leidel
Contributors
------------
+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 @@
('http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5.egg', 'setuptools-0.6c11-py2.5.egg'),
('http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c11-py2.4.egg', 'setuptools-0.6c11-py2.4.egg'),
('http://python-distribute.org/distribute_setup.py', 'distribute_setup.py'),
- ('http://pypi.python.org/packages/source/d/distribute/distribute-0.6.19.tar.gz', 'distribute-0.6.19.tar.gz'),
+ ('http://pypi.python.org/packages/source/d/distribute/distribute-0.6.24.tar.gz', 'distribute-0.6.24.tar.gz'),
('http://pypi.python.org/packages/source/p/pip/pip-1.0.2.tar.gz', 'pip-1.0.2.tar.gz'),
]
View
@@ -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
View
@@ -27,9 +27,16 @@ Project <http://openplans.org>`_ and is now maintained by a
It is licensed under an
`MIT-style permissive license <https://github.com/pypa/virtualenv/raw/master/LICENSE.txt>`_.
-You can install it with ``easy_install virtualenv``, or the `latest
+You can install it with ``pip install virtualenv``, or the `latest
development version <https://github.com/pypa/virtualenv/tarball/develop#egg=virtualenv-dev>`_
-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 `virtualenv.py`_ and run
+it with ``python virtualenv.py``.
+
+.. _virtualenv.py: https://raw.github.com/pypa/virtualenv/master/virtualenv.py
+
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 <http://pypy.python.org/pypi/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::
+
+ $ export VIRTUALENV_USE_DISTRIBUTE=true
+ $ python virtualenv.py ENV
+
+ It's the same as passing the option to virtualenv directly::
+
+ $ python virtualenv.py --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 virtualenv.py --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('blog-bootstrap.py', 'w').write(output)
Another example is available `here
-<https://svn.openplans.org/svn/fassembler/trunk/fassembler/create-venv-script.py>`_.
+<https://github.com/socialplanning/fassembler/blob/master/fassembler/create-venv-script.py>`_.
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 script.py``) there's no need for activation.
+``/path/to/env/bin/python script.py``) 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
-system.
+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
layout).
-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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
View
@@ -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 ``virtualenv.py`` script executable.
1.6.4 (2011-07-21)
~~~~~~~~~~~~~~~~~~
View
@@ -26,7 +26,7 @@
setup(name='virtualenv',
# If you change the version here, change it in virtualenv.py and
# docs/conf.py as well
- version="1.6.4",
+ version="1.7",
description="Virtual Python Environment builder",
long_description=long_description,
classifiers=[
View
@@ -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"
@patch('os.path.exists')
Oops, something went wrong.

0 comments on commit 1405b48

Please sign in to comment.