Skip to content

Commit

Permalink
Explain --skip-pkg-install option for faster run.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhartman committed Oct 21, 2024
1 parent 6856adb commit 4813a7c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -596,8 +596,16 @@ prior to running `cargo test`:
tox -erust
```

You can also execute them directly in your own virtual environment. If you haven't
done so already, [create a Python virtual environment](#set-up-a-python-venv) and
> [!TIP]
> If you've already built your changes (e.g. `python setup.py build_rust --release --inplace`),
> you can pass `--skip-pkg-install` when invoking `tox` to avoid a rebuild. This works because
> Python will instead find and use Qiskit from the current working directory (since we skipped
> its installation).
#### Using a custom venv instead of `tox`

If you're not using `tox`, you can also execute Cargo tests directly in your own virtual environment.
If you haven't done so already, [create a Python virtual environment](#set-up-a-python-venv) and
**_activate it_**.

Then, run the following commands:
Expand Down

0 comments on commit 4813a7c

Please sign in to comment.