mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 09:36:52 +03:00
Small fixes to utility scripts (#536)
* Fix python install utility when not using Heroku Don't try to install `requirements.txt` which doesn't exist unless using Heroku. * Fix bad absolute paths * Allow dependency installation from any location
This commit is contained in:
parent
b6bf40e973
commit
d7c8531e25
|
@ -1,6 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
OS_REQUIREMENTS_FILENAME="requirements.apt"
|
||||
WORK_DIR="$(dirname "$0")"
|
||||
OS_REQUIREMENTS_FILENAME="$WORK_DIR/requirements.apt"
|
||||
|
||||
# Handle call with wrong command
|
||||
function wrong_command()
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
WORK_DIR="$(dirname "$0")"
|
||||
PROJECT_DIR="$(dirname "$WORK_DIR")"
|
||||
|
||||
pip --version >/dev/null 2>&1 || {
|
||||
echo >&2 -e "\npip is required but it's not installed."
|
||||
echo >&2 -e "You can install it by running the following command:\n"
|
||||
|
@ -43,8 +46,10 @@ if [ -z "$VIRTUAL_ENV" ]; then
|
|||
exit 1;
|
||||
else
|
||||
|
||||
pip install -r requirements/local.txt
|
||||
pip install -r requirements/test.txt
|
||||
pip install -r requirements.txt
|
||||
pip install -r $PROJECT_DIR/requirements/local.txt
|
||||
pip install -r $PROJECT_DIR/requirements/test.txt
|
||||
{% if cookiecutter.use_heroku == "y" -%}
|
||||
pip install -r $PROJECT_DIR/requirements.txt
|
||||
{%- endif %}
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user