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

@ -1,38 +1,38 @@
[tool.towncrier]
package = "synapse"
filename = "CHANGES.md"
directory = "changelog.d"
issue_format = "[\\#{issue}](https://github.com/element-hq/synapse/issues/{issue})"
package = "synapse"
filename = "CHANGES.md"
directory = "changelog.d"
issue_format = "[\\#{issue}](https://github.com/element-hq/synapse/issues/{issue})"
[[tool.towncrier.type]]
directory = "feature"
name = "Features"
showcontent = true
[[tool.towncrier.type]]
directory = "feature"
name = "Features"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bugfixes"
showcontent = true
[[tool.towncrier.type]]
directory = "bugfix"
name = "Bugfixes"
showcontent = true
[[tool.towncrier.type]]
directory = "docker"
name = "Updates to the Docker image"
showcontent = true
[[tool.towncrier.type]]
directory = "docker"
name = "Updates to the Docker image"
showcontent = true
[[tool.towncrier.type]]
directory = "doc"
name = "Improved Documentation"
showcontent = true
[[tool.towncrier.type]]
directory = "doc"
name = "Improved Documentation"
showcontent = true
[[tool.towncrier.type]]
directory = "removal"
name = "Deprecations and Removals"
showcontent = true
[[tool.towncrier.type]]
directory = "removal"
name = "Deprecations and Removals"
showcontent = true
[[tool.towncrier.type]]
directory = "misc"
name = "Internal Changes"
showcontent = true
[[tool.towncrier.type]]
directory = "misc"
name = "Internal Changes"
showcontent = true
[tool.ruff]
line-length = 88
@ -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",
@ -121,7 +123,7 @@ include = [
{ path = "INSTALL.md", format = "sdist" },
{ path = "mypy.ini", format = "sdist" },
{ path = "scripts-dev", format = "sdist" },
{ path = "synmark", format="sdist" },
{ path = "synmark", format = "sdist" },
{ path = "sytest-blacklist", format = "sdist" },
{ path = "tests", format = "sdist" },
{ path = "UPGRADE.rst", format = "sdist" },
@ -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"
@ -174,7 +174,7 @@ signedjson = "^1.1.0"
service-identity = ">=18.1.0"
# Twisted 18.9 introduces some logger improvements that the structured
# logger utilises
Twisted = {extras = ["tls"], version = ">=18.9.0"}
Twisted = { extras = ["tls"], version = ">=18.9.0" }
treq = ">=15.1"
# Twisted has required pyopenssl 16.0 since about Twisted 16.6.
pyOpenSSL = ">=16.0.0"
@ -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"
@ -387,8 +391,8 @@ build-backend = "poetry.core.masonry.api"
skip = "cp36* cp37* cp38* pp37* pp38* *-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" }
before-all = "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y --profile minimal"
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