diff --git a/test-django-asgi/pyproject.toml b/test-django-asgi/pyproject.toml new file mode 100644 index 0000000..f11b4dc --- /dev/null +++ b/test-django-asgi/pyproject.toml @@ -0,0 +1,14 @@ +[project] +name = "test-django-asgi" +version = "0" +requires-python = ">=3.12" + +dependencies = [ + "django>=5.2", + "ipdb>=0.13.13", + "sentry-sdk[django]", + "uvicorn>=0.34.0", +] + +[tool.uv.sources] +sentry-sdk = { path = "../../sentry-python", editable = true } diff --git a/test-django-asgi/requirements.txt b/test-django-asgi/requirements.txt deleted file mode 100644 index 2614a49..0000000 --- a/test-django-asgi/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -Django -uvicorn - -ipdb - --e ../../../code/sentry-python # sdk in a sibling folder to this projects folder diff --git a/test-django-asgi/run.sh b/test-django-asgi/run.sh index 3b47c3d..fb8fd3d 100755 --- a/test-django-asgi/run.sh +++ b/test-django-asgi/run.sh @@ -1,16 +1,10 @@ #!/usr/bin/env bash +set -euo pipefail -# exit on first error -set -xe - -# create and activate virtual environment -python -m venv .venv -source .venv/bin/activate - -# Install (or update) requirements -python -m pip install -r requirements.txt +if ! command -v uv &> /dev/null; then + curl -LsSf https://astral.sh/uv/install.sh | sh +fi cd mysite -# Run Django application on localhost:8000 -uvicorn mysite.asgi:application +uv run uvicorn mysite.asgi:application