Skip to content

Commit 192cd14

Browse files
committed
fix build venv
1 parent bae6ce0 commit 192cd14

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
build:
2-
bash -c "source .venv/bin/activate && ./build.sh"
3-
41
install:
52
uv sync
63

4+
build:
5+
./build.sh
6+
77
lint:
88
ruff check .
99

1010
#migrate:
1111
# uv run python manage.py migrate
1212

1313
start:
14-
uv run python3 manage.py runserver 0.0.0.0:8000
14+
cd code && ../.venv/bin/python manage.py runserver 0.0.0.0:8000
1515

1616
test:
1717
pytest

build.sh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
#!/usr/bin/env bash
22
set -e
33

4-
# Активируем виртуальное окружение (если оно в .venv)
5-
source .venv/bin/activate
4+
# Устанавливаем uv (если ещё не установлен)
5+
if ! command -v uv >/dev/null 2>&1; then
6+
curl -LsSf https://astral.sh/uv/install.sh | sh
7+
fi
8+
9+
# Добавляем ~/.local/bin в PATH, если там установлен uv
10+
export PATH=$HOME/.local/bin:$PATH
611

7-
curl -LsSf https://astral.sh/uv/install.sh | sh
8-
source $HOME/.local/bin/env
12+
# Активируем виртуальное окружение
13+
source .venv/bin/activate
914

10-
make install
15+
# Запускаем make install и make migrate
16+
make install

0 commit comments

Comments
 (0)