Skip to content

Commit 029e1f1

Browse files
authored
Merge pull request #6019 from browniebroke/fix/uv-install-python-deps-script
Remove mentions of `pip` and `virtualenv` in the `install_python_dependencies.sh` utility script
2 parents 45bcd9d + e252088 commit 029e1f1

File tree

1 file changed

+4
-32
lines changed

1 file changed

+4
-32
lines changed

{{cookiecutter.project_slug}}/utility/install_python_dependencies.sh

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,10 @@
33
WORK_DIR="$(dirname "$0")"
44
PROJECT_DIR="$(dirname "$WORK_DIR")"
55

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"
129
exit 1;
1310
}
1411

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

Comments
 (0)