Skip to content

Commit 03f56c9

Browse files
authored
Merge pull request #1050 from alexwlchan/clean-install
[WIP] Add a test that setuptools can be installed in a clean environment
2 parents f889956 + 7a1aaef commit 03f56c9

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ script:
2727
#- python -m tox
2828
- tox
2929

30+
# Check that setuptools can be installed in a clean environment
31+
- ./clean_install.sh
32+
3033
deploy:
3134
provider: pypi
3235
# Also update server in setup.cfg

clean_install.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env bash
2+
3+
set -o errexit
4+
set -o xtrace
5+
6+
# Create a temporary directory to install the virtualenv in
7+
VENV_DIR="$(mktemp -d)"
8+
function cleanup() {
9+
rm -rf "$VENV_DIR"
10+
}
11+
trap cleanup EXIT
12+
13+
# Create a virtualenv that doesn't have pip or setuptools installed
14+
wget https://github.com/raw/pypa/virtualenv/master/virtualenv.py
15+
python virtualenv.py --no-wheel --no-pip --no-setuptools "$VENV_DIR"
16+
source "$VENV_DIR/bin/activate"
17+
18+
# Now try to install setuptools
19+
python bootstrap.py
20+
python setup.py install

0 commit comments

Comments
 (0)