From 9c01f2cc115249199a8a688ff64f6d6c0fe4ba16 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 10:43:13 +0000 Subject: [PATCH 1/5] Bump setuptools-rust from 1.8.1 to 1.9.0 Bumps [setuptools-rust](https://github.com/PyO3/setuptools-rust) from 1.8.1 to 1.9.0. - [Release notes](https://github.com/PyO3/setuptools-rust/releases) - [Changelog](https://github.com/PyO3/setuptools-rust/blob/main/CHANGELOG.md) - [Commits](https://github.com/PyO3/setuptools-rust/compare/v1.8.1...v1.9.0) --- updated-dependencies: - dependency-name: setuptools-rust dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index d916c627a0..218d905763 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2585,13 +2585,13 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs ( [[package]] name = "setuptools-rust" -version = "1.8.1" +version = "1.9.0" description = "Setuptools Rust extension plugin" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-rust-1.8.1.tar.gz", hash = "sha256:94b1dd5d5308b3138d5b933c3a2b55e6d6927d1a22632e509fcea9ddd0f7e486"}, - {file = "setuptools_rust-1.8.1-py3-none-any.whl", hash = "sha256:b5324493949ccd6aa0c03890c5f6b5f02de4512e3ac1697d02e9a6c02b18aa8e"}, + {file = "setuptools-rust-1.9.0.tar.gz", hash = "sha256:704df0948f2e4cc60c2596ad6e840ea679f4f43e58ed4ad0c1857807240eab96"}, + {file = "setuptools_rust-1.9.0-py3-none-any.whl", hash = "sha256:409caf49dcf7ad9bd510b4bf4011fbad504e745fae98f57fe1c06f3a97719638"}, ] [package.dependencies] From 84108564114a404c674335d5302adca8b0d01355 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 30 Apr 2024 10:30:09 +0100 Subject: [PATCH 2/5] Remove deprecated py_limited flag --- build_rust.py | 1 - 1 file changed, 1 deletion(-) diff --git a/build_rust.py b/build_rust.py index 662474dcb4..31ef841d8f 100644 --- a/build_rust.py +++ b/build_rust.py @@ -14,7 +14,6 @@ def build(setup_kwargs: Dict[str, Any]) -> None: target="synapse.synapse_rust", 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, From 901647e91c33327cc822f1ad738793c8c66a8886 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 30 Apr 2024 10:37:28 +0100 Subject: [PATCH 3/5] Build ABI3 wheels in CI --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fb310589f7..c3b9b2a384 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -406,7 +406,7 @@ environment= { PATH = "$PATH:$HOME/.cargo/bin" } # can end up polluting the next build with a .so that is for the wrong # Python version. before-build = "rm -rf {project}/build" -build-frontend = "build" +build-frontend = "build; args: --config-settings=--build-option=--py-limited-api=cp38" # Build ABI3 wheels for 3.8+ test-command = "python -c 'from synapse.synapse_rust import sum_as_string; print(sum_as_string(1, 2))'" From 2f45986ce854aca41e488a2673927266426c11fe Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 30 Apr 2024 10:42:47 +0100 Subject: [PATCH 4/5] Fix typo --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c3b9b2a384..d9a982cf55 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -406,7 +406,7 @@ environment= { PATH = "$PATH:$HOME/.cargo/bin" } # can end up polluting the next build with a .so that is for the wrong # Python version. before-build = "rm -rf {project}/build" -build-frontend = "build; args: --config-settings=--build-option=--py-limited-api=cp38" # Build ABI3 wheels for 3.8+ +build-frontend = "build; args: --config-setting=--build-option=--py-limited-api=cp38" # Build ABI3 wheels for 3.8+ test-command = "python -c 'from synapse.synapse_rust import sum_as_string; print(sum_as_string(1, 2))'" From cb036eb79cfb1c0113fc36460991d3fd26fe7942 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 30 Apr 2024 11:41:00 +0100 Subject: [PATCH 5/5] Try setting DIST_EXTRA_CONFIG in CI --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d9a982cf55..59b371acd3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -382,7 +382,7 @@ furo = ">=2022.12.7,<2025.0.0" # runtime errors caused by build system changes. # We are happy to raise these upper bounds upon request, # provided we check that it's safe to do so (i.e. that CI passes). -requires = ["poetry-core>=1.1.0,<=1.9.0", "setuptools_rust>=1.3,<=1.8.1"] +requires = ["poetry-core>=1.1.0,<=1.9.0", "setuptools_rust>=1.3,<=1.8.1", "wheel"] build-backend = "poetry.core.masonry.api" @@ -400,12 +400,12 @@ skip = "cp36* cp37* pp37* *-musllinux_i686 pp*aarch64 *-musllinux_aarch64" # We need a rust compiler before-all = "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y --profile minimal" -environment= { PATH = "$PATH:$HOME/.cargo/bin" } +environment = { PATH = "$PATH:$HOME/.cargo/bin", DIST_EXTRA_CONFIG = "/tmp/bdist.ini" } # For some reason if we don't manually clean the build directory we # can end up polluting the next build with a .so that is for the wrong # Python version. -before-build = "rm -rf {project}/build" +before-build = "rm -rf {project}/build && echo '[bdist_wheel]\npy_limited_api=cp38\n' > $DIST_EXTRA_CONFIG" build-frontend = "build; args: --config-setting=--build-option=--py-limited-api=cp38" # Build ABI3 wheels for 3.8+ test-command = "python -c 'from synapse.synapse_rust import sum_as_string; print(sum_as_string(1, 2))'"