forked from hypothesis/h
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap
executable file
·66 lines (55 loc) · 1.66 KB
/
bootstrap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash -e
if test -z "$VIRTUAL_ENV"; then
if test ! -e bin/activate; then
echo "
This script can create an isolated environment for installing python
software libraries needed for development. This setup is recommended.
If you are not familiar with using virtualenv [1] to manage a python
development environment you may wish to take a few minutes to read a
bit about it.
If you are comfortable managing it yourself, e.g. through a tool
like virtualenv-wrapper [2], you may decline to create one now.
[1] http://www.virtualenv.org/
[2] http://virtualenvwrapper.readthedocs.org/
"
while true; do
read -p "Create a virtualenv now (recommended)? " yn
case $yn in
[Yy]* )
echo "Creating virtualenv...";
virtualenv --no-site-packages --distribute .;
source bin/activate;
break;;
[Nn]* ) break;;
* ) echo "Please answer yes or no.";;
esac
done
else
source bin/activate
fi
fi
if test -z "$PIP_DOWNLOAD_CACHE"; then
export PIP_DOWNLOAD_CACHE=$PWD/.pip-cache
fi
echo "Ensuring an up-to-date pip..."
pip install -U pip
echo "Checking dependencies..."
diff -q requirements.txt .installed.txt 2> /dev/null || {
echo "Installing dependencies..."
pip install -r requirements.txt
cp requirements.txt .installed.txt
}
echo -n "Setting up development links..."
python setup.py develop
echo -n "Checking for Compass..."
command -v compass || echo "...not found!"
echo -n "Checking for CoffeeScript..."
command -v coffee || echo "...not found!"
echo -n "Checking for UglifyJS..."
command -v uglifyjs || {
echo "...not found!"
echo
echo "UglifyJS was not found. You MUST run in debug mode."
echo "The development configuration does this."
echo
}