Skip to content

Commit 4942fed

Browse files
committed
merged from original
2 parents 3edf55b + 3441f91 commit 4942fed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+3140
-419
lines changed

.hgignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
syntax: glob
2+
*~
23
*.pyc
34
README.html
45
build
@@ -12,10 +13,14 @@ tests/catch_output
1213
tests/testpackage/build
1314
tests/testpackage/dist
1415
tests/testpackage/testpackage.egg-info
16+
tests/testtemplate/build
17+
tests/testtemplate/dist
18+
tests/testtemplate/testtemplate.egg-info
1519
trace.txt
1620
virtualenvwrapper.egg-info
1721
virtualenvwrapper/docs
1822
.tox
23+
*.orig
1924

2025
syntax: re
2126
.DS_Store

.hgtags

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,17 @@ b0f27c65fa64627599c2a022a076ae5ee7157ae4 2.6
6868
445a58d5a05a1426cefb47e54b692b6a58fdcc4f 2.6.1
6969
625d85d3136ff746accc490c5f9210b1b0074533 2.6.2
7070
e7582879df06689ec54cd820c377e89114b75ee2 2.6.3
71+
e7582879df06689ec54cd820c377e89114b75ee2 2.6.3
72+
246ce68795ea9caeb88ec2fa17e4f3151c58cf3f 2.6.3
73+
ea378ef00313cd77d251e61b4c0422503972b79f 2.7
74+
b20cf787d8e1c167853709ca01731a3efb4b5fe8 2.7.1
75+
7e0abe005937033aaf5d00fe3db3c94addecef7b 2.8
76+
7e0abe005937033aaf5d00fe3db3c94addecef7b 2.8
77+
279244c0fa41a327cc534fc40e9e7fadea180c23 2.8
78+
9e10c201a5005cc2d6c6728dfb0cda56deb4339d 2.10.1
79+
ff4d492c873c324ccfb71bc71118a67aa6195ad2 2.11
80+
12a1e0b65313944c3a28d9e71fdef1c7cd41b930 2.11.1
81+
434b87ebc24ae24e6928c72d79764379aae87130 3.0
82+
14cf7e58d32174c8e90cf6914a6604f3cff9f279 3.0.1
83+
ebbb3ba8168703861c016ed66f443fb898f0b06b 3.1
84+
dccf1a1abf4ea97589e9fa141167771049f031e0 3.2

ChangeLog

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
2011-04-13 Doug Hellmann <[email protected]>
2+
3+
* virtualenvwrapper.sh (rmvirtualenv): Move to a safe directory
4+
before removing the virtual environment, and only move back if the
5+
previously occupied directory still exists.
6+
7+
2011-04-10 Doug Hellmann <[email protected]>
8+
9+
* virtualenvwrapper.sh: Initialize VIRTUALENVWRAPPER_LOG_DIR and
10+
VIRTUALENVWRAPPER_HOOK_DIR.
11+
12+
* virtualenvwrapper/hook_loader.py (main): Use
13+
VIRTUALENVWRAPPER_LOG_DIR for logs instead of assuming
14+
WORKON_HOME.
15+
16+
* virtualenvwrapper/user_scripts.py (make_hook): Change verbosity
17+
of message telling the user we have created a new hook script for
18+
them.
19+
120
2011-02-26 Doug Hellmann <[email protected]>
221

322
* docs/sphinx/conf.py: Just hard-code the version.

