Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add env variable to Python builds to force debug builds (Qiskit#876)
* Add env variable to Python builds to force debug builds This commit updates the setup.py for the python package to add a new env variable `RUST_DEBUG` to force the package to be built in debug mode. By default pip install will build the rust code in release mode, which is the sane default you want for publishing or installing a package. But for local development you typically want to build normally in debug mode. This increases the build speed and also adds additional runtime checking to validate the code is fully working. The tradeoff with this though is the runtime is very poor because the compiler doesn't do any optimization. As part of this commit the tox configuration is updated to default to debug builds. For unit tests the execution time is unchanged, because while it compiles faster that is offset by the slower execution of the tests. However, in general I think it's better to run tests in debug mode by default because it will do runtime validation (e.g. bounds checks overflow detection, etc) which is good to catch in testing. * Apply suggestions from code review Co-authored-by: Ivan Carvalho <8753214+IvanIsCoding@users.noreply.github.com> --------- Co-authored-by: Ivan Carvalho <8753214+IvanIsCoding@users.noreply.github.com>
- Loading branch information