diff --git a/.copier-answers.yml b/.copier-answers.yml index 7fb1be8..ea3060b 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: '9689455' +_commit: 8303f40 _src_path: https://github.com/python-project-templates/base.git add_extension: rust email: 3105306+timkpaine@users.noreply.github.com diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a48389..ae58060 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,39 +35,11 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + - uses: actions-ext/python/setup@main with: - python-version: ${{ matrix.python-version }} - cache: 'pip' - cache-dependency-path: 'pyproject.toml' + version: ${{ matrix.python-version }} - - name: Set up Rust - uses: dtolnay/rust-toolchain@stable - with: - toolchain: stable - components: clippy, rustfmt - - - name: Setup Rust cache - uses: Swatinem/rust-cache@v2 - with: - key: ${{ matrix.os }} - - - name: Setup rust targets (MacOS) - run: | - rustup toolchain install stable-x86_64-apple-darwin - rustup target add x86_64-apple-darwin - rustup toolchain install stable-aarch64-apple-darwin - rustup target add aarch64-apple-darwin - if: matrix.os == 'macos-latest' - - - name: Setup rust targets (Windows) - run: | - rustup toolchain install stable-x86_64-pc-windows-msvc - rustup target add x86_64-pc-windows-msvc - rustup toolchain install stable-i686-pc-windows-msvc - rustup target add i686-pc-windows-msvc - if: matrix.os == 'windows-latest' + - uses: actions-ext/rust/setup@main - name: Install dependencies run: make develop diff --git a/Makefile b/Makefile index 028bfca..f5509fe 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ ######### .PHONY: develop-py develop-rust develop develop-py: - python -m pip install -e .[develop] + uv pip install -e .[develop] develop-rust: make -C rust develop @@ -24,7 +24,7 @@ build: build-rust build-py ## build the project .PHONY: install install: ## install python library - python -m pip install . + uv pip install . UNAME := $(shell uname) ifeq ($(UNAME), Darwin) diff --git a/README.md b/README.md index addace7..efa7754 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ A Rust-Python project template [![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) [![License](https://img.shields.io/github/license/python-project-templates/python-template-rust)](https://github.com/python-project-templates/python-template-rust) [![PyPI](https://img.shields.io/pypi/v/python-template-rust.svg)](https://pypi.python.org/pypi/python-template-rust) -[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/python-project-templates/python-template-rust/main?urlpath=lab) ## Overview diff --git a/pyproject.toml b/pyproject.toml index 5dd08d8..8d5a34b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] dependencies = [] @@ -83,24 +84,41 @@ ignore = [ ] [tool.cibuildwheel] -before-build = "rustup show" +before-build = "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 = "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y && rustup show" +before-build = """ +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"} -archs = "x86_64" +archs = "x86_64 aarch64" [tool.cibuildwheel.macos] +before-build = """ +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 +rustup show +""" +environment = {PATH="$HOME/.cargo/bin:$PATH", CARGO_TERM_COLOR="always", MACOS_DEPLOYMENT_TARGET=11.0} archs = "x86_64 arm64" -environment = {MACOS_DEPLOYMENT_TARGET=11.0} [tool.cibuildwheel.windows] -environment = {PATH="$UserProfile\\.cargo\bin;$PATH"} -archs = "AMD64 x86" +before-build = """ +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 +rustup show +""" +environment = {PATH="$UserProfile\\.cargo\bin;$PATH", CARGO_TERM_COLOR="always"} +archs = "AMD64 ARM64" [tool.coverage.run] branch = true