Skip to content

Commit 6d787d3

Browse files
committed
Merge remote-tracking branch 'origin/update_docs_bitbucket' into update_docs_bitbucket
2 parents 5c857be + c91d69e commit 6d787d3

18 files changed

+286
-197
lines changed

.github/workflows/test.yml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
name: Test
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
9+
# Test different python versions with bash on Ubuntu.
10+
ubuntu:
11+
name: Test Ubuntu
12+
runs-on: ubuntu-latest
13+
if: ${{ !startsWith(github.ref, 'refs/tags') }}
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python-version:
19+
- 3.8
20+
- 3.9
21+
- "3.10"
22+
- "3.11"
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Set up Python ${{ matrix.python-version }}
30+
uses: actions/setup-python@v4
31+
with:
32+
python-version: ${{ matrix.python-version }}
33+
34+
- name: Install dependencies
35+
run: python -m pip install tox
36+
37+
- name: Run tests
38+
run: tox -e py
39+
40+
# Test the latest python version with zsh on macOS
41+
zsh:
42+
name: Test Zsh
43+
runs-on: macos-latest
44+
if: ${{ !startsWith(github.ref, 'refs/tags') }}
45+
46+
strategy:
47+
fail-fast: false
48+
49+
steps:
50+
- uses: actions/checkout@v3
51+
with:
52+
fetch-depth: 0
53+
54+
- name: Set up Python ${{ matrix.python-version }}
55+
uses: actions/setup-python@v4
56+
with:
57+
python-version: "3.11"
58+
59+
- name: Install dependencies
60+
run: python -m pip install tox
61+
62+
- name: Run tests
63+
run: tox -e zsh
64+
65+
# Test different python versions with bash on macOS
66+
macos:
67+
name: Test macOS
68+
runs-on: macos-latest
69+
if: ${{ !startsWith(github.ref, 'refs/tags') }}
70+
71+
strategy:
72+
fail-fast: false
73+
matrix:
74+
python-version:
75+
- 3.8
76+
- 3.9
77+
- "3.10"
78+
- "3.11"
79+
80+
steps:
81+
- uses: actions/checkout@v3
82+
with:
83+
fetch-depth: 0
84+
85+
- name: Set up Python ${{ matrix.python-version }}
86+
uses: actions/setup-python@v4
87+
with:
88+
python-version: ${{ matrix.python-version }}
89+
90+
- name: Install dependencies
91+
run: python -m pip install tox
92+
93+
- name: Run tests
94+
run: tox -e py
95+
96+
# Run various style checkers
97+
style:
98+
runs-on: ubuntu-latest
99+
if: ${{ !startsWith(github.ref, 'refs/tags') }}
100+
101+
strategy:
102+
fail-fast: false
103+
matrix:
104+
tox-environment:
105+
- docs
106+
- style
107+
- pkglint
108+
109+
steps:
110+
- uses: actions/checkout@v3
111+
with:
112+
fetch-depth: 0
113+
114+
- name: Set up Python
115+
uses: actions/setup-python@v4
116+
with:
117+
python-version: "3.11"
118+
119+
- name: Install dependencies
120+
run: python -m pip install tox
121+
122+
- name: Run
123+
run: tox -e ${{ matrix.tox-environment }}

.mergify.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
pull_request_rules:
2+
3+
- name: Add CI label
4+
conditions:
5+
- or:
6+
- "title~=^tox:"
7+
- "title~=^ci:"
8+
- "files~=tox.ini"
9+
- "files~=tests"
10+
actions:
11+
label:
12+
add:
13+
- ci
14+
15+
- name: Add Mergify label
16+
conditions:
17+
- or:
18+
- "title~=^mergify:"
19+
- "files~=.mergify.yml$"
20+
actions:
21+
label:
22+
add:
23+
- mergify
24+
25+
- name: Add Documentation label
26+
conditions:
27+
- or:
28+
- "title~=^docs:"
29+
- "files~=docs"
30+
- "files~=.rst$"
31+
actions:
32+
label:
33+
add:
34+
- documentation
35+
36+
- name: Automatic merge on approval
37+
conditions:
38+
- and:
39+
- "check-success=style (docs)"
40+
- "check-success=style (style)"
41+
- "check-success=style (pkglint)"
42+
- "check-success=Test macOS (3.8)"
43+
- "check-success=Test macOS (3.9)"
44+
- "check-success=Test macOS (3.10)"
45+
- "check-success=Test macOS (3.11)"
46+
- "check-success=Test Ubuntu (3.8)"
47+
- "check-success=Test Ubuntu (3.9)"
48+
- "check-success=Test Ubuntu (3.10)"
49+
- "check-success=Test Ubuntu (3.11)"
50+
- "check-success=Test Zsh"
51+
- "-draft"
52+
- "#approved-reviews-by>=1"
53+
actions:
54+
merge:
55+
method: merge

docs/source/command_ref.rst

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -465,36 +465,6 @@ for the environment.
465465

466466
*Based on a contribution from James Bennett and Jannis Leidel.*
467467

468-
.. _command-toggleglobalsitepackages:
469-
470-
toggleglobalsitepackages
471-
------------------------
472-
473-
Controls whether the active virtualenv will access the packages in the
474-
global Python ``site-packages`` directory.
475-
476-
Syntax::
477-
478-
toggleglobalsitepackages [-q]
479-
480-
Outputs the new state of the virtualenv. Use the ``-q`` switch to turn off all
481-
output.
482-
483-
::
484-
485-
$ mkvirtualenv env1
486-
New python executable in env1/bin/python
487-
Installing setuptools.............................................
488-
..................................................................
489-
..................................................................
490-
done.
491-
(env1)$ toggleglobalsitepackages
492-
Disabled global site-packages
493-
(env1)$ toggleglobalsitepackages
494-
Enabled global site-packages
495-
(env1)$ toggleglobalsitepackages -q
496-
(env1)$
497-
498468
============================
499469
Project Directory Management
500470
============================

docs/source/developers.rst

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,22 +69,29 @@ The test suite for virtualenvwrapper uses shunit2_ and tox_. The
6969
shunit2 source is included in the ``tests`` directory, but tox must be
7070
installed separately (``pip install tox``).
7171

72-
To run the tests under bash, zsh, and ksh for Python 2.7 through 3.6,
73-
run ``tox`` from the top level directory of the hg repository.
72+
To run the tests under bash and zsh for the default Python,
73+
run ``tox`` from the top level directory of the hg repository::
74+
75+
$ tox
7476

7577
To run individual test scripts, use a command like::
7678

77-
$ tox tests/test_cd.sh
79+
$ tox -- tests/test_cd.sh
7880

7981
To run tests under a single version of Python, specify the appropriate
8082
environment when running tox::
8183

82-
$ tox -e py27
84+
$ tox -e py311
8385

8486
Combine the two modes to run specific tests with a single version of
8587
Python::
8688

87-
$ tox -e py27 tests/test_cd.sh
89+
$ tox -e py311 -- tests/test_cd.sh
90+
91+
To stop the test suite as soon as any test fails, use the `fast` tox
92+
target::
93+
94+
$ tox -e fast
8895

8996
Add new tests by modifying an existing file or creating new script in
9097
the ``tests`` directory.

setup.cfg

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
11
[metadata]
22
name = virtualenvwrapper
33
author = Doug Hellmann
4-
author-email = [email protected]
4+
author_email = [email protected]
55
summary = Enhancements to virtualenv
6-
description-file = README.txt
6+
description_file = README.txt
77
license = MIT
88
classifier =
99
Development Status :: 5 - Production/Stable
1010
License :: OSI Approved :: MIT License
1111
Programming Language :: Python
12-
Programming Language :: Python :: 2
13-
Programming Language :: Python :: 2.6
14-
Programming Language :: Python :: 2.7
1512
Programming Language :: Python :: 3
16-
Programming Language :: Python :: 3.3
17-
Programming Language :: Python :: 3.4
18-
Programming Language :: Python :: 3.5
19-
Programming Language :: Python :: 3.6
20-
Intended Audience :: Developers
13+
Programming Language :: Python :: 3.8
14+
Programming Language :: Python :: 3.9
15+
Programming Language :: Python :: 3.10
16+
Programming Language :: Python :: 3.11
17+
Intended Audience :: Developers
2118
Environment :: Console
2219
keywords =
2320
virtualenv
24-
home-page = https://virtualenvwrapper.readthedocs.io/
21+
home_page = https://virtualenvwrapper.readthedocs.io/
2522
zip_safe = False
2623

2724
[files]

tests/run_tests

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- mode: shell-script -*-
22
#set -x
33

4-
envdir="$1"
4+
envdir="$(cd $1 && pwd)"
55
shift
66
scripts="$*"
77
if [ -z "$scripts" ]
@@ -14,6 +14,9 @@ then
1414
fi
1515
fi
1616

17+
# Override FAIL_FAST to true to exit as soon as any test fails
18+
FAIL_FAST=${FAIL_FAST:-false}
19+
1720
# Force the tox virtualenv to be active.
1821
#
1922
# Since this script runs from within a separate shell created by tox,
@@ -33,7 +36,7 @@ export HOOK_VERBOSE_OPTION
3336

3437
# Force virtualenvwrapper to use the python interpreter in the
3538
# tox-created virtualenv.
36-
VIRTUALENVWRAPPER_PYTHON="$envdir/bin/python"
39+
VIRTUALENVWRAPPER_PYTHON="$envdir/bin/python3"
3740
export VIRTUALENVWRAPPER_PYTHON
3841

3942
# Clear any user settings for the hook directory or log directory
@@ -44,6 +47,7 @@ unset VIRTUALENVWRAPPER_VIRTUALENV_ARGS
4447

4548
# Run the test scripts with a little formatting around them to make it
4649
# easier to find where each script output starts.
50+
RC=0
4751
for test_script in $scripts
4852
do
4953

@@ -66,9 +70,14 @@ do
6670
echo
6771
SHUNIT_PARENT="$test_script"
6872
export SHUNIT_PARENT
69-
$SHELL $test_shell_opts $test_script || exit 1
73+
if ! $SHELL $test_shell_opts $test_script; then
74+
RC=1
75+
if $FAIL_FAST; then
76+
exit $RC
77+
fi
78+
fi
7079
echo
7180

7281
done
7382

74-
exit 0
83+
exit $RC

tests/setup.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,3 @@ export WORKON_HOME=$(mktemp -d -t "WORKON_HOME.XXXX.$$")
1010
export PROJECT_HOME=$(mktemp -d -t "PROJECT_HOME.XXXX.$$")
1111

1212
#unset HOOK_VERBOSE_OPTION
13-
14-
# tox no longer exports these variables by default, so set them
15-
# ourselves to ensure the tests that rely on the values work
16-
export USER=$(id -u -n)
17-
export HOME=$(id -P | cut -f9 -d:)

0 commit comments

Comments
 (0)