From 368d4cfae1ca6cf0ddb2bb9290980a02f57d7b36 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Tue, 28 Oct 2025 09:22:42 +0100 Subject: [PATCH] maturin: fix default wheel tag For our Python at least, upstream cygwin still includes the version in sysconfig.get_platform(). --- maturin/0002-cygwin-support.patch | 17 +++++++++++++++++ maturin/PKGBUILD | 4 ++-- python-cryptography/PKGBUILD | 5 +---- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/maturin/0002-cygwin-support.patch b/maturin/0002-cygwin-support.patch index 5f8304f7..6f03086d 100644 --- a/maturin/0002-cygwin-support.patch +++ b/maturin/0002-cygwin-support.patch @@ -90,3 +90,20 @@ } else { match python_interpreter { Some(python_interpreter) if python_interpreter.is_windows_debug() => { +--- maturin-1.9.6/src/build_context.rs.orig 2025-10-28 08:12:15.861576600 +0100 ++++ maturin-1.9.6/src/build_context.rs 2025-10-28 08:12:32.743321400 +0100 +@@ -664,6 +664,14 @@ + (Os::Wasi, Arch::Wasm32) => { + "any".to_string() + } ++ // Cygwin ++ (Os::Cygwin, _) => { ++ format!( ++ "{}_{}", ++ target.target_os().to_string().to_ascii_lowercase(), ++ target.get_platform_arch()?, ++ ) ++ } + // osname_release_machine fallback for any POSIX system + (_, _) => { + let info = PlatformInfo::new() diff --git a/maturin/PKGBUILD b/maturin/PKGBUILD index 18e18ed1..9c672d5e 100644 --- a/maturin/PKGBUILD +++ b/maturin/PKGBUILD @@ -3,7 +3,7 @@ pkgbase=maturin pkgname=("python-maturin" "maturin") pkgver=1.9.6 -pkgrel=3 +pkgrel=4 pkgdesc='Build and publish crates with pyo3, rust-cpython and cffi bindings' arch=('x86_64') url='https://www.maturin.rs/' @@ -33,7 +33,7 @@ sha256sums=('2c2ae37144811d365509889ed7220b0598487f1278c2441829c3abf56cc6324a' '36bb5955216d19aed9a8fb2ec9440e7e3133de2e7d5ed1da2ad2204d449a2095' '2422ed08564445528695499757258aecde785bb6e95cde2d88f4b2cefe8417d8' 'acac76aa379bc45285f067524d7c5adceb3100698d72ae150a6b626a137e947d' - '8290bd5ee62abad58428932a739b899afa7472a959aa6629d4a54a2bf7bf59c8') + '9623ed9eec8db867933c8c80f16087e86de9bb08162433cf8eae964eb50ff1ad') prepare() { cp -r "${pkgbase}-${pkgver}" "python-build" && cd "python-build" diff --git a/python-cryptography/PKGBUILD b/python-cryptography/PKGBUILD index 998f2497..187c1b6e 100644 --- a/python-cryptography/PKGBUILD +++ b/python-cryptography/PKGBUILD @@ -3,7 +3,7 @@ _realname=cryptography pkgname=python-cryptography pkgver=46.0.3 -pkgrel=1 +pkgrel=2 pkgdesc="A package designed to expose cryptographic recipes and primitives to Python developers" arch=('i686' 'x86_64') license=('spdx:Apache-2.0 OR BSD-3-Clause') @@ -31,9 +31,6 @@ build() { # XXX: to fix maturin OS detection export MSYSTEM=CYGWIN - # XXX: to fix the maturin wheel tag - export _PYTHON_HOST_PLATFORM=$(python -c "import sysconfig, sys; sys.stdout.write(sysconfig.get_platform())") - # XXX: this should be handled by maturin/pyo3 somehow local link_arg=$(python -c "import sysconfig; print(sysconfig.get_config_var('LIBPYTHON'))") export RUSTFLAGS="-C link-arg=$link_arg"