MANIFEST.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
include setup.py
22
include distribute_setup.py
33
include tests/*
4+
include tests/testpackage/setup.py
5+
include tests/testpackage/testscript.py
6+
include tests/testtemplate/distribute_setup.py
7+
include tests/testtemplate/setup.py
8+
include tests/testtemplate/mytemplates/*.py
49
recursive-include docs *.rst *.py *.html *.css *.js *.png *.txt
10+
include tox.ini
511

README.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ Python Versions
5858

5959
virtualenvwrapper is tested under Python 2.4 - 2.7.
6060

61+
Upgrading to 2.9
62+
================
63+
64+
Version 2.9 includes the features previously delivered separately by
65+
``virtualenvwrapper.project``. If you have an older verison of the
66+
project extensions installed, remove them before upgrading.
67+
6168
Upgrading from 1.x
6269
==================
6370

@@ -99,6 +106,14 @@ issues. Before reporting bugs in the bug tracker, please test
99106
*without* your aliases enabled. If you can identify the alias causing
100107
the problem, that will help make virtualenvwrapper more robust.
101108

109+
==========
110+
Change Log
111+
==========
112+
113+
The `release history`_ is part of the project documentation.
114+
115+
.. _release history: http://www.doughellmann.com/docs/virtualenvwrapper/history.html
116+
102117
=======
103118
License
104119
=======

announce.rst

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
=======================
2+
virtualenvwrapper 3.2
3+
=======================
4+
5+
.. tags:: virtualenvwrapper release python
6+
17
What is virtualenvwrapper
28
=========================
39

@@ -7,15 +13,31 @@ virtual environments and otherwise managing your development workflow,
713
making it easier to work on more than one project at a time without
814
introducing conflicts in their dependencies.
915

10-
What's New in 2.2.1
16+
What's New in 3.2
1117
=================
1218

13-
Version 2.2.1 is a bug-fix release:
19+
- Make ``project_dir`` a local variable so that
20+
``cdproject`` does not interfere with other variables
21+
the user might have set. (contributed by ``slackorama``)
22+
- Fix typo in documentation reported by Nick Martin.
23+
- Change trove classifier for license "MIT" to reflect the license
24+
text presented in the documentation. *This does not indicate a
25+
change in the license, just a correction to the expression of that
26+
intent.* (contributed by ``ralphbean`` as fix for issue 134)
27+
- Extend ``rmvirtualenv`` to allow removing more than one
28+
environment at a time. (contributed by ``ciberglo``)
29+
- Change the definition of ``virtualenvwrapper_get_site_packages_dir``
30+
to ask ``distutils`` for the ``site-packages`` directory instead of
31+
trying to build the path ourselves in the shell script. This should
32+
resolve issue 112 and improve support for Python interpreters other
33+
than C Python. Thanks to Carl Meyer and Dario Bertini for their
34+
contributions toward the fix.
35+
36+
Installing
37+
==========
1438

15-
- Escape ``which`` calls to avoid aliases. (#46)
16-
- Integrate Manuel Kaufmann's patch to unset GREP_OPTIONS before
17-
calling grep. (#51)
18-
- Escape ``$`` in regex to resolve #53.
39+
Visit the virtualenvwrapper_ project page for download links and
40+
installation instructions.
1941

2042
.. _virtualenv: http://pypi.python.org/pypi/virtualenv
2143

docs/en/command_ref.rst

Lines changed: 171 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ Create a new environment, in the WORKON_HOME.
2222

2323
Syntax::
2424

25-
mkvirtualenv [options] ENVNAME
25+
mkvirtualenv [-a project_path] [-i package] [-r requirements_file] [virtualenv options] ENVNAME
2626

27-
All command line options are passed directly to ``virtualenv``. The
28-
new environment is automatically activated after being initialized.
27+
All command line options except ``-a``, ``-i``, ``-r``, and ``-h`` are passed
28+
directly to ``virtualenv``. The new environment is automatically
29+
activated after being initialized.
2930

3031
::
3132

@@ -40,10 +41,49 @@ new environment is automatically activated after being initialized.
4041
mynewenv
4142
(mynewenv)$
4243

44+
The ``-a`` option can be used to associate an existing project
45+
directory with the new environment.
46+
47+
The ``-i`` option can be used to install one or more packages (by
48+
repeating the option) after the environment is created.
49+
50+
The ``-r`` option can be used to specify a text file listing packages
51+
to be installed. The argument value is passed to ``pip -r`` to be
52+
installed.
53+
4354
.. seealso::
4455

4556
* :ref:`scripts-premkvirtualenv`
4657
* :ref:`scripts-postmkvirtualenv`
58+
* `requirements file format`_
59+
60+
.. _requirements file format: http://www.pip-installer.org/en/latest/requirement-format.html
61+
62+
.. _command-mktmpenv:
63+
64+
mktmpenv
65+
--------
66+
67+
Create a new virtualenv in the ``WORKON_HOME`` directory.
68+
69+
Syntax::
70+
71+
mktmpenv [VIRTUALENV_OPTIONS]
72+
73+
A unique virtualenv name is generated.
74+
75+
::
76+
77+
$ mktmpenv
78+
Using real prefix '/Library/Frameworks/Python.framework/Versions/2.7'
79+
New python executable in 1e513ac6-616e-4d56-9aa5-9d0a3b305e20/bin/python
80+
Overwriting 1e513ac6-616e-4d56-9aa5-9d0a3b305e20/lib/python2.7/distutils/__init__.py
81+
with new content
82+
Installing distribute...............................................
83+
....................................................................
84+
.................................................................done.
85+
This is a temporary environment. It will be deleted when deactivated.
86+
(1e513ac6-616e-4d56-9aa5-9d0a3b305e20) $
4787

4888
.. _command-lsvirtualenv:
4989

@@ -82,6 +122,8 @@ Syntax::
82122

83123
* :ref:`scripts-get_env_details`
84124

125+
.. _command-rmvirtualenv:
126+
85127
rmvirtualenv
86128
------------
87129

@@ -364,3 +406,129 @@ The directory names are added to a path file named
364406
for the environment.
365407

366408
*Based on a contribution from James Bennett and Jannis Leidel.*
409+
410+
.. _command-toggleglobalsitepackages:
411+
412+
toggleglobalsitepackages
413+
------------------------
414+
415+
Controls whether the active virtualenv will access the packages in the
416+
global Python ``site-packages`` directory.
417+
418+
Syntax::
419+
420+
toggleglobalsitepackages [-q]
421+
422+
Outputs the new state of the virtualenv. Use the ``-q`` switch to turn off all
423+
output.
424+
425+
::
426+
427+
$ mkvirtualenv env1
428+
New python executable in env1/bin/python
429+
Installing distribute.............................................
430+
..................................................................
431+
..................................................................
432+
done.
433+
(env1)$ toggleglobalsitepackages
434+
Disabled global site-packages
435+
(env1)$ toggleglobalsitepackages
436+
Enabled global site-packages
437+
(env1)$ toggleglobalsitepackages -q
438+
(env1)$
439+
440+
============================
441+
Project Directory Management
442+
============================
443+
444+
.. seealso::
445+
446+
:ref:`project-management`
447+
448+
.. _command-mkproject:
449+
450+
mkproject
451+
---------
452+
453+
Create a new virtualenv in the WORKON_HOME and project directory in
454+
PROJECT_HOME.
455+
456+
Syntax::
457+
458+
mkproject [-t template] [virtualenv_options] ENVNAME
459+
460+
The template option may be repeated to have several templates used to
461+
create a new project. The templates are applied in the order named on
462+
the command line. All other options are passed to ``mkvirtualenv`` to
463+
create a virtual environment with the same name as the project.
464+
465+
::
466+
467+
$ mkproject myproj
468+
New python executable in myproj/bin/python
469+
Installing distribute.............................................
470+
..................................................................
471+
..................................................................
472+
done.
473+
Creating /Users/dhellmann/Devel/myproj
474+
(myproj)$ pwd
475+
/Users/dhellmann/Devel/myproj
476+
(myproj)$ echo $VIRTUAL_ENV
477+
/Users/dhellmann/Envs/myproj
478+
(myproj)$
479+
480+
.. seealso::
481+
482+
* :ref:`scripts-premkproject`
483+
* :ref:`scripts-postmkproject`
484+
485+
setvirtualenvproject
486+
--------------------
487+
488+
Bind an existing virtualenv to an existing project.
489+
490+
Syntax::
491+
492+
setvirtualenvproject [virtualenv_path project_path]
493+
494+
The arguments to ``setvirtualenvproject`` are the full paths to the
495+
virtualenv and project directory. An association is made so that when
496+
``workon`` activates the virtualenv the project is also activated.
497+
498+
::
499+
500+
$ mkproject myproj
501+
New python executable in myproj/bin/python
502+
Installing distribute.............................................
503+
..................................................................
504+
..................................................................
505+
done.
506+
Creating /Users/dhellmann/Devel/myproj
507+
(myproj)$ mkvirtualenv myproj_new_libs
508+
New python executable in myproj/bin/python
509+
Installing distribute.............................................
510+
..................................................................
511+
..................................................................
512+
done.
513+
Creating /Users/dhellmann/Devel/myproj
514+
(myproj_new_libs)$ setvirtualenvproject $VIRTUAL_ENV $(pwd)
515+
516+
When no arguments are given, the current virtualenv and current
517+
directory are assumed.
518+
519+
Any number of virtualenvs can refer to the same project directory,
520+
making it easy to switch between versions of Python or other
521+
dependencies for testing.
522+
523+
.. _command-cdproject:
524+
525+
cdproject
526+
---------
527+
528+
Change the current working directory to the one specified as the
529+
project directory for the active virtualenv.
530+
531+
Syntax::
532+
533+
cdproject
534+

0 commit comments

Comments
 (0)