1
- Metadata-Version: 1.0
1
+ Metadata-Version: 1.1
2
2
Name: virtualenv
3
- Version: 1.7
3
+ Version: 1.7.2
4
4
Summary: Virtual Python Environment builder
5
5
Home-page: http://www.virtualenv.org
6
6
Author: Jannis Leidel, Carl Meyer and Brian Rosner
7
7
8
8
License: MIT
9
9
Description:
10
10
11
- Status and License
12
- ------------------
13
-
14
- ``virtualenv`` is a successor to `workingenv
15
- <http://cheeseshop.python.org/pypi/workingenv.py>`_, and an extension
16
- of `virtual-python
17
- <http://peak.telecommunity.com/DevCenter/EasyInstall#creating-a-virtual-python>`_.
18
-
19
- It was written by Ian Bicking, sponsored by the `Open Planning
20
- Project <http://openplans.org>`_ and is now maintained by a
21
- `group of developers <https://github.com/pypa/virtualenv/raw/master/AUTHORS.txt>`_.
22
- It is licensed under an
23
- `MIT-style permissive license <https://github.com/pypa/virtualenv/raw/master/LICENSE.txt>`_.
11
+ Installation
12
+ ------------
24
13
25
- You can install it with ``pip install virtualenv``, or the `latest
26
- development version <https://github.com/pypa/virtualenv/tarball/develop#egg=virtualenv-dev >`_
27
- with ``pip install virtualenv==dev ``.
14
+ You can install virtualenv with ``pip install virtualenv``, or the `latest
15
+ development version <https://github.com/pypa/virtualenv/tarball/develop>`_
16
+ with ``pip install https://github.com/pypa/ virtualenv/tarball/develop ``.
28
17
29
18
You can also use ``easy_install``, or if you have no Python package manager
30
19
available at all, you can just grab the single file `virtualenv.py`_ and run
31
20
it with ``python virtualenv.py``.
32
21
33
22
.. _virtualenv.py: https://raw.github.com/pypa/virtualenv/master/virtualenv.py
34
23
35
-
36
24
What It Does
37
25
------------
38
26
@@ -78,9 +66,9 @@ Description:
78
66
79
67
$ python virtualenv.py --distribute ENV
80
68
81
- You can also set the environment variable VIRTUALENV_USE_DISTRIBUTE .
69
+ You can also set the environment variable VIRTUALENV_DISTRIBUTE .
82
70
83
- A new virtualenv also includes the `pip <http://pypy .python.org/pypi/pip>`_
71
+ A new virtualenv also includes the `pip <http://pypi .python.org/pypi/pip>`_
84
72
installer, so you can use ``ENV/bin/pip`` to install additional packages into
85
73
the environment.
86
74
@@ -100,7 +88,7 @@ Description:
100
88
For example, to automatically install Distribute instead of setuptools
101
89
you can also set an environment variable::
102
90
103
- $ export VIRTUALENV_USE_DISTRIBUTE =true
91
+ $ export VIRTUALENV_DISTRIBUTE =true
104
92
$ python virtualenv.py ENV
105
93
106
94
It's the same as passing the option to virtualenv directly::
@@ -121,7 +109,7 @@ Description:
121
109
122
110
virtualenv also looks for a standard ini config file. On Unix and Mac OS X
123
111
that's ``$HOME/.virtualenv/virtualenv.ini`` and on Windows, it's
124
- ``%HOME%\\ virtualenv\ \virtualenv.ini``.
112
+ ``%APPDATA%\ virtualenv\virtualenv.ini``.
125
113
126
114
The names of the settings are derived from the long command line option,
127
115
e.g. the option ``--distribute`` would look like this::
@@ -236,11 +224,12 @@ Description:
236
224
~~~~~~~~~~~~~~~
237
225
238
226
In a newly created virtualenv there will be a ``bin/activate`` shell
239
- script, or a ``Scripts/activate.bat`` batch file on Windows.
227
+ script. For Windows systems, activation scripts are provided for CMD.exe
228
+ and Powershell.
240
229
241
230
On Posix systems you can do::
242
231
243
- $ source bin/activate
232
+ $ source bin/activate
244
233
245
234
This will change your ``$PATH`` to point to the virtualenv's ``bin/``
246
235
directory. (You have to use ``source`` because it changes your shell
@@ -261,9 +250,65 @@ Description:
261
250
262
251
On Windows you just do::
263
252
264
- > \path\to\env\Scripts\activate.bat
253
+ > \path\to\env\Scripts\activate
254
+
255
+ And type `deactivate` to undo the changes.
256
+
257
+ Based on your active shell (CMD.exe or Powershell.exe), Windows will use
258
+ either activate.bat or activate.ps1 (as appropriate) to activate the
259
+ virtual environment. If using Powershell, see the notes about code signing
260
+ below.
261
+
262
+ .. note::
263
+
264
+ If using Powershell, the ``activate`` script is subject to the
265
+ `execution policies`_ on the system. By default on Windows 7, the system's
266
+ excution policy is set to ``Restricted``, meaning no scripts like the
267
+ ``activate`` script are allowed to be executed. But that can't stop us
268
+ from changing that slightly to allow it to be executed.
265
269
266
- And use ``deactivate.bat`` to undo the changes.
270
+ In order to use the script, you have to relax your system's execution
271
+ policy to ``AllSigned``, meaning all scripts on the system must be
272
+ digitally signed to be executed. Since the virtualenv activation
273
+ script is signed by one of the authors (Jannis Leidel) this level of
274
+ the execution policy suffices. As an administrator run::
275
+
276
+ PS C:\> Set-ExecutionPolicy AllSigned
277
+
278
+ Then you'll be asked to trust the signer, when executing the script.
279
+ You will be prompted with the following::
280
+
281
+ PS C:\> virtualenv .\foo
282
+ New python executable in C:\foo\Scripts\python.exe
283
+ Installing setuptools................done.
284
+ Installing pip...................done.
285
+ PS C:\> .\foo\scripts\activate
286
+
287
+ Do you want to run software from this untrusted publisher?
288
+ File C:\foo\scripts\activate.ps1 is published by
[email protected] ,
289
+ CN=Jannis Leidel, L=Berlin, S=Berlin, C=DE, Description=581796-Gh7xfJxkxQSIO4E0
290
+ and is not trusted on your system. Only run scripts from trusted publishers.
291
+ [V] Never run [D] Do not run [R] Run once [A] Always run [?] Help
292
+ (default is "D"):A
293
+ (foo) PS C:\>
294
+
295
+ If you select ``[A] Always Run``, the certificate will be added to the
296
+ Trusted Publishers of your user account, and will be trusted in this
297
+ user's context henceforth. If you select ``[R] Run Once``, the script will
298
+ be run, but you will be prometed on a subsequent invocation. Advanced users
299
+ can add the signer's certificate to the Trusted Publishers of the Computer
300
+ account to apply to all users (though this technique is out of scope of this
301
+ document).
302
+
303
+ Alternatively, you may relax the system execution policy to allow running
304
+ of local scripts without verifying the code signature using the following::
305
+
306
+ PS C:\> Set-ExecutionPolicy RemoteSigned
307
+
308
+ Since the ``activate.ps1`` script is generated locally for each virtualenv,
309
+ it is not considered a remote script and can then be executed.
310
+
311
+ .. _`execution policies`: http://technet.microsoft.com/en-us/library/dd347641.aspx
267
312
268
313
The ``--system-site-packages`` Option
269
314
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -376,7 +421,16 @@ Description:
376
421
If this option is provided, virtualenv will never try to download
377
422
setuptools/distribute or pip. Instead, it will exit with status code 1
378
423
if it fails to find local distributions for any of these required
379
- packages.
424
+ packages. The local distribution lookup is done in this order and the
425
+ following locations:
426
+
427
+ #. The current directory.
428
+ #. The directory where virtualenv.py is located.
429
+ #. A ``virtualenv_support`` directory relative to the directory where
430
+ virtualenv.py is located.
431
+ #. If the file being executed is not named virtualenv.py (i.e. is a boot
432
+ script), a ``virtualenv_support`` directory relative to wherever
433
+ virtualenv.py is actually installed.
380
434
381
435
Compare & Contrast with Alternatives
382
436
------------------------------------
@@ -420,13 +474,15 @@ Description:
420
474
------------
421
475
422
476
Refer to the `contributing to pip`_ documentation - it applies equally to
423
- virtualenv.
477
+ virtualenv, except that virtualenv issues should filed on the `virtualenv
478
+ repo`_ at GitHub.
424
479
425
480
Virtualenv's release schedule is tied to pip's -- each time there's a new pip
426
481
release, there will be a new virtualenv release that bundles the new version of
427
482
pip.
428
483
429
- .. _contributing to pip: http://www.pip-installer.org/en/latest/how-to-contribute.html
484
+ .. _contributing to pip: http://www.pip-installer.org/en/latest/contributing.html
485
+ .. _virtualenv repo: https://github.com/pypa/virtualenv/
430
486
431
487
Running the tests
432
488
~~~~~~~~~~~~~~~~~
@@ -478,16 +534,121 @@ Description:
478
534
<http://code.google.com/p/modwsgi/wiki/VirtualEnvironments>`_.
479
535
480
536
* `virtualenv commands
481
- <http ://thisismedium .com/tech/extending- virtualenv/ >`_ for some more
537
+ <https ://github .com/thisismedium/ virtualenv-commands >`_ for some more
482
538
workflow-related tools around virtualenv.
483
539
540
+ Status and License
541
+ ------------------
542
+
543
+ ``virtualenv`` is a successor to `workingenv
544
+ <http://cheeseshop.python.org/pypi/workingenv.py>`_, and an extension
545
+ of `virtual-python
546
+ <http://peak.telecommunity.com/DevCenter/EasyInstall#creating-a-virtual-python>`_.
547
+
548
+ It was written by Ian Bicking, sponsored by the `Open Planning
549
+ Project <http://openplans.org>`_ and is now maintained by a
550
+ `group of developers <https://github.com/pypa/virtualenv/raw/master/AUTHORS.txt>`_.
551
+ It is licensed under an
552
+ `MIT-style permissive license <https://github.com/pypa/virtualenv/raw/master/LICENSE.txt>`_.
553
+
484
554
Changes & News
485
555
--------------
486
556
557
+ .. warning::
558
+
559
+ Python bugfix releases 2.6.8, 2.7.3, 3.1.5 and 3.2.3 include a change that
560
+ will cause "import random" to fail with "cannot import name urandom" on any
561
+ virtualenv created on a Unix host with an earlier release of Python
562
+ 2.6/2.7/3.1/3.2, if the underlying system Python is upgraded. This is due to
563
+ the fact that a virtualenv uses the system Python's standard library but
564
+ contains its own copy of the Python interpreter, so an upgrade to the system
565
+ Python results in a mismatch between the version of the Python interpreter
566
+ and the version of the standard library. It can be fixed by removing
567
+ ``$ENV/bin/python`` and re-running virtualenv on the same target directory
568
+ with the upgraded Python.
569
+
570
+
571
+ 1.7.2 (2012-06-22)
572
+ ~~~~~~~~~~~~~~~~~~
573
+
574
+ * Updated to distribute 0.6.27.
575
+
576
+ * Fix activate.fish on OS X. Fixes #8. Thanks David Schoonover.
577
+
578
+ * Create a virtualenv-x.x script with the Python version when installing, so
579
+ virtualenv for multiple Python versions can be installed to the same
580
+ script location. Thanks Miki Tebeka.
581
+
582
+ * Restored ability to create a virtualenv with a path longer than 78
583
+ characters, without breaking creation of virtualenvs with non-ASCII paths.
584
+ Thanks, Bradley Ayers.
585
+
586
+ * Added ability to create virtualenvs without having installed Apple's
587
+ developers tools (using an own implementation of ``install_name_tool``).
588
+ Thanks Mike Hommey.
589
+
590
+ * Fixed PyPy and Jython support on Windows. Thanks Konstantin Zemlyak.
591
+
592
+ * Added pydoc script to ease use. Thanks Marc Abramowitz. Fixes #149.
593
+
594
+ * Fixed creating a bootstrap script on Python 3. Thanks Raul Leal. Fixes #280.
595
+
596
+ * Fixed inconsistency when having set the ``PYTHONDONTWRITEBYTECODE`` env var
597
+ with the --distribute option or the ``VIRTUALENV_USE_DISTRIBUTE`` env var.
598
+ ``VIRTUALENV_USE_DISTRIBUTE`` is now considered again as a legacy alias.
599
+
600
+ 1.7.1.2 (2012-02-17)
601
+ ~~~~~~~~~~~~~~~~~~~~
602
+
603
+ * Fixed minor issue in `--relocatable`. Thanks, Cap Petschulat.
604
+
605
+ 1.7.1.1 (2012-02-16)
606
+ ~~~~~~~~~~~~~~~~~~~~
607
+
608
+ * Bumped the version string in ``virtualenv.py`` up, too.
609
+
610
+ * Fixed rST rendering bug of long description.
611
+
612
+ 1.7.1 (2012-02-16)
613
+ ~~~~~~~~~~~~~~~~~~
614
+
615
+ * Update embedded pip to version 1.1.
616
+
617
+ * Fix `--relocatable` under Python 3. Thanks Doug Hellmann.
618
+
619
+ * Added environ PATH modification to activate_this.py. Thanks Doug
620
+ Napoleone. Fixes #14.
621
+
622
+ * Support creating virtualenvs directly from a Python build directory on
623
+ Windows. Thanks CBWhiz. Fixes #139.
624
+
625
+ * Use non-recursive symlinks to fix things up for posix_local install
626
+ scheme. Thanks michr.
627
+
628
+ * Made activate script available for use with msys and cygwin on Windows.
629
+ Thanks Greg Haskins, Cliff Xuan, Jonathan Griffin and Doug Napoleone.
630
+ Fixes #176.
631
+
632
+ * Fixed creation of virtualenvs on Windows when Python is not installed for
633
+ all users. Thanks Anatoly Techtonik for report and patch and Doug
634
+ Napoleone for testing and confirmation. Fixes #87.
635
+
636
+ * Fixed creation of virtualenvs using -p in installs where some modules
637
+ that ought to be in the standard library (e.g. `readline`) are actually
638
+ installed in `site-packages` next to `virtualenv.py`. Thanks Greg Haskins
639
+ for report and fix. Fixes #167.
640
+
641
+ * Added activation script for Powershell (signed by Jannis Leidel). Many
642
+ thanks to Jason R. Coombs.
643
+
487
644
1.7 (2011-11-30)
488
645
~~~~~~~~~~~~~~~~
489
646
490
- * Updated embedded Distribute release to 0.6.24. Thanks Alex Grönholm.
647
+ * Gave user-provided ``--extra-search-dir`` priority over default dirs for
648
+ finding setuptools/distribute (it already had priority for finding pip).
649
+ Thanks Ethan Jucovy.
650
+
651
+ * Updated embedded Distribute release to 0.6.24. Thanks Alex Gronholm.
491
652
492
653
* Made ``--no-site-packages`` behavior the default behavior. The
493
654
``--no-site-packages`` flag is still permitted, but displays a warning when
@@ -645,7 +806,7 @@ Description:
645
806
* Fix problem with ``virtualenv --relocate`` when ``bin/`` has
646
807
subdirectories (e.g., ``bin/.svn/``); from Alan Franzoni.
647
808
648
- * If you set ``$VIRTUALENV_USE_DISTRIBUTE `` then virtualenv will use
809
+ * If you set ``$VIRTUALENV_DISTRIBUTE `` then virtualenv will use
649
810
Distribute by default (so you don't have to remember to use
650
811
``--distribute``).
651
812
0 commit comments