Skip to content

Commit

Permalink
replaced poetry with uv
Browse files Browse the repository at this point in the history
  • Loading branch information
Design0r committed Aug 21, 2024
1 parent 25d75b5 commit 4dfdfe3
Show file tree
Hide file tree
Showing 6 changed files with 532 additions and 809 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM python:3.11-slim

RUN apt-get update

RUN apt-get update && apt-get install -y \
curl \
pkg-config \
gcc \
mariadb-client \
libmariadb-dev-compat \
libmariadb-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN pip install uv

WORKDIR /app

COPY pyproject.toml pyproject.toml
RUN uv sync
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
services:
uv-build-test:
build:
context: .
781 changes: 0 additions & 781 deletions poetry.lock

This file was deleted.

43 changes: 21 additions & 22 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
[tool.poetry]
[project]
name = "spybot2"
version = "0.1.0"
description = ""
authors = ["Benno <[email protected]>", "Justus <[email protected]>"]
license = "MIT"
authors = [
{ name = "Benno", email = "[email protected]" },
{ name = "Justus", email = "[email protected]" },
]
classifiers = ["License :: OSI Approved :: MIT License"]
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"Django ~=4.2",
"ts3 ~=2.0.0b3",
"django-environ ~=0.11.2",
"mysqlclient ~=2.2",
"django-crontab ~=0.7.1",
"num2words ~=0.5.12",
"requests ~=2.31",
"fido2 ~=1.1",
"user-agents ~=2.2",
"django-bootstrap5 ~=24.2",
]

[tool.poetry.dependencies]
python = "^3.11"
Django = "^4.2.7"
ts3 = "2.0.0b3"
django-environ = "^0.11.2"
mysqlclient = "^2.2.0"
django-crontab = "^0.7.1"
num2words = "^0.5.12"
requests = "^2.31.0"
fido2 = "^1.1.3"
user-agents = "^2.2.0"
django-bootstrap5 = "^24.2"


[tool.poetry.group.test.dependencies]
unittest-xml-reporting = "^3.2.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.uv]
dev-dependencies = ["unittest-xml-reporting ~=3.2"]
9 changes: 3 additions & 6 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@ cd ..
source venv/bin/activate

# install project python deps
pip install poetry
poetry install

# enter shell with configured poetry environment
poetry shell
pip install uv
uv sync

# copy static files to directory for http server
python manage.py collectstatic --noinput
uv run manage.py collectstatic --noinput

# create django superuser if necessary.
# Set the env vars DJANGO_SUPERUSER_{PASSWORD,USERNAME,EMAIL} when running this script
Expand Down
Loading

0 comments on commit 4dfdfe3

Please sign in to comment.