59 lines
1.5 KiB
Diff
59 lines
1.5 KiB
Diff
From d464faa67a06b4277e315e2ea0c35c32f6832025 Mon Sep 17 00:00:00 2001
|
|
From: Maxwell G <gotmax@e.email>
|
|
Date: Wed, 25 Jan 2023 13:47:35 -0600
|
|
Subject: [PATCH] Use setuptools-rust instead of maturin
|
|
|
|
Maturin is not packaged for Fedora. We can use setuptools-rust instead.
|
|
|
|
This requires setutpools >= 61.0 which is available on F37+. The
|
|
metadata in the [project] table can be translated to a setup.cfg or
|
|
added to setup.py for greater compatibility.
|
|
---
|
|
pyproject.toml | 6 +++---
|
|
setup.py | 11 +++++++++++
|
|
2 files changed, 14 insertions(+), 3 deletions(-)
|
|
create mode 100644 setup.py
|
|
|
|
diff --git a/pyproject.toml b/pyproject.toml
|
|
index 8372fc8..9f07b95 100644
|
|
--- a/pyproject.toml
|
|
+++ b/pyproject.toml
|
|
@@ -1,6 +1,6 @@
|
|
[project]
|
|
name = "orjson"
|
|
-repository = "https://github.com/ijl/orjson"
|
|
+version = "@@VERSION@@"
|
|
requires-python = ">=3.7"
|
|
classifiers = [
|
|
"Development Status :: 5 - Production/Stable",
|
|
@@ -24,8 +24,8 @@ classifiers = [
|
|
]
|
|
|
|
[build-system]
|
|
-build-backend = "maturin"
|
|
-requires = ["maturin>=0.13,<2"]
|
|
+build-backend = "setuptools.build_meta"
|
|
+requires = ["setuptools>=61.0", "setuptools-rust"]
|
|
|
|
[tool.maturin]
|
|
python-source = "pysrc"
|
|
diff --git a/setup.py b/setup.py
|
|
new file mode 100644
|
|
index 0000000..98c881f
|
|
--- /dev/null
|
|
+++ b/setup.py
|
|
@@ -0,0 +1,11 @@
|
|
+import sys
|
|
+
|
|
+from setuptools import setup
|
|
+from setuptools_rust import RustExtension, Binding
|
|
+
|
|
+setup(
|
|
+ rust_extensions=[
|
|
+ RustExtension("orjson.orjson", binding=Binding.NoBinding, args=["--offline"])
|
|
+ ],
|
|
+ package_dir={"": "pysrc"},
|
|
+)
|
|
--
|
|
2.39.2
|
|
|