|
3 | 3 | WORK_DIR="$(dirname "$0")" |
4 | 4 | PROJECT_DIR="$(dirname "$WORK_DIR")" |
5 | 5 |
|
6 | | -pip --version >/dev/null 2>&1 || { |
7 | | - echo >&2 -e "\npip is required but it's not installed." |
8 | | - echo >&2 -e "You can install it by running the following command:\n" |
9 | | - echo >&2 "wget https://bootstrap.pypa.io/get-pip.py --output-document=get-pip.py; chmod +x get-pip.py; sudo -H python3 get-pip.py" |
10 | | - echo >&2 -e "\n" |
11 | | - echo >&2 -e "\nFor more information, see pip documentation: https://pip.pypa.io/en/latest/" |
| 6 | +uv --version >/dev/null 2>&1 || { |
| 7 | + echo >&2 -e "\nuv is required but it's not installed." |
| 8 | + echo >&2 -e "You can install it by following the instructions at https://github.com/astral-sh/uv#installation" |
12 | 9 | exit 1; |
13 | 10 | } |
14 | 11 |
|
15 | | -virtualenv --version >/dev/null 2>&1 || { |
16 | | - echo >&2 -e "\nvirtualenv is required but it's not installed." |
17 | | - echo >&2 -e "You can install it by running the following command:\n" |
18 | | - echo >&2 "sudo -H pip3 install virtualenv" |
19 | | - echo >&2 -e "\n" |
20 | | - echo >&2 -e "\nFor more information, see virtualenv documentation: https://virtualenv.pypa.io/en/latest/" |
21 | | - exit 1; |
22 | | -} |
23 | | - |
24 | | -if [ -z "$VIRTUAL_ENV" ]; then |
25 | | - echo >&2 -e "\nYou need activate a virtualenv first" |
26 | | - echo >&2 -e 'If you do not have a virtualenv created, run the following command to create and automatically activate a new virtualenv named "venv" on current folder:\n' |
27 | | - echo >&2 -e "virtualenv venv --python=\`which python3\`" |
28 | | - echo >&2 -e "\nTo leave/disable the currently active virtualenv, run the following command:\n" |
29 | | - echo >&2 "deactivate" |
30 | | - echo >&2 -e "\nTo activate the virtualenv again, run the following command:\n" |
31 | | - echo >&2 "source venv/bin/activate" |
32 | | - echo >&2 -e "\nFor more information, see virtualenv documentation: https://virtualenv.pypa.io/en/latest/" |
33 | | - echo >&2 -e "\n" |
34 | | - exit 1; |
35 | | -else |
36 | | - uv sync --frozen |
37 | | - {%- if cookiecutter.use_heroku == "y" -%} |
38 | | - pip install -r $PROJECT_DIR/requirements.txt |
39 | | - {%- endif %} |
40 | | -fi |
| 12 | +uv sync --locked |
0 commit comments