Skip to content

Commit d2b955a

Browse files
committed
Move to uv for pure template
1 parent 9689455 commit d2b955a

File tree

5 files changed

+25
-9
lines changed

5 files changed

+25
-9
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,27 @@ jobs:
3131
runs-on: ubuntu-latest
3232
steps:
3333
- uses: actions/checkout@v4
34-
- uses: actions/setup-python@v5
34+
35+
- uses: actions-ext/python/setup@main
3536
with:
36-
python-version: '3.11'
37+
version: '3.11'
38+
3739
- run: pip install copier
40+
3841
- uses: actions/setup-node@v4
3942
with:
4043
node-version: 20.x
44+
4145
- uses: pnpm/action-setup@v4
4246
with:
4347
version: 9
48+
4449
- name: Set up Rust
4550
uses: dtolnay/rust-toolchain@stable
4651
with:
4752
toolchain: stable
4853
components: clippy, rustfmt
54+
4955
- run: |
5056
make gen-${{matrix.template}}
5157
make test-${{matrix.template}}

pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[project]
2+
name = "python-project-templates"
3+
readme = "README.md"
4+
license = { text = "Apache-2.0" }
5+
version = "0.1.0"
6+
requires-python = ">=3.9"
7+
dependencies = []
8+
9+
[project.optional-dependencies]
10+
develop = [
11+
"copier",
12+
]

python/.github/workflows/build.yml.jinja

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,9 @@ jobs:
3535
steps:
3636
- uses: actions/checkout@v4
3737

38-
- name: Set up Python {% raw %}${{ matrix.python-version }}{% endraw %}
39-
uses: actions/setup-python@v5
38+
- uses: actions-ext/python/setup@main
4039
with:
41-
python-version: {% raw %}${{ matrix.python-version }}{% endraw %}
42-
cache: 'pip'
43-
cache-dependency-path: 'pyproject.toml'
40+
version: {% raw %}${{ matrix.python-version }}{% endraw %}
4441

4542
- name: Install dependencies
4643
run: make develop

python/Makefile.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
.PHONY: develop build install
55

66
develop: ## install dependencies and build library
7-
python -m pip install -e .[develop]
7+
uv pip install -e .[develop]
88

99
build: ## build the python library
1010
python -m build -n
1111

1212
install: ## install library
13-
python -m pip install .
13+
uv pip install .
1414

1515
#########
1616
# LINTS #

python/pyproject.toml.jinja

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ develop = [
3636
"pytest-cov",
3737
"ruff",
3838
"twine",
39+
"uv",
3940
"wheel",
4041
]
4142

0 commit comments

Comments
 (0)