Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.

Commit ebd25b4

Browse files
authored
chore: add CONTRIBUTING.md (#30)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 2a88dc1 commit ebd25b4

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

CONTRIBUTING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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.

0 commit comments

Comments
 (0)