Skip to content

Commit 0b72cb1

Browse files
authored
Merge pull request #36 from python-project-templates/copier-update-2025-04-13T21-27-53
Update from copier (2025-04-13T21:27:53)
2 parents 911e3a5 + 30a3100 commit 0b72cb1

File tree

5 files changed

+36
-41
lines changed

5 files changed

+36
-41
lines changed

Diff for: .copier-answers.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: '9689455'
2+
_commit: 122ea92
33
_src_path: https://github.com/python-project-templates/base.git
44
add_extension: rust
55

Diff for: .github/workflows/build.yml

+9-31
Original file line numberDiff line numberDiff line change
@@ -35,39 +35,11 @@ jobs:
3535
steps:
3636
- uses: actions/checkout@v4
3737

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

45-
- name: Set up Rust
46-
uses: dtolnay/rust-toolchain@stable
47-
with:
48-
toolchain: stable
49-
components: clippy, rustfmt
50-
51-
- name: Setup Rust cache
52-
uses: Swatinem/rust-cache@v2
53-
with:
54-
key: ${{ matrix.os }}
55-
56-
- name: Setup rust targets (MacOS)
57-
run: |
58-
rustup toolchain install stable-x86_64-apple-darwin
59-
rustup target add x86_64-apple-darwin
60-
rustup toolchain install stable-aarch64-apple-darwin
61-
rustup target add aarch64-apple-darwin
62-
if: matrix.os == 'macos-latest'
63-
64-
- name: Setup rust targets (Windows)
65-
run: |
66-
rustup toolchain install stable-x86_64-pc-windows-msvc
67-
rustup target add x86_64-pc-windows-msvc
68-
rustup toolchain install stable-i686-pc-windows-msvc
69-
rustup target add i686-pc-windows-msvc
70-
if: matrix.os == 'windows-latest'
42+
- uses: actions-ext/rust/setup@main
7143

7244
- name: Install dependencies
7345
run: make develop
@@ -103,6 +75,12 @@ jobs:
10375
with:
10476
token: ${{ secrets.CODECOV_TOKEN }}
10577

78+
- name: Set up QEMU
79+
uses: docker/setup-qemu-action@v3
80+
with:
81+
platforms: all
82+
if: runner.os == 'Linux' && runner.arch == 'X64'
83+
10684
- name: Make dist
10785
run: |
10886
make dist-rust

Diff for: Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#########
44
.PHONY: develop-py develop-rust develop
55
develop-py:
6-
python -m pip install -e .[develop]
6+
uv pip install -e .[develop]
77

88
develop-rust:
99
make -C rust develop
@@ -24,7 +24,7 @@ build: build-rust build-py ## build the project
2424

2525
.PHONY: install
2626
install: ## install python library
27-
python -m pip install .
27+
uv pip install .
2828

2929
UNAME := $(shell uname)
3030
ifeq ($(UNAME), Darwin)

Diff for: README.md

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ A Rust-Python project template
66
[![codecov](https://codecov.io/gh/python-project-templates/python-template-rust/branch/main/graph/badge.svg)](https://codecov.io/gh/python-project-templates/python-template-rust)
77
[![License](https://img.shields.io/github/license/python-project-templates/python-template-rust)](https://github.com/python-project-templates/python-template-rust)
88
[![PyPI](https://img.shields.io/pypi/v/python-template-rust.svg)](https://pypi.python.org/pypi/python-template-rust)
9-
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/python-project-templates/python-template-rust/main?urlpath=lab)
109

1110
## Overview
1211

Diff for: pyproject.toml

+24-6
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ classifiers = [
2323
"Programming Language :: Python :: 3.10",
2424
"Programming Language :: Python :: 3.11",
2525
"Programming Language :: Python :: 3.12",
26+
"Programming Language :: Python :: 3.13",
2627
]
2728

2829
dependencies = []
@@ -83,24 +84,41 @@ ignore = [
8384
]
8485

8586
[tool.cibuildwheel]
86-
before-build = "rustup show"
87+
before-build = "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y"
8788
build = "cp39-*"
8889
skip = "*musllinux*"
8990
test-command = "pytest -vvv {project}/python_template_rust/tests"
9091
test-requires = ["pytest", "pytest-cov", "pytest-sugar", "pytest-xdist"]
9192

9293
[tool.cibuildwheel.linux]
93-
before-build = "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y && rustup show"
94+
before-build = """
95+
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y
96+
rustup target add aarch64-unknown-linux-gnu
97+
rustup target add x86_64-unknown-linux-gnu
98+
rustup show
99+
"""
94100
environment = {PATH="$HOME/.cargo/bin:$PATH", CARGO_TERM_COLOR="always"}
95-
archs = "x86_64"
101+
archs = "x86_64 aarch64"
96102

97103
[tool.cibuildwheel.macos]
104+
before-build = """
105+
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y
106+
rustup target add aarch64-apple-darwin
107+
rustup target add x86_64-apple-darwin
108+
rustup show
109+
"""
110+
environment = {PATH="$HOME/.cargo/bin:$PATH", CARGO_TERM_COLOR="always", MACOS_DEPLOYMENT_TARGET=11.0}
98111
archs = "x86_64 arm64"
99-
environment = {MACOS_DEPLOYMENT_TARGET=11.0}
100112

101113
[tool.cibuildwheel.windows]
102-
environment = {PATH="$UserProfile\\.cargo\bin;$PATH"}
103-
archs = "AMD64 x86"
114+
before-build = """
115+
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y
116+
rustup target add x86_64-pc-windows-msvc
117+
rustup target add aarch64-pc-windows-msvc
118+
rustup show
119+
"""
120+
environment = {PATH="$UserProfile\\.cargo\bin;$PATH", CARGO_TERM_COLOR="always"}
121+
archs = "AMD64 ARM64"
104122

105123
[tool.coverage.run]
106124
branch = true

0 commit comments

Comments
 (0)