Skip to content

Commit 0340455

Browse files
committed
merge 2.0 changes into tip
2 parents 279e798 + 02f05b6 commit 0340455

36 files changed

+1944
-579
lines changed

.hgignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
syntax: glob
2+
distribute*.egg
3+
distribute*.tar.gz
24
README.html
35
virtualenvwrapper.egg-info
4-
paver-minilib.zip
5-
setup.py
66
trace.txt
7-
docs
7+
dist
8+
docs/build
9+
docs/website
810
*.pyc
911
sphinx/web/templates/base.html
1012
tests/catch_output
1113
tests/testpackage/build
1214
tests/testpackage/dist
1315
tests/testpackage/testpackage.egg-info
16+
virtualenvwrapper/docs
1417

1518
syntax: re
1619
.DS_Store

MANIFEST.in

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
include setup.py
2-
include paver-minilib.zip
3-
include pavement.py
2+
include distribute_setup.py
43
include tests/*
54
recursive-include virtualenvwrapper *.html *.txt *.css *.js *.png
6-
recursive-include docsource *.rst
5+
recursive-include docs *.rst

Makefile

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Get the version of the app. This is used in the doc build.
2+
export VERSION=$(shell python setup.py --version)
3+
4+
# Default target is to build the source distribution.
5+
.PHONY: sdist
6+
sdist: html
7+
python setup.py sdist
8+
9+
# Documentation
10+
.PHONY: html
11+
html:
12+
rm -rf virtualenvwrapper/docs
13+
(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/pkg")
14+
cp -r docs/build/html virtualenvwrapper/docs
15+
16+
# Website copy of documentation
17+
.PHONY: website
18+
website: docs/sphinx/web/templates/base.html
19+
rm -rf docs/website
20+
(cd docs && $(MAKE) html SPHINXOPTS="-c sphinx/web" BUILDDIR="website")
21+
22+
installwebsite: website
23+
(cd docs/website/html && rsync --rsh=ssh --archive --delete --verbose . www.doughellmann.com:/var/www/doughellmann/DocumentRoot/docs/virtualenvwrapper2/)
24+
25+
# Register the new version on pypi
26+
.PHONY: register
27+
register:
28+
python setup.py register
29+
30+
# Copy the base template from my website build directory
31+
docs/sphinx/web/templates/base.html: ~/Devel/doughellmann/doughellmann/templates/base.html
32+
cp $< $@
33+
34+
# Testing
35+
TEST_SCRIPTS=$(wildcard tests/test*.sh)
36+
37+
.PHONY: develop test test-bash test-sh test-zsh test-loop test-install
38+
test: develop test-bash test-sh test-zsh test-install
39+
40+
develop:
41+
python setup.py develop
42+
43+
test-bash:
44+
TEST_SHELL=bash $(MAKE) test-loop
45+
46+
test-sh:
47+
TEST_SHELL=sh $(MAKE) test-loop
48+
49+
test-zsh:
50+
TEST_SHELL="zsh -o shwordsplit" $(MAKE) test-loop
51+
52+
test-loop:
53+
@for test_script in $(wildcard tests/test*.sh) ; do \
54+
echo '********************************************************************************' ; \
55+
echo "Running $$test_script with $(TEST_SHELL)" ; \
56+
SHUNIT_PARENT=$$test_script $(TEST_SHELL) $$test_script || exit 1 ; \
57+
echo ; \
58+
done
59+
60+
test-install:
61+
bash ./tests/manual_test_install.sh `pwd`/dist "$(VERSION)"

README renamed to README.rst

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ Features
2323
4. Tab completion for commands that take a virtual environment as
2424
argument.
2525

26+
5. User-configurable hooks for all operations.
27+
28+
6. Plugin system for more creating sharable extensions.
29+
2630
Rich Leland has created a short `screencast
2731
<http://mathematism.com/2009/jul/30/presentation-pip-and-virtualenv/>`__
2832
showing off the features of virtualenvwrapper.
@@ -34,20 +38,31 @@ Quick Setup
3438
1. Create a directory to hold all of the virtual environments. The default is
3539
``$HOME/.virtualenvs``.
3640

37-
2. Add two lines to your .bashrc to set the location where the virtual environments should
38-
live and the location of the script installed with this package::
41+
2. Add two lines to your shell startup file (``.bashrc``,
42+
``.profile``, etc.) to set the location where the virtual
43+
environments should live and the location of the script installed
44+
with this package::
3945

4046
export WORKON_HOME=$HOME/.virtualenvs
41-
source /usr/local/bin/virtualenvwrapper_bashrc
47+
source /usr/local/bin/virtualenvwrapper.sh
4248

43-
3. Run: ``source ~/.bashrc``
49+
3. Reload the startup file (e.g., run: ``source ~/.bashrc``).
4450
4. Run: ``workon``
4551
5. A list of environments, empty, is printed.
4652
6. Run: ``mkvirtualenv temp``
4753
7. A new environment, ``temp`` is created and activated.
4854
8. Run: ``workon``
4955
9. This time, the ``temp`` environment is included.
5056

57+
Upgrading from 1.x
58+
==================
59+
60+
The shell script containing the wrapper functions has been renamed in
61+
the 2.x series to reflect the fact that shells other than bash are
62+
supported. In your startup file, change ``source
63+
/usr/local/bin/virtualenvwrapper_bashrc`` to ``source
64+
/usr/local/bin/virtualenvwrapper.sh``.
65+
5166
=======
5267
License
5368
=======

0 commit comments

Comments
 (0)