Skip to content

Commit

Permalink
Fix commands related to maturin in building docs (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
gschurck authored Dec 2, 2024
1 parent 24cfe69 commit 7d4261d
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Install python and libs:
```bash
sudo apt-get install -y --no-install-recommends python3-dev python3-pip
python3 -m pip install --user -U pip
python3 -m pip install --user maturin
python3 -m pip install --user maturin~=1.4.0
```

Install Rust from [rustup](https://rustup.rs/).
Expand All @@ -42,7 +42,7 @@ path.
In a command prompt:

```bash
python -m pip install --user maturin
python -m pip install --user maturin~=1.4.0
```

Install Rust from [rustup](https://rustup.rs/).
Expand All @@ -55,7 +55,7 @@ or brew:

```bash
brew install '[email protected]'
python -m pip install --user maturin
python -m pip install --user maturin~=1.4.0
```

Install Rust from [rustup](https://rustup.rs/).
Expand Down Expand Up @@ -104,18 +104,17 @@ The [](#environment-variables) section details ways to change this behavior.

Within each project folder, the build can be run specifically for that project.

For any of these commands, the LLVM version must be added via features. For `maturin`,
they must be added to the `cargo-extra-args` option.
For any of these commands, the LLVM version must be added via features.

- `<features>` is a placeholder for `--features (llvm11-0 | llvm12-0 | llvm13-0 | llvm14-0)`

Build commands:

- `maturin build --cargo-extra-args="<features>"`: Build the crate into python packages
- `maturin build --release --cargo-extra-args="<features>"`: Build and pass --release to cargo
- `maturin build <features>`: Build the crate into python packages
- `maturin build --release <features>`: Build and pass --release to cargo
- `maturin build --help`: to view more options
- `maturin develop --cargo-extra-args="<features>"`: Installs the crate as module in the current virtualenv
- `maturin develop --cargo-extra-args="<features>" && pytest`: Installs the crate as module in the current
- `maturin develop <features>`: Installs the crate as module in the current virtualenv
- `maturin develop <features> && pytest`: Installs the crate as module in the current
virtualenv and runs the Python tests

If you do not wish to package and test the Python wheels, `cargo` can be used to
Expand Down

0 comments on commit 7d4261d

Please sign in to comment.