|
2 | 2 | set -e
|
3 | 3 | set -x
|
4 | 4 |
|
5 |
| -# We want to create the virtual environment here, but not actually run anything |
6 |
| -tox --notest |
7 |
| - |
8 |
| -# If we have a VENDOR=no then we want to reinstall pip into the virtual |
9 |
| -# environment without the vendor directory included as well as install the |
10 |
| -# dependencies we need installed. |
11 |
| -if [[ $VENDOR = "no" ]]; then |
12 |
| - # Install our dependencies if we're not installing from wheels |
13 |
| - if [[ $WHEELS != "yes" ]]; then |
14 |
| - .tox/$TOXENV/bin/pip install -r src/pip/_vendor/vendor.txt --no-deps |
15 |
| - fi |
16 |
| - |
17 |
| - # Install our dependencies if we're installing from wheels |
18 |
| - if [[ $WHEELS = "yes" ]]; then |
19 |
| - mkdir -p /tmp/wheels |
20 |
| - pip wheel --wheel-dir /tmp/wheels --no-deps -r src/pip/_vendor/vendor.txt |
21 |
| - cp /tmp/wheels/* `echo .tox/$TOXENV/lib/python*/site-packages/pip/_vendor/` |
22 |
| - fi |
23 |
| - |
24 |
| - # Remove the vendored dependencies from within the installed pip inside of |
25 |
| - # our installed copy of pip. |
26 |
| - find .tox/$TOXENV/lib/python*/site-packages/pip/_vendor -d \ |
27 |
| - -not -regex '.*/pip/_vendor/__init__\.py$' \ |
28 |
| - -not -regex '.*/pip/_vendor$' \ |
29 |
| - -exec rm -rf {} \; |
30 |
| - |
31 |
| - # Patch our installed pip/_vendor/__init__.py so that it knows to look for |
32 |
| - # the vendored dependencies instead of only looking for the vendored. |
33 |
| - sed -i 's/DEBUNDLED = False/DEBUNDLED = True/' \ |
34 |
| - .tox/$TOXENV/lib/python*/site-packages/pip/_vendor/__init__.py |
35 |
| - |
36 |
| - # Test to make sure that we successfully installed without vendoring |
37 |
| - if [ -f .tox/$TOXENV/lib/python*/site-packages/pip/_vendor/six.py ]; then |
38 |
| - echo "Did not successfully unvendor" |
39 |
| - exit 1 |
40 |
| - fi |
41 |
| -fi |
42 |
| - |
43 | 5 | if [[ $TOXENV == py* ]]; then
|
44 | 6 | # Run unit tests
|
45 | 7 | tox -- -m unit
|
|
0 commit comments