Skip to content

Update from copier (2025-08-11T17:45:48) #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copier-answers.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: f3ffa74
_commit: fa27c8d
_src_path: https://github.com/python-project-templates/base.git
add_docs: true
add_extension: rust
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
python-version: ["3.9"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: actions-ext/python/setup@main
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: actions-ext/python/setup@main
- uses: actions-ext/rust/setup@main
- run: uv pip install .
- run: uv pip install .[develop]
- run: uv pip install yardang
- run: yardang build
- uses: peaceiris/actions-gh-pages@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wiki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- run: cp README.md docs/wiki/Home.md
- uses: Andrew-Chen-Wang/github-wiki-action@v5
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ js/coverage
js/dist
js/lib
js/node_modules
js/test-results
js/playwright-report
js/*.tgz
python_template_rust/extension

Expand Down
20 changes: 5 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,19 @@ requirements-rs: ## install prerequisite rust build requirements

requirements: requirements-rs requirements-py ## setup project for development

.PHONY: build-py build-rs build dev
.PHONY: build-py build-rs build
build-py:
python -m build -w -n

build-rs:
make -C rust build

dev: build ## lightweight in-place build for iterative dev
$(_CP_COMMAND)

build: build-rs build-py ## build the project

.PHONY: install
install: ## install python library
uv pip install .

UNAME := $(shell uname)
ifeq ($(UNAME), Darwin)
_CP_COMMAND := cp target/debug/libpython_template_rust.dylib python_template_rust/python_template_rust.abi3.so
else
_CP_COMMAND := cp target/debug/libpython_template_rust.so python_template_rust/python_template_rust.abi3.so
endif

#########
# LINTS #
#########
Expand Down Expand Up @@ -146,21 +136,21 @@ major: ## bump a major version
########
.PHONY: dist-py-wheel dist-py-sdist dist-rs dist-check dist publish

dist-py-wheel: # build python wheel
dist-py-wheel: ## build python wheel
python -m cibuildwheel --output-dir dist

dist-py-sdist: # build python sdist
dist-py-sdist: ## build python sdist
python -m build --sdist -o dist

dist-rs: # build rust dists
dist-rs: ## build rust dists
make -C rust dist

dist-check: ## run python dist checker with twine
python -m twine check dist/*

dist: clean build dist-rs dist-py-wheel dist-py-sdist dist-check ## build all dists

publish: dist # publish python assets
publish: dist ## publish python assets

#########
# CLEAN #
Expand Down
11 changes: 5 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,24 +91,23 @@ ignore = [
]

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

[tool.cibuildwheel.linux]
before-build = """
before-all = """
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y
rustup target add aarch64-unknown-linux-gnu
rustup target add x86_64-unknown-linux-gnu
rustup show
"""
environment = {PATH="$HOME/.cargo/bin:$PATH", CARGO_TERM_COLOR="always"}
skip = "*i686 musllinux*"
skip = "*i686* *musllinux*"

[tool.cibuildwheel.macos]
before-build = """
before-all = """
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
Expand All @@ -118,7 +117,7 @@ environment = {PATH="$HOME/.cargo/bin:$PATH", CARGO_TERM_COLOR="always", MACOS_D
archs = "arm64"

[tool.cibuildwheel.windows]
before-build = """
before-all = """
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y
rustup target add x86_64-pc-windows-msvc
rustup target add aarch64-pc-windows-msvc
Expand Down
4 changes: 2 additions & 2 deletions rust/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
requirements: ## install required dev dependencies
rustup component add rustfmt
rustup component add clippy
cargo install cargo-nextest
cargo install cargo-llvm-cov
cargo install cargo-nextest --force
cargo install cargo-llvm-cov --force

develop: requirements ## install required dev dependencies

Expand Down
Loading