Fedora contributions by:
Alfredo Moralejo <amoralej@redhat.com>
Benjamin A. Beasley <code@musicinmybrain.net>
Charalampos Stratakis <cstratak@redhat.com>
Christian Heimes <christian@python.org>
Colin Walters <walters@verbum.org>
Dennis Gilmore <dennis@ausil.us>
Fabio Valentini <decathorpe@gmail.com>
Felix Schwarz <felix.schwarz@oss.schwarz.eu>
Francisco Trivino <ftrivino@redhat.com>
Haikel Guemar <hguemar@fedoraproject.org>
Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Iryna Shcherbina <shcherbina.iryna@gmail.com>
Jeremy Cline <jeremy@jcline.org>
Lumir Balhar <lbalhar@redhat.com>
Matěj Cepl <mcepl@cepl.eu>
Miro Hrončok <miro@hroncok.cz>
Nathaniel McCallum <npmccallum@redhat.com>
Peter Robinson <pbrobinson@gmail.com>
Randy Barlow <randy@electronsweatshop.com>
Robert Kuska <rkuska@redhat.com>
Sahana Prasad <sahana@redhat.com>
Stephen Gallagher <sgallagh@redhat.com>
Troy Dawson <tdawson@redhat.com>
Yaakov Selkowitz <yselkowi@redhat.com>
97 lines
2.8 KiB
Diff
97 lines
2.8 KiB
Diff
From c12aed73a8e6557ed4125038be62439db820624c Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
|
|
Date: Wed, 10 Sep 2025 11:20:00 +0200
|
|
Subject: [PATCH] Replace maturin build backend with setuptools-rust
|
|
|
|
---
|
|
pyproject.toml | 52 +++++++++++++++-----------------------------------
|
|
1 file changed, 15 insertions(+), 37 deletions(-)
|
|
|
|
diff --git a/pyproject.toml b/pyproject.toml
|
|
index d9ef70420..573f80cec 100644
|
|
--- a/pyproject.toml
|
|
+++ b/pyproject.toml
|
|
@@ -2,16 +2,15 @@
|
|
# These requirements must be kept sync with the requirements in
|
|
# ./.github/requirements/build-requirements.{in,txt}
|
|
requires = [
|
|
- "maturin>=1.8.6,<2",
|
|
-
|
|
# Must be kept in sync with `project.dependencies`
|
|
"cffi>=1.14; platform_python_implementation != 'PyPy'",
|
|
# Used by cffi (which import distutils, and in Python 3.12, distutils has
|
|
# been removed from the stdlib, but installing setuptools puts it back) as
|
|
# well as our build.rs for the rust/cffi bridge.
|
|
"setuptools!=74.0.0,!=74.1.0,!=74.1.1,!=74.1.2",
|
|
+ "setuptools-rust>=1.5.0",
|
|
]
|
|
-build-backend = "maturin"
|
|
+build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "cryptography"
|
|
@@ -59,6 +58,14 @@ source = "https://github.com/pyca/cryptography/"
|
|
issues = "https://github.com/pyca/cryptography/issues"
|
|
changelog = "https://cryptography.io/en/latest/changelog/"
|
|
|
|
+[tool.setuptools]
|
|
+zip-safe = false
|
|
+package-dir = {"" = "src"}
|
|
+
|
|
+[tool.setuptools.packages.find]
|
|
+where = ["src"]
|
|
+include = ["cryptography*"]
|
|
+
|
|
[project.optional-dependencies]
|
|
ssh = ["bcrypt >=3.1.5"]
|
|
|
|
@@ -93,40 +100,11 @@ pep8test = [
|
|
"click >=8.0.1",
|
|
]
|
|
|
|
-[tool.maturin]
|
|
-python-source = "src"
|
|
-python-packages = ["cryptography"]
|
|
-manifest-path = "src/rust/Cargo.toml"
|
|
-module-name = "cryptography.hazmat.bindings._rust"
|
|
-locked = true
|
|
-sdist-generator = "git"
|
|
-include = [
|
|
- "CHANGELOG.rst",
|
|
- "CONTRIBUTING.rst",
|
|
-
|
|
- "docs/**/*",
|
|
-
|
|
- { path = "src/_cffi_src/**/*.py", format = "sdist" },
|
|
- { path = "src/_cffi_src/**/*.c", format = "sdist" },
|
|
- { path = "src/_cffi_src/**/*.h", format = "sdist" },
|
|
-
|
|
- { path = "Cargo.toml", format = "sdist" },
|
|
- { path = "Cargo.lock", format = "sdist" },
|
|
- { path = "src/rust/**/Cargo.toml", format = "sdist" },
|
|
- { path = "src/rust/**/Cargo.lock", format = "sdist" },
|
|
- { path = "src/rust/**/*.rs", format = "sdist" },
|
|
-
|
|
- "tests/**/*.py",
|
|
-]
|
|
-exclude = [
|
|
- "vectors/**/*",
|
|
- "target/**/*",
|
|
- "docs/_build/**/*",
|
|
- ".github/**/*",
|
|
- ".readthedocs.yml",
|
|
- "ci-constraints-requirements.txt",
|
|
- "mypy.ini",
|
|
-]
|
|
+[[tool.setuptools-rust.ext-modules]]
|
|
+target = "cryptography.hazmat.bindings._rust"
|
|
+path = "src/rust/Cargo.toml"
|
|
+py-limited-api = "auto"
|
|
+rust-version = ">=1.65.0"
|
|
|
|
[tool.pytest.ini_options]
|
|
addopts = "-r s --capture=no --strict-markers --benchmark-disable"
|
|
--
|
|
2.51.0
|
|
|