All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/python-maturin: new package
@ 2022-05-09 22:10 James Hilliard
  2022-05-09 22:10 ` [Buildroot] [PATCH 2/2] package/python-orjson: bump to version 3.6.8 James Hilliard
  2022-05-11 22:05 ` [Buildroot] [PATCH 1/2] package/python-maturin: new package Graeme Smecher
  0 siblings, 2 replies; 3+ messages in thread
From: James Hilliard @ 2022-05-09 22:10 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard, Graeme Smecher, Thomas Petazzoni, Asaf Kahlon

This is pep517 pyo3 build backend that's an alternative to
python-setuptools-rust.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 .../0001-Fix-invalid-pyproject.toml.patch     | 62 +++++++++++++++++++
 package/python-maturin/python-maturin.hash    |  5 ++
 package/python-maturin/python-maturin.mk      | 20 ++++++
 3 files changed, 87 insertions(+)
 create mode 100644 package/python-maturin/0001-Fix-invalid-pyproject.toml.patch
 create mode 100644 package/python-maturin/python-maturin.hash
 create mode 100644 package/python-maturin/python-maturin.mk

diff --git a/package/python-maturin/0001-Fix-invalid-pyproject.toml.patch b/package/python-maturin/0001-Fix-invalid-pyproject.toml.patch
new file mode 100644
index 0000000000..7d227fea18
--- /dev/null
+++ b/package/python-maturin/0001-Fix-invalid-pyproject.toml.patch
@@ -0,0 +1,62 @@
+From 9ad69941d02e494d45ee67f3bcccc83c0bb4cdcd Mon Sep 17 00:00:00 2001
+From: James Hilliard <james.hilliard1@gmail.com>
+Date: Mon, 9 May 2022 14:37:36 -0600
+Subject: [PATCH] Fix invalid pyproject.toml
+
+These attributes should be marked dynamic.
+
+Fixes:
+configuration error: `project` must contain ['version'] properties
+
+Fixes:
+The following seems to be defined outside of `pyproject.toml`:
+
+`description = 'Build and publish crates with pyo3, rust-cpython and cffi bindings as well as rust binaries as python packages'`
+
+According to the spec (see the link bellow), however, setuptools CANNOT
+consider this value unless 'description' is listed as `dynamic`.
+
+Fixes:
+The following seems to be defined outside of `pyproject.toml`:
+
+`license = 'MIT OR Apache-2.0'`
+
+According to the spec (see the link bellow), however, setuptools CANNOT
+consider this value unless 'license' is listed as `dynamic`.
+
+Fixes:
+The following seems to be defined outside of `pyproject.toml`:
+
+`authors = 'konstin'`
+
+According to the spec (see the link bellow), however, setuptools CANNOT
+consider this value unless 'authors' is listed as `dynamic`.
+
+Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
+[Upstream status:
+https://github.com/PyO3/maturin/pull/908]
+---
+ pyproject.toml | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index 207ceb7..329faae 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -13,6 +13,13 @@ classifiers = [
+     "Programming Language :: Python :: Implementation :: PyPy",
+ ]
+ dependencies = ["tomli>=1.1.0 ; python_version<'3.11'"]
++dynamic = [
++    "authors",
++    "description",
++    "license",
++    "readme",
++    "version"
++]
+ 
+ [project.optional-dependencies]
+ zig = [
+-- 
+2.25.1
+
diff --git a/package/python-maturin/python-maturin.hash b/package/python-maturin/python-maturin.hash
new file mode 100644
index 0000000000..e9ba83e78e
--- /dev/null
+++ b/package/python-maturin/python-maturin.hash
@@ -0,0 +1,5 @@
+# Locally calculated after vendoring
+sha256  092db51dfd1479e3abfc8eef4b109b6ab504481959e383090827e2024f09aab3  maturin-0.12.15.tar.gz
+# Locally computed sha256 checksums
+sha256  a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2  license-apache
+sha256  ea7882c559733766ad08343bde1d1ec80a4967c03a738fb8e0058ef6289f7b7c  license-mit
diff --git a/package/python-maturin/python-maturin.mk b/package/python-maturin/python-maturin.mk
new file mode 100644
index 0000000000..f6daabc008
--- /dev/null
+++ b/package/python-maturin/python-maturin.mk
@@ -0,0 +1,20 @@
+################################################################################
+#
+# python-maturin
+#
+################################################################################
+
+PYTHON_MATURIN_VERSION = 0.12.15
+PYTHON_MATURIN_SOURCE = maturin-$(PYTHON_MATURIN_VERSION).tar.gz
+PYTHON_MATURIN_SITE = https://files.pythonhosted.org/packages/30/4d/b8a32e0bd711f7905fa8f10487be7dbf9992c5b5b3bfa8734abf2487d967
+PYTHON_MATURIN_SETUP_TYPE = setuptools
+PYTHON_MATURIN_LICENSE = Apache-2.0 or MIT
+PYTHON_MATURIN_LICENSE_FILES = license-apache license-mit
+HOST_PYTHON_MATURIN_DEPENDENCIES = host-python-tomli host-rustc
+HOST_PYTHON_MATURIN_ENV = $(HOST_PKG_CARGO_ENV)
+# We need to vendor the Cargo crates at download time
+PYTHON_MATURIN_DOWNLOAD_POST_PROCESS = cargo
+PYTHON_MATURIN_DOWNLOAD_DEPENDENCIES = host-rustc
+HOST_PYTHON_MATURIN_DL_ENV = $(HOST_PKG_CARGO_ENV)
+
+$(eval $(host-python-package))
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-11 22:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-09 22:10 [Buildroot] [PATCH 1/2] package/python-maturin: new package James Hilliard
2022-05-09 22:10 ` [Buildroot] [PATCH 2/2] package/python-orjson: bump to version 3.6.8 James Hilliard
2022-05-11 22:05 ` [Buildroot] [PATCH 1/2] package/python-maturin: new package Graeme Smecher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.