Skip to content

Commit f3c7029

Browse files
authored
Use same uv workspace for django-stubs-ext also (#2857)
* Use same `uv` workspace for `django-stubs-ext` also Previously, both the top-level project and the `ext` subdirectory had their own `.venv`, their own `uv.lock` (although `ext/uv.lock` was never committed to git). With a shared workspace, these now only exist at the top level. Also, for the release workflow, the top-level `dist/` output directory is now shared -- no more `ext/dist/`.
1 parent 36336cb commit f3c7029

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,17 @@ jobs:
1616
permissions:
1717
id-token: write
1818
steps:
19-
- name: Setup python to build package
20-
uses: actions/setup-python@v6
19+
- name: Install uv & Python
20+
uses: astral-sh/setup-uv@v6
2121
with:
22-
python-version: '3.12'
23-
- name: Install build
24-
run: python -m pip install build
22+
python-version: "3.13"
2523
- uses: actions/checkout@v5
2624
with:
2725
fetch-depth: 0
2826
- name: Build ext package
29-
run: python -m build ext/
27+
run: uv build --package=django-stubs-ext
3028
- name: Publish ext to PyPI
3129
uses: pypa/[email protected]
32-
with:
33-
packages-dir: ext/dist/
3430

3531
build-and-publish:
3632
runs-on: ubuntu-latest
@@ -49,6 +45,6 @@ jobs:
4945
with:
5046
fetch-depth: 0
5147
- name: Build package
52-
run: uv build
48+
run: uv build --package=django-stubs
5349
- name: Publish to PyPI
5450
uses: pypa/[email protected]

.github/workflows/test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,4 @@ jobs:
179179
- name: Ensure uv.lock is up to date
180180
run: env --unset=UV_FROZEN uv lock --check
181181
- name: Build
182-
run: |
183-
uv build .
184-
uv build ext/
182+
run: uv build --all-packages

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ Funding = "https://github.com/sponsors/typeddjango"
7474

7575
[tool.uv.sources]
7676
django-stubs = { workspace = true }
77-
django-stubs-ext = { path = "ext", editable = true }
77+
django-stubs-ext = { workspace = true }
78+
79+
[tool.uv.workspace]
80+
members = ["ext"]
7881

7982
[build-system]
8083
requires = ["uv_build>=0.8.22,<0.9.0"]

uv.lock

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)