Skip to content

Commit 1bcaf0b

Browse files
authored
Use uv build and setup-uv (#1081)
1 parent 7e73e87 commit 1bcaf0b

File tree

6 files changed

+186
-162
lines changed

6 files changed

+186
-162
lines changed

.github/workflows/test.yml

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,22 @@ jobs:
2424
python-version: [3.9, "3.10", 3.11, 3.12, 3.13]
2525
django-version: [4.2, 5.1, 5.2, "main"]
2626
exclude:
27-
# Django 5.1
28-
- python-version: 3.9
29-
django-version: 5.1
30-
31-
# Django 5.2
32-
- python-version: 3.9
33-
django-version: 5.2
34-
35-
# Django main (6.0)
36-
- python-version: 3.9
37-
django-version: "main"
38-
- python-version: "3.10"
39-
django-version: "main"
40-
- python-version: 3.11
41-
django-version: "main"
27+
28+
# Django 5.1
29+
- python-version: 3.9
30+
django-version: 5.1
31+
32+
# Django 5.2
33+
- python-version: 3.9
34+
django-version: 5.2
35+
36+
# Django main
37+
- python-version: 3.9
38+
django-version: "main"
39+
- python-version: 3.10
40+
django-version: "main"
41+
- python-version: 3.11
42+
django-version: "main"
4243

4344
steps:
4445
- uses: actions/checkout@v4
@@ -87,12 +88,11 @@ jobs:
8788
- uses: actions/checkout@v4
8889

8990
- name: Set up Python with uv
90-
uses: drivendataorg/setup-python-uv-action@main
91+
uses: astral-sh/setup-uv@v6
9192
with:
9293
python-version: 3.12
93-
cache: packages
94-
cache-dependency-path: >-
95-
pyproject.toml
94+
enable-cache: true
95+
cache-dependency-glob: "pyproject.toml"
9696

9797
- name: Set up just
9898
uses: extractions/setup-just@v3
@@ -107,12 +107,11 @@ jobs:
107107
- uses: actions/checkout@v4
108108

109109
- name: Set up Python with uv
110-
uses: drivendataorg/setup-python-uv-action@main
110+
uses: astral-sh/setup-uv@v6
111111
with:
112112
python-version: 3.12
113-
cache: packages
114-
cache-dependency-path: >-
115-
pyproject.toml
113+
enable-cache: true
114+
cache-dependency-glob: "pyproject.toml"
116115

117116
- name: Set up just
118117
uses: extractions/setup-just@v3

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
- Add support for Django 5.2 (#).
66
- Symlink CHANGELOG.md into docs for Sphinx (#1076).
77
- Drop support for Django 5.0 (EOL) (#1075).
8-
- Use astral-sh/setup-uv in GitHub Actions (#1080).
8+
- Use `astral-sh/setup-uv` in GitHub Actions (#1080).
9+
- Use `uv build` and setup-uv (#1081).
910

1011
## 25.1 (2025-02-28)
1112

MANIFEST.in

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

pyproject.toml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
2-
build-backend = "hatchling.build"
3-
requires = ["hatchling"]
2+
build-backend = "uv_build"
3+
requires = ["uv_build>=0.8.3,<0.9.0"]
44

55
[project]
66
authors = [
@@ -14,7 +14,6 @@ classifiers = [
1414
"Framework :: Django :: 5.1",
1515
"Framework :: Django :: 5.2",
1616
"Intended Audience :: Developers",
17-
"License :: OSI Approved :: BSD License",
1817
"Operating System :: OS Independent",
1918
"Programming Language :: Python :: 3",
2019
"Programming Language :: Python :: 3.9",
@@ -28,7 +27,8 @@ classifiers = [
2827
dependencies = ["Django>=4.2"]
2928
description = "Bootstrap 3 for Django"
3029
keywords = ["django", "bootstrap", "bootstrap3"]
31-
license = {file = "LICENSE"}
30+
license = "BSD-3-Clause"
31+
license-files = ["LICENSE", "AUTHORS"]
3232
name = "django-bootstrap3"
3333
readme = "README.md"
3434
requires-python = ">=3.9"
@@ -102,5 +102,23 @@ docs = [
102102
"sphinx>=7.1.2",
103103
]
104104

105-
[tool.hatch.build.targets.wheel]
106-
packages = ["src/bootstrap3"]
105+
[tool.uv.build-backend]
106+
module-name = "bootstrap3"
107+
source-exclude = [
108+
"**/.DS_Store",
109+
"docs/_build",
110+
"example/db.sqlite3",
111+
]
112+
source-include = [
113+
".editorconfig",
114+
".readthedocs.yaml",
115+
"FUNDING.yml",
116+
"manage.py",
117+
"justfile",
118+
"*.md",
119+
"example/**",
120+
"tests/**",
121+
"tox.ini",
122+
"docs/**",
123+
"uv.lock",
124+
]

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ commands =
3131
deps =
3232
4.2: Django==4.2.*
3333
5.1: Django==5.1.*
34+
5.2: Django==5.2.*
3435
main: https://github.com/django/django/archive/main.tar.gz
3536

3637
[testenv:lint]

0 commit comments

Comments
 (0)