diff --git a/recipe/6542.patch b/recipe/6542.patch new file mode 100644 index 0000000..9773bea --- /dev/null +++ b/recipe/6542.patch @@ -0,0 +1,102 @@ +From 0bbf05b0fa8bb7948803ab0132d71439c567e92d Mon Sep 17 00:00:00 2001 +From: Alex Gaynor +Date: Wed, 3 Nov 2021 19:38:16 -0400 +Subject: [PATCH] Bump pyo3 and fix warnings + +--- + src/rust/Cargo.lock | 16 ++++++++-------- + src/rust/Cargo.toml | 2 +- + src/rust/src/x509/certificate.rs | 2 +- + src/rust/src/x509/crl.rs | 2 +- + 4 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/src/rust/Cargo.lock b/src/rust/Cargo.lock +index 3c56819090..873bee324a 100644 +--- a/src/rust/Cargo.lock ++++ b/src/rust/Cargo.lock +@@ -281,9 +281,9 @@ dependencies = [ + + [[package]] + name = "pyo3" +-version = "0.14.5" ++version = "0.15.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "35100f9347670a566a67aa623369293703322bb9db77d99d7df7313b575ae0c8" ++checksum = "64664505ce285a59b8b7e940fbe54ad65b1758a0810eddc5bc26df6f6ec8c557" + dependencies = [ + "cfg-if", + "indoc", +@@ -297,18 +297,18 @@ dependencies = [ + + [[package]] + name = "pyo3-build-config" +-version = "0.14.5" ++version = "0.15.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "d12961738cacbd7f91b7c43bc25cfeeaa2698ad07a04b3be0aa88b950865738f" ++checksum = "5f1e4a72de84cdcd69f62211b62f62753d0c11b7b5715f3467f3754dab22a7ca" + dependencies = [ + "once_cell", + ] + + [[package]] + name = "pyo3-macros" +-version = "0.14.5" ++version = "0.15.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "fc0bc5215d704824dfddddc03f93cb572e1155c68b6761c37005e1c288808ea8" ++checksum = "244f21d0a3887a9c02018b94e3b78d693dc7eca5c56839b7796a499cc364deb4" + dependencies = [ + "pyo3-macros-backend", + "quote", +@@ -317,9 +317,9 @@ dependencies = [ + + [[package]] + name = "pyo3-macros-backend" +-version = "0.14.5" ++version = "0.15.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "71623fc593224afaab918aa3afcaf86ed2f43d34f6afde7f3922608f253240df" ++checksum = "b3d3d18ac41d05199bb82645d56e39f8c8b4909a0137c6f2640f03685b29f672" + dependencies = [ + "proc-macro2", + "pyo3-build-config", +diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml +index a2c90b4f96..ef3059e948 100644 +--- a/src/rust/Cargo.toml ++++ b/src/rust/Cargo.toml +@@ -7,7 +7,7 @@ publish = false + + [dependencies] + lazy_static = "1" +-pyo3 = { version = "0.14.5" } ++pyo3 = { version = "0.15.0" } + asn1 = { version = "0.8.6", default-features = false, features = ["derive"] } + pem = "1.0" + chrono = { version = "0.4", default-features = false, features = ["alloc", "clock"] } +diff --git a/src/rust/src/x509/certificate.rs b/src/rust/src/x509/certificate.rs +index e72b954d13..99bd2d318d 100644 +--- a/src/rust/src/x509/certificate.rs ++++ b/src/rust/src/x509/certificate.rs +@@ -6,7 +6,7 @@ use crate::asn1::{big_asn1_uint_to_py, py_uint_to_big_endian_bytes, PyAsn1Error, + use crate::x509; + use crate::x509::{crl, sct}; + use chrono::Datelike; +-use pyo3::{PyNativeType, ToPyObject}; ++use pyo3::ToPyObject; + use std::collections::hash_map::DefaultHasher; + use std::hash::{Hash, Hasher}; + use std::sync::Arc; +diff --git a/src/rust/src/x509/crl.rs b/src/rust/src/x509/crl.rs +index cbcd127b25..551d4052af 100644 +--- a/src/rust/src/x509/crl.rs ++++ b/src/rust/src/x509/crl.rs +@@ -5,7 +5,7 @@ + use crate::asn1::{big_asn1_uint_to_py, py_uint_to_big_endian_bytes, PyAsn1Error, PyAsn1Result}; + use crate::x509; + use crate::x509::certificate; +-use pyo3::{PyNativeType, ToPyObject}; ++use pyo3::ToPyObject; + use std::convert::TryInto; + use std::sync::Arc; + diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 4bce268..41ceedf 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -7,6 +7,9 @@ package: source: url: https://pypi.io/packages/source/c/cryptography/cryptography-{{ version }}.tar.gz sha256: 9933f28f70d0517686bd7de36166dda42094eac49415459d9bdf5e7df3e0086d + patches: + # Update pyo3 to avoid https://github.com/PyO3/pyo3/pull/1847#discussion_r727122252 + - 6542.patch # [build_platform != target_platform] build: number: 2 @@ -14,7 +17,7 @@ build: script: {% if build_platform != target_platform %} - export PYO3_CROSS_INCLUDE_DIR=$PREFIX/include - - export PYO3_CROSS_LIB_DIR=$PREFIX/lib/python$PY_VER/ + - export PYO3_CROSS_LIB_DIR=$SP_DIR/../ - export PYO3_CROSS_PYTHON_VERSION=$PY_VER {% endif %} - {{ PYTHON }} -m pip install . -vv