From b494ac313b3614bca0646754fc40deee7fd80a58 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 3 Oct 2022 10:27:31 +0100 Subject: [PATCH 1/2] Always build Rust extension in release mode Fixes #13990 --- build_rust.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build_rust.py b/build_rust.py index 5c5e557ee847..662474dcb47c 100644 --- a/build_rust.py +++ b/build_rust.py @@ -15,6 +15,9 @@ def build(setup_kwargs: Dict[str, Any]) -> None: path=cargo_toml_path, binding=Binding.PyO3, py_limited_api=True, + # We force always building in release mode, as we can't tell the + # difference between using `poetry` in development vs production. + debug=False, ) setup_kwargs.setdefault("rust_extensions", []).append(extension) setup_kwargs["zip_safe"] = False From 69464ddff63e0eae76aa93401fdab711e837910d Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 3 Oct 2022 10:28:35 +0100 Subject: [PATCH 2/2] Newsfile --- changelog.d/14009.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/14009.bugfix diff --git a/changelog.d/14009.bugfix b/changelog.d/14009.bugfix new file mode 100644 index 000000000000..5f85fee96753 --- /dev/null +++ b/changelog.d/14009.bugfix @@ -0,0 +1 @@ +Fix bug where Rust extension wasn't built in `release` mode when using `poetry install`.