Skip to content

Commit

Permalink
Add Dev setup to README
Browse files Browse the repository at this point in the history
  • Loading branch information
VirxEC authored Oct 25, 2024
1 parent 594baa0 commit baf21b7
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,26 @@ A majority of the code is generated in the `codegen/` upon first compile and thr

This includes the code generated by `flatc` (living in `src/generated`), the Python wrapper binds to the generated Rust code, and the Python type hints (`rlbot_flatbuffers.pyi`).

### Dev setup

- Ensure Python 3.11+ is installed
- Create a virtual Python environment
- `python3 -m venv venv`
- Activate the virtual environment
- Windows: `venv\Scripts\activate.bat`
- Linux: `source venv/bin/activate`
- Install maturin
- `pip install maturin`
- Build & install for testing
- `maturin develop --release`

To use in another Python environment, like if testing [python-interface](https://github.com/VirxEC/python-interface/blob/master/README.md?plain=1), you can build the wheel:

- `maturin build --release`
- (In another environment) `pip install path/to/file.whl`

The exact path of the wheel will be printed by maturin, just copy+paste it.

### Basic usage

All classes and methods should have types hints readable by your IDE, removing the guesswork of common operations.
Expand Down

0 comments on commit baf21b7

Please sign in to comment.