From c690fd16c48338cac14111d725c137db25436467 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Thu, 28 Sep 2023 07:01:16 -0400 Subject: [PATCH] Use modern config for maturin. (#16394) This allows maturin >= 0.15 to build the properly named shared library object. For now the old configuration is also kept to allow for older maturin installs to be used. --- changelog.d/16394.misc | 1 + pyproject.toml | 1 + rust/Cargo.toml | 2 ++ 3 files changed, 4 insertions(+) create mode 100644 changelog.d/16394.misc diff --git a/changelog.d/16394.misc b/changelog.d/16394.misc new file mode 100644 index 000000000..ee08c3e02 --- /dev/null +++ b/changelog.d/16394.misc @@ -0,0 +1 @@ +Update maturin configuration. diff --git a/pyproject.toml b/pyproject.toml index bf51276f4..5fb64479a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -92,6 +92,7 @@ skip_gitignore = true [tool.maturin] manifest-path = "rust/Cargo.toml" +module-name = "synapse.synapse_rust" [tool.poetry] name = "matrix-synapse" diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 16917136d..26403d58c 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -15,6 +15,8 @@ name = "synapse" # tests/benchmarks. crate-type = ["lib", "cdylib"] +# This is deprecated, see tool.maturin in pyproject.toml. +# It is left here for compatibilty with maturin < 0.15. [package.metadata.maturin] # This is where we tell maturin where to place the built library. name = "synapse.synapse_rust"