python-setuptools-rust: Update to 1.8.1, remove patch
authorJeffery To <jeffery.to@gmail.com>
Tue, 31 Oct 2023 04:04:02 +0000 (12:04 +0800)
committerTianling Shen <cnsztl@gmail.com>
Wed, 1 Nov 2023 16:27:39 +0000 (00:27 +0800)
0001-Allow-profile-to-be-set-by-SETUPTOOLS_RUST_CARGO_PROFILE-env-variable.patch
has been merged in this version.

This also updates the list of dependencies for the package.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
lang/python/python-setuptools-rust/Makefile
lang/python/python-setuptools-rust/patches/0001-Allow-profile-to-be-set-by-SETUPTOOLS_RUST_CARGO_PROFILE-env-variable.patch [deleted file]

index 00a243bee3428dec90e6620c77646912ac092236..7fe77ff7ad70a7c6b1f4c37c9c3c70289aa3c572 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-setuptools-rust
-PKG_VERSION:=1.7.0
-PKG_RELEASE:=2
+PKG_VERSION:=1.8.1
+PKG_RELEASE:=1
 
 PYPI_NAME:=setuptools-rust
-PKG_HASH:=c7100999948235a38ae7e555fe199aa66c253dc384b125f5d85473bf81eae3a3
+PKG_HASH:=94b1dd5d5308b3138d5b933c3a2b55e6d6927d1a22632e509fcea9ddd0f7e486
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE
@@ -26,7 +26,6 @@ HOST_BUILD_DEPENDS:= \
        python-wheel/host \
        python-setuptools-scm/host \
        python-semantic-version/host \
-       python-typing-extensions/host \
        rust/host
 
 include ../pypi.mk
@@ -46,7 +45,6 @@ define Package/python3-setuptools-rust
     +python3-logging \
     +python3-semantic-version \
     +python3-setuptools \
-    +python3-typing-extensions \
     +rust
   BUILDONLY:=1
 endef
diff --git a/lang/python/python-setuptools-rust/patches/0001-Allow-profile-to-be-set-by-SETUPTOOLS_RUST_CARGO_PROFILE-env-variable.patch b/lang/python/python-setuptools-rust/patches/0001-Allow-profile-to-be-set-by-SETUPTOOLS_RUST_CARGO_PROFILE-env-variable.patch
deleted file mode 100644 (file)
index 842bc40..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-From b10cab4efeb80abb5a236d651c9ff9355e470527 Mon Sep 17 00:00:00 2001
-From: Jeffery To <jeffery.to@gmail.com>
-Date: Mon, 2 Oct 2023 16:13:51 +0800
-Subject: [PATCH] Allow profile to be set by SETUPTOOLS_RUST_CARGO_PROFILE env
- variable
-
-This allows the profile to be set dynamically, without having to edit
-pyproject.toml/setup.py.
----
- setuptools_rust/build.py | 20 ++++++++++++++++----
- 1 file changed, 16 insertions(+), 4 deletions(-)
-
---- a/setuptools_rust/build.py
-+++ b/setuptools_rust/build.py
-@@ -528,10 +528,10 @@ class build_rust(RustCommand):
-         if target_triple is not None:
-             args.extend(["--target", target_triple])
--        if release:
--            profile = ext.get_cargo_profile()
--            if not profile:
--                args.append("--release")
-+        ext_profile = ext.get_cargo_profile()
-+        env_profile = os.getenv("SETUPTOOLS_RUST_CARGO_PROFILE")
-+        if release and not ext_profile and not env_profile:
-+            args.append("--release")
-         if quiet:
-             args.append("-q")
-@@ -552,6 +552,18 @@ class build_rust(RustCommand):
-         if ext.args is not None:
-             args.extend(ext.args)
-+        if env_profile:
-+            if ext_profile:
-+                args = [p for p in args if not p.startswith("--profile=")]
-+                while True:
-+                    try:
-+                        index = args.index("--profile")
-+                        del args[index:index + 2]
-+                    except ValueError:
-+                        break
-+
-+            args.extend(["--profile", env_profile])
-+
-         if ext.cargo_manifest_args is not None:
-             args.extend(ext.cargo_manifest_args)