All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/python-bcrypt: bump to version 4.0.1
@ 2022-11-02 18:30 James Hilliard
  0 siblings, 0 replies; only message in thread
From: James Hilliard @ 2022-11-02 18:30 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard, Asaf Kahlon

Replace cffi based backend with pyo3 setuptools-rust based backend.

Propagate rust reverse dependency comment.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/python-bcrypt/Config.in          |  2 +-
 package/python-bcrypt/python-bcrypt.hash |  5 ++---
 package/python-bcrypt/python-bcrypt.mk   | 17 ++++++++++++++---
 package/python-paramiko/Config.in        |  2 +-
 package/python-twisted/Config.in         |  2 +-
 5 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/package/python-bcrypt/Config.in b/package/python-bcrypt/Config.in
index 9e9864e9d2..67800df3e1 100644
--- a/package/python-bcrypt/Config.in
+++ b/package/python-bcrypt/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_PYTHON_BCRYPT
 	bool "python-bcrypt"
-	select BR2_PACKAGE_PYTHON_CFFI # runtime
+	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS
 	help
 	  Modern password hashing for your software and your servers.
 
diff --git a/package/python-bcrypt/python-bcrypt.hash b/package/python-bcrypt/python-bcrypt.hash
index b1970d8684..e148078699 100644
--- a/package/python-bcrypt/python-bcrypt.hash
+++ b/package/python-bcrypt/python-bcrypt.hash
@@ -1,5 +1,4 @@
-# md5, sha256 from https://pypi.org/pypi/bcrypt/json
-md5  fe31390dab603728f756cd3d6830c80a  bcrypt-3.2.0.tar.gz
-sha256  5b93c1726e50a93a033c36e5ca7fdcd29a5c7395af50a6892f5d9e7c6cfbfb29  bcrypt-3.2.0.tar.gz
+# Locally calculated after vendoring
+sha256  d64daee0af1afe137718674e67a49b8bb791842aab265b588a6d68d44a449c70  bcrypt-4.0.1.tar.gz
 # Locally computed sha256 checksums
 sha256  8173d5c29b4f956d532781d2b86e4e30f83e6b7878dce18c919451d6ba707c90  LICENSE
diff --git a/package/python-bcrypt/python-bcrypt.mk b/package/python-bcrypt/python-bcrypt.mk
index ad770cc974..cbd6855d9c 100644
--- a/package/python-bcrypt/python-bcrypt.mk
+++ b/package/python-bcrypt/python-bcrypt.mk
@@ -4,12 +4,23 @@
 #
 ################################################################################
 
-PYTHON_BCRYPT_VERSION = 3.2.0
+PYTHON_BCRYPT_VERSION = 4.0.1
 PYTHON_BCRYPT_SOURCE = bcrypt-$(PYTHON_BCRYPT_VERSION).tar.gz
-PYTHON_BCRYPT_SITE = https://files.pythonhosted.org/packages/d8/ba/21c475ead997ee21502d30f76fd93ad8d5858d19a3fad7cd153de698c4dd
+PYTHON_BCRYPT_SITE = https://files.pythonhosted.org/packages/8c/ae/3af7d006aacf513975fd1948a6b4d6f8b4a307f8a244e1a3d3774b297aad
 PYTHON_BCRYPT_SETUP_TYPE = setuptools
 PYTHON_BCRYPT_LICENSE = Apache-2.0
 PYTHON_BCRYPT_LICENSE_FILES = LICENSE
-PYTHON_BCRYPT_DEPENDENCIES = host-python-cffi
+PYTHON_BCRYPT_DEPENDENCIES = \
+	host-python-setuptools-rust \
+	host-rustc
+PYTHON_BCRYPT_ENV = \
+	$(PKG_CARGO_ENV) \
+	PYO3_CROSS_LIB_DIR="$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)"
+# We need to vendor the Cargo crates at download time
+PYTHON_BCRYPT_DOWNLOAD_POST_PROCESS = cargo
+PYTHON_BCRYPT_DOWNLOAD_DEPENDENCIES = host-rustc
+PYTHON_BCRYPT_DL_ENV = \
+	$(PKG_CARGO_ENV) \
+	BR_CARGO_MANIFEST_PATH=src/_bcrypt/Cargo.toml
 
 $(eval $(python-package))
diff --git a/package/python-paramiko/Config.in b/package/python-paramiko/Config.in
index a07af19a4b..aee658c790 100644
--- a/package/python-paramiko/Config.in
+++ b/package/python-paramiko/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_PYTHON_PARAMIKO
 	bool "python-paramiko"
-	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-cryptography
+	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-cryptography, python-bcrypt
 	select BR2_PACKAGE_PYTHON_BCRYPT # runtime
 	select BR2_PACKAGE_PYTHON_CRYPTOGRAPHY # runtime
 	select BR2_PACKAGE_PYTHON_PYNACL # runtime
diff --git a/package/python-twisted/Config.in b/package/python-twisted/Config.in
index c0acf35560..1f3baf57e2 100644
--- a/package/python-twisted/Config.in
+++ b/package/python-twisted/Config.in
@@ -31,7 +31,7 @@ config BR2_PACKAGE_PYTHON_TWISTED_TLS
 
 config BR2_PACKAGE_PYTHON_TWISTED_CONCH
 	bool "Conch support"
-	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-cryptography
+	depends on BR2_PACKAGE_HOST_RUSTC_TARGET_ARCH_SUPPORTS # python-cryptography, python-bcrypt
 	select BR2_PACKAGE_PYTHON_APPDIRS # runtime
 	select BR2_PACKAGE_PYTHON_BCRYPT # runtime
 	select BR2_PACKAGE_PYTHON_CRYPTOGRAPHY # runtime
-- 
2.34.1

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-02 18:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-02 18:30 [Buildroot] [PATCH 1/1] package/python-bcrypt: bump to version 4.0.1 James Hilliard

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.