Bump setuptools_rust

This commit is contained in:
Erik Johnston 2024-11-18 17:28:11 +00:00
parent 9d837daa8a
commit a7ad582ac7
4 changed files with 875 additions and 706 deletions

View file

@ -14,7 +14,7 @@ def build(setup_kwargs: Dict[str, Any]) -> None:
target="synapse.synapse_rust",
path=cargo_toml_path,
binding=Binding.PyO3,
py_limited_api=True,
# 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,

2
extra_config.cfg Normal file
View file

@ -0,0 +1,2 @@
[bdist_wheel]
py_limited_api = cp39

1477
poetry.lock generated

File diff suppressed because it is too large Load diff

View file

@ -47,11 +47,7 @@ target-version = "py39"
# flake8-bugbear compatible checks. Its error codes are described at
# https://beta.ruff.rs/docs/rules/#flake8-bugbear-b
# B023: Functions defined inside a loop must not use variables redefined in the loop
ignore = [
"B023",
"E501",
"E731",
]
ignore = ["B023", "E501", "E731"]
select = [
# pycodestyle
"E",
@ -78,7 +74,15 @@ select = [
[tool.ruff.lint.isort]
combine-as-imports = true
section-order = ["future", "standard-library", "third-party", "twisted", "first-party", "testing", "local-folder"]
section-order = [
"future",
"standard-library",
"third-party",
"twisted",
"first-party",
"testing",
"local-folder",
]
known-first-party = ["synapse"]
[tool.ruff.lint.isort.sections]
@ -103,9 +107,7 @@ authors = ["Matrix.org Team and Contributors <packages@matrix.org>"]
license = "AGPL-3.0-or-later"
readme = "README.rst"
repository = "https://github.com/element-hq/synapse"
packages = [
{ include = "synapse" },
]
packages = [{ include = "synapse" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Topic :: Communications :: Chat",
@ -131,9 +133,7 @@ include = [
{ path = "rust/build.rs", format = "sdist" },
{ path = "rust/src/**", format = "sdist" },
]
exclude = [
{ path = "synapse/*.so", format = "sdist"}
]
exclude = [{ path = "synapse/*.so", format = "sdist" }]
[tool.poetry.build]
script = "build_rust.py"
@ -293,7 +293,9 @@ all = [
# matrix-synapse-ldap3
"matrix-synapse-ldap3",
# postgres
"psycopg2", "psycopg2cffi", "psycopg2cffi-compat",
"psycopg2",
"psycopg2cffi",
"psycopg2cffi-compat",
# saml2
"pysaml2",
# oidc and jwt
@ -303,9 +305,11 @@ all = [
# sentry
"sentry-sdk",
# opentracing
"jaeger-client", "opentracing",
"jaeger-client",
"opentracing",
# redis
"txredisapi", "hiredis",
"txredisapi",
"hiredis",
# cache-memory
"pympler",
# improved user search
@ -370,7 +374,7 @@ tomli = ">=1.2.3"
# 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.1", "setuptools_rust>=1.3,<=1.8.1"]
requires = ["poetry-core>=1.1.0,<=1.9.1", "setuptools_rust>=1.3,<=1.10.2"]
build-backend = "poetry.core.masonry.api"
@ -388,7 +392,7 @@ skip = "cp36* cp37* cp38* pp37* pp38* *-musllinux_i686 pp*aarch64 *-musllinux_aa
# 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 = "/project/extra_config.cfg" }
# 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