2013-08-04 14:57:39 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2013-08-17 10:32:49 -05:00
|
|
|
command -v python3 -m venv >/dev/null 2>&1 || { echo >&2 "Python 3.3 required. Install it and try again. Aborting"; exit 1; }
|
2013-08-04 14:57:39 -05:00
|
|
|
|
|
|
|
if [ ! -d "env" ]; then
|
|
|
|
echo "No virtualenv. Creating one"
|
2013-08-04 15:18:31 -05:00
|
|
|
command -v curl >/dev/null 2>&1 || { echo >&2 "curl required. Install it and try again. Aborting"; exit 1; }
|
2013-08-17 10:32:49 -05:00
|
|
|
python3 -m venv --system-site-packages env
|
2013-08-04 14:57:39 -05:00
|
|
|
source env/bin/activate
|
2013-08-04 15:18:31 -05:00
|
|
|
curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | python
|
2013-08-04 14:57:39 -05:00
|
|
|
easy_install pip
|
|
|
|
else
|
|
|
|
echo "There's already an env. Activating it"
|
|
|
|
source env/bin/activate
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Installing pip requirements"
|
|
|
|
if [ "$(uname)" == "Darwin" ]; then
|
2014-01-11 12:27:31 -06:00
|
|
|
pip install -r requirements-osx.txt --allow-external polib --allow-unverified polib
|
2013-08-04 14:57:39 -05:00
|
|
|
else
|
2013-10-20 14:15:09 -05:00
|
|
|
python3 -c "import PyQt5" >/dev/null 2>&1 || { echo >&2 "PyQt 5.1+ required. Install it and try again. Aborting"; exit 1; }
|
2013-12-21 11:13:26 -06:00
|
|
|
if [ -d "deps" ]; then
|
|
|
|
# We have a collection of dependencies in our source package. We might as well use it instead
|
|
|
|
# of downloading it from PyPI.
|
|
|
|
pip install --no-index --find-links=deps -r requirements.txt
|
|
|
|
else
|
2014-01-11 12:30:30 -06:00
|
|
|
pip install -r requirements.txt --allow-external polib --allow-unverified polib
|
2013-12-21 11:13:26 -06:00
|
|
|
fi
|
2013-08-04 14:57:39 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Bootstrapping complete! You can now configure, build and run dupeGuru with:"
|
|
|
|
echo ". env/bin/activate && python configure.py && python build.py && python run.py"
|