Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Build from Source

github-actions[bot] edited this pageJul 29, 2025 ·1 revision

python-template-rust is written in Python and Rust. While prebuilt wheels are provided for end users, it is also straightforward to buildpython-template-rust from either the Pythonsource distribution or the GitHub repository.

Make commands

As a convenience,python-template-rust uses aMakefile for commonly used commands. You can print the main available commands by runningmake with no arguments

> makebuild                          build the libraryclean                          clean the repositoryfix                            run autofixersinstall                        install librarylint                           run lintstest                           run the tests

Prerequisites

python-template-rust has a few system-level dependencies which you can install from your machine package manager. Other package managers likeconda,nix, etc, should also work fine.

Clone

Clone the repo with:

git clone https://github.com/python-project-templates/python-template-rust.gitcd python-template-rust

Install Rust

Follow the instructions forinstalling Rust for your system.

Install Python dependencies

Python build and develop dependencies are specified in thepyproject.toml, but you can manually install them:

make requirements

Note that these dependencies would otherwise be installed normally as part ofPEP517 /PEP518.

Build

Build the python project in the usual manner:

make build

Lint and Autoformat

python-template-rust has linting and auto formatting.

LanguageLinterAutoformatterDescription
PythonruffruffStyle
PythonruffruffImports
RustclippyclippyStyle
MarkdownmdformatmdformatStyle
MarkdowncodespellSpelling

Python Linting

make lint-py

Python Autoformatting

make fix-py

Rust Linting

make lint-rs

Rust Autoformatting

make fix-rs

Documentation Linting

make lint-docs

Documentation Autoformatting

make fix-docs

Testing

python-template-rust has both Python and JavaScript tests. The bulk of the functionality is tested in Python, which can be run viapytest. First, install the Python development dependencies with

make develop

Python

make test-py

Rust

make test-rs

This wiki is autogenerated. To made updates, open a PR against the original source file indocs/wiki.

Clone this wiki locally

[8]ページ先頭

©2009-2025 Movatter.jp