Skip to content

Commit d3c9b37

Browse files
authored
Merge pull request #151 from jazzband/uv-0.4-ing
using uv-0.5.x
2 parents b385774 + c926405 commit d3c9b37

File tree

7 files changed

+30
-1036
lines changed

7 files changed

+30
-1036
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
2727
- name: Build package
2828
run: |
29-
uvx --from build pyproject-build --installer uv
29+
uv build
3030
uvx twine check dist/*
3131
3232
- name: Upload packages to Jazzband

.github/workflows/test.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,19 @@ jobs:
4444
- uses: actions/checkout@v4
4545

4646
- name: Set up Python ${{ matrix.python-version }}
47-
uses: actions/setup-python@v5
47+
uses: astral-sh/setup-uv@v3
4848
with:
49-
python-version: ${{ matrix.python-version }}
49+
enable-cache: true
50+
cache-dependency-glob: "pyproject.toml"
51+
cache-suffix: ${{ matrix.python-version }}
5052

51-
- uses: actions/cache@v4
52-
with:
53-
path: ~/.cache/pip
54-
key:
55-
${{ matrix.python-version }}-pip-${{ hashFiles('**/pyproject.toml') }}
56-
restore-keys: |
57-
${{ matrix.python-version }}-pip-
58-
59-
- name: Install dependencies
60-
run: |
61-
curl -LsSf https://astral.sh/uv/install.sh | sh
62-
uv sync
53+
- name: Install Python
54+
run: uv python install ${{ matrix.python-version }}
55+
env:
56+
UV_PYTHON_PREFERENCE: only-managed
6357

6458
- name: Tox tests
65-
run: |
66-
.venv/bin/tox -v
59+
run: uv run --only-dev tox -v
6760
env:
6861
DJANGO: ${{ matrix.django-version }}
6962
TEST_WITH_POSTGRES: 1

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ coverage.xml
1313
**/.env
1414
examples/**/migrations/*
1515
.idea/
16+
uv.lock

doc/dev.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Build package
6868

6969
Use build::
7070

71-
$ python -m build
71+
$ uv build
7272

7373

7474
Releasing

pyproject.toml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[build-system]
2-
requires = ["setuptools>=64", "setuptools_scm>=8"]
3-
build-backend = "setuptools.build_meta"
4-
51
[project]
62
name = "django-redshift-backend"
73
dynamic = ["version"]
@@ -49,13 +45,28 @@ psycopg2-binary = [
4945
"psycopg2-binary",
5046
]
5147

48+
[dependency-groups]
49+
dev = [
50+
"setuptools>=73.0.1",
51+
"setuptools-scm>=8.1.0",
52+
"wheel>=0.44.0",
53+
"tox-uv>=1.11.2",
54+
"tox-gh-actions>=3.2.0",
55+
"ruff>=0.6.2",
56+
"twine>=5.1.1",
57+
]
58+
5259
[project.urls]
5360
Documentation = "https://django-redshift-backend.readthedocs.io/"
5461
Homepage = "https://github.com/jazzband/django-redshift-backend"
5562
"Release notes" = "https://django-redshift-backend.readthedocs.io/en/master/changes.html"
5663
Source = "https://github.com/jazzband/django-redshift-backend"
5764
Tracker = "https://github.com/jazzband/django-redshift-backend/issues"
5865

66+
[build-system]
67+
requires = ["setuptools>=64", "setuptools_scm>=8"]
68+
build-backend = "setuptools.build_meta"
69+
5970
[tool.setuptools]
6071
include-package-data = true
6172

@@ -67,18 +78,5 @@ local_scheme = "no-local-version"
6778
[tool.ruff]
6879
exclude = ["django_redshift_backend/_vendor"]
6980

70-
[tool.uv]
71-
dev-dependencies = [
72-
"setuptools>=73.0.1",
73-
"wheel>=0.44.0",
74-
"setuptools-scm>=8.1.0",
75-
"tox-uv>=1.11.2",
76-
"build>=1.2.1",
77-
"twine>=5.1.1",
78-
"django-redshift-backend",
79-
"ruff>=0.6.2",
80-
"tox-gh-actions>=3.2.0",
81-
]
82-
8381
[tool.uv.sources]
8482
django-redshift-backend = { workspace = true }

tox.ini

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,10 @@ commands=
6868
ruff format django_redshift_backend
6969

7070
[testenv:check]
71-
deps =
72-
twine
73-
build
71+
deps = uv
7472
commands =
75-
python -m build
76-
twine check dist/*
73+
uv build
74+
uvx twine check dist/*
7775

7876
[flake8]
7977
max-line-length=120

uv.lock

Lines changed: 0 additions & 996 deletions
This file was deleted.

0 commit comments

Comments
 (0)