This repository was archived by the owner on Oct 17, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ # Contributing to pyproject-fmt-rust
2+
3+ Thank you for your interest in contributing to pyproject-fmt-rust! There are
4+ many ways to contribute, and we appreciate all of them. As a reminder, all
5+ contributors are expected to follow our [ Code of Conduct] ( CODE_OF_CONDUCT.md ) .
6+
7+ ## Development Setup
8+
9+ ### Building the Project
10+
11+ To work on the project:
12+
13+ 1 . Install Rust (preferably through [ rustup] ( https://rustup.rs ) ).
14+ 2 . Clone the repository.
15+ 3 . Build the project and run the unit tests:
16+ ``` bash
17+ cargo test
18+ ```
19+
20+
21+ ## License
22+ By contributing to pyproject-rust-format, you agree that your contributions
23+ will be licensed under the [ MIT License] ( LICENSE ) .
24+
25+ Thank you for your contributions! If you have any questions or need further
26+ assistance, feel free to reach out via GitHub issues.
27+
28+ ## Tips
29+
30+ ### Always recompiling PyO3
31+
32+ If you find PyO3 constantly recompiling (such as if you are running
33+ rust-analyser in your IDE and cargo test in a terminal), the problem is that
34+ PyO3 has a ` build.rs ` that looks for Python, and it will recompile if it is run
35+ with a different PATH. To fix it, put the following in ` .cargo/config.toml ` :
36+
37+ ``` toml
38+ [env ]
39+ PYO3_PYTHON = " ./.venv/bin/python"
40+ ```
41+ And make sure you have a ` .venv ` folder with Python in it. This will ensure all
42+ runs use the same Python and don't reconfigure.
You can’t perform that action at this time.
0 commit comments