Skip to content

Commit deae3d5

Browse files
committed
Remove support for Python 2.4 and 2.5. Update tests to work with virtualenv 1.7, where --no-site-packages is now the default.
1 parent cd77c94 commit deae3d5

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

docs/en/history.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ dev
77
- Add ``-a`` option to :ref:`command-mkvirtualenv` to associate a
88
new virtualenv with an existing project directory. Contributed by
99
Mike Fogel (:bbuser:`mfogel`).
10+
- Drops support for Python 2.4 and 2.5. The tools may still work,
11+
but I no longer have a development environment set up for testing
12+
them, so I do not officially support them.
1013

1114
2.10.1
1215

tests/test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,18 @@ test_get_python_version() {
9292
test_python_interpreter_set_incorrectly() {
9393
return_to="$(pwd)"
9494
cd "$WORKON_HOME"
95-
mkvirtualenv --no-site-packages no_wrappers
95+
mkvirtualenv no_wrappers
9696
expected="ImportError: No module named virtualenvwrapper.hook_loader"
9797
# test_shell is set by tests/run_tests
9898
if [ "$test_shell" = "" ]
9999
then
100-
export test_shell=$SHELL
100+
export test_shell=$SHELL
101101
fi
102102
subshell_output=$(VIRTUALENVWRAPPER_PYTHON="$WORKON_HOME/no_wrappers/bin/python" $test_shell $return_to/virtualenvwrapper.sh 2>&1)
103-
echo "$subshell_output"
103+
#echo "$subshell_output"
104104
echo "$subshell_output" | grep -q "$expected" 2>&1
105105
found_it=$?
106-
echo "$found_it"
106+
#echo "$found_it"
107107
assertTrue "Expected \'$expected\', got: \'$subshell_output\'" "[ $found_it -eq 0 ]"
108108
assertFalse "Failed to detect invalid Python location" "VIRTUALENVWRAPPER_PYTHON=$VIRTUAL_ENV/bin/python $SHELL $return_to/virtualenvwrapper.sh >/dev/null 2>&1"
109109
cd "$return_to"

tests/test_cp.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,14 @@ test_no_site_packages_default_args () {
129129
unset VIRTUALENVWRAPPER_VIRTUALENV_ARGS
130130
}
131131

132+
test_no_site_packages_default_behavior () {
133+
# See issue #102
134+
# virtualenv 1.7 changed to make --no-site-packages the default
135+
mkvirtualenv "source" >/dev/null 2>&1
136+
cpvirtualenv "source" "destination"
137+
ngsp_file="`virtualenvwrapper_get_site_packages_dir`/../no-global-site-packages.txt"
138+
assertTrue "$ngsp_file does not exist in copied env" "[ -f \"$ngsp_file\" ]"
139+
}
140+
132141
. "$test_dir/shunit2"
133142

tests/test_toggleglobalsitepackages.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ oneTimeTearDown() {
1919
setUp () {
2020
echo
2121
rm -f "$test_dir/catch_output"
22-
mkvirtualenv --no-site-packages "globaltest"
22+
mkvirtualenv --system-site-packages "globaltest"
2323
}
2424

2525
tearDown () {

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = py27,py26,py25,py24
2+
envlist = py27,py26
33

44
[testenv]
55
commands = bash ./tests/run_tests {envdir} []

0 commit comments

Comments
 (0)