Skip to content

Commit

Permalink
python3-bcrypt temp fix for mipsel, wait for upstream fix pyo3-0.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Captain committed Jan 18, 2024
1 parent 46a1f37 commit 7857a40
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 146 deletions.
1 change: 0 additions & 1 deletion meta-oe/conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ PREFERRED_VERSION_python3-cryptography ?= "41.%"
PREFERRED_VERSION_python3-google-api-python-client ?= "2.%"
PREFERRED_VERSION_nodejs ?= "20.%"
PREFERRED_VERSION_nodejs:mipsel = "18.17.1"
PREFERRED_VERSION_python3-bcrypt:mipsel = "4.0.1"
PREFERRED_VERSION_cairo = "1.16.0"


Expand Down
104 changes: 0 additions & 104 deletions meta-oe/recipes-devtools/python/python3-bcrypt-crates.inc

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
From e6457c5e99857e0c0c1924a7c3e12560921eb5c0 Mon Sep 17 00:00:00 2001
From: Adam Reichold <adam.reichold@t-online.de>
Date: Sat, 2 Dec 2023 07:52:33 +0100
Subject: [PATCH] Use portable-atomic for targets which lack 64-bit atomics
used to check interpreter ID.

I chose to make the dependency mandatory instead of optional as portable-atomic
itself just forwards to the native atomics when they are available so making
that choice part of our build system is not really necessary. Personally, I was
unable to perceive any noticeable compile-time hit from adding it.
---
Cargo.toml | 1 +
src/impl_/pymodule.rs | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)
create mode 100644 newsfragments/3619.fixed.md

diff --git a/Cargo.toml b/Cargo.toml
index 1b6416f0..01a888be 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -62,6 +62,9 @@
"docsrs",
]

+[target.'cfg(not(target_has_atomic = "64"))'.dependencies]
+portable-atomic = "1.0"
+
[dependencies.anyhow]
version = "1.0"
optional = true
diff --git a/src/impl_/pymodule.rs b/src/impl_/pymodule.rs
index 8ec96345..7c5243fc 100644
--- a/src/impl_/pymodule.rs
+++ b/src/impl_/pymodule.rs
@@ -3,7 +3,7 @@
use std::cell::UnsafeCell;

#[cfg(all(not(PyPy), Py_3_9, not(all(windows, Py_LIMITED_API, not(Py_3_10)))))]
-use std::sync::atomic::{AtomicI64, Ordering};
+use portable_atomic::{AtomicI64, Ordering};

#[cfg(not(PyPy))]
use crate::exceptions::PyImportError;
--
2.43.0.windows.1

3 changes: 0 additions & 3 deletions meta-oe/recipes-devtools/python/python3-bcrypt/run-ptest

This file was deleted.

10 changes: 10 additions & 0 deletions meta-oe/recipes-devtools/python/python3-bcrypt_%.bbappend
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

DEPENDS:append = " ${PYTHON_PN}-semantic-version-native"

include ${PYTHON_PN}-package-split.inc

SRC_URI:append:mips32el = " \
crate://crates.io/portable-atomic/1.6.0 \
file://0001-Use-portable-atomic-for-targets-which-lack-64-bit-at.patch;patchdir=../cargo_home/bitbake/pyo3-0.20.0/ \
"

SRC_URI[portable-atomic-1.6.0.sha256sum] = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0"

38 changes: 0 additions & 38 deletions meta-oe/recipes-devtools/python/python3-bcrypt_4.0.1.bb

This file was deleted.

0 comments on commit 7857a40

Please sign in to comment.