mirror of https://github.com/pypa/pip
Remove vendored test support, as it's never worked
Since de-vendoring support exists only for downstream, and they need to patch pip to get that support anyways, it seems reasonable to push support for testing that configuration onto them. This is something they need to do anyways, since they need to test their versions of the vendored libraries. See https://github.com/pypa/pip/pull/4657 for more information.
This commit is contained in:
parent
95bcf8c5f6
commit
8860dc016a
|
@ -18,11 +18,6 @@ matrix:
|
|||
python: 2.7
|
||||
- env: TOXENV=py36
|
||||
python: 3.6
|
||||
# Unvendored
|
||||
- env: "TOXENV=py27 VENDOR=no WHEELS=yes"
|
||||
python: 2.7
|
||||
- env: "TOXENV=py36 VENDOR=no WHEELS=yes"
|
||||
python: 3.6
|
||||
# All the other Py3 versions
|
||||
- env: TOXENV=py33
|
||||
python: 3.3
|
||||
|
|
|
@ -2,44 +2,6 @@
|
|||
set -e
|
||||
set -x
|
||||
|
||||
# We want to create the virtual environment here, but not actually run anything
|
||||
tox --notest
|
||||
|
||||
# If we have a VENDOR=no then we want to reinstall pip into the virtual
|
||||
# environment without the vendor directory included as well as install the
|
||||
# dependencies we need installed.
|
||||
if [[ $VENDOR = "no" ]]; then
|
||||
# Install our dependencies if we're not installing from wheels
|
||||
if [[ $WHEELS != "yes" ]]; then
|
||||
.tox/$TOXENV/bin/pip install -r src/pip/_vendor/vendor.txt --no-deps
|
||||
fi
|
||||
|
||||
# Install our dependencies if we're installing from wheels
|
||||
if [[ $WHEELS = "yes" ]]; then
|
||||
mkdir -p /tmp/wheels
|
||||
pip wheel --wheel-dir /tmp/wheels --no-deps -r src/pip/_vendor/vendor.txt
|
||||
cp /tmp/wheels/* `echo .tox/$TOXENV/lib/python*/site-packages/pip/_vendor/`
|
||||
fi
|
||||
|
||||
# Remove the vendored dependencies from within the installed pip inside of
|
||||
# our installed copy of pip.
|
||||
find .tox/$TOXENV/lib/python*/site-packages/pip/_vendor -d \
|
||||
-not -regex '.*/pip/_vendor/__init__\.py$' \
|
||||
-not -regex '.*/pip/_vendor$' \
|
||||
-exec rm -rf {} \;
|
||||
|
||||
# Patch our installed pip/_vendor/__init__.py so that it knows to look for
|
||||
# the vendored dependencies instead of only looking for the vendored.
|
||||
sed -i 's/DEBUNDLED = False/DEBUNDLED = True/' \
|
||||
.tox/$TOXENV/lib/python*/site-packages/pip/_vendor/__init__.py
|
||||
|
||||
# Test to make sure that we successfully installed without vendoring
|
||||
if [ -f .tox/$TOXENV/lib/python*/site-packages/pip/_vendor/six.py ]; then
|
||||
echo "Did not successfully unvendor"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $TOXENV == py* ]]; then
|
||||
# Run unit tests
|
||||
tox -- -m unit
|
||||
|
|
Loading…
Reference in New Issue