From 5065393acefd473b54144436ae23163420ca9a69 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Fri, 22 Aug 2025 11:01:47 +0200 Subject: [PATCH 1/7] maturin: Update to 1.9.3 --- maturin/PKGBUILD | 62 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 maturin/PKGBUILD diff --git a/maturin/PKGBUILD b/maturin/PKGBUILD new file mode 100644 index 00000000000..ff84c160f2e --- /dev/null +++ b/maturin/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: Christoph Reiter + +pkgbase=maturin +pkgname=("python-maturin" "maturin") +pkgver=1.9.3 +pkgrel=1 +pkgdesc='Build and publish crates with pyo3, rust-cpython and cffi bindings' +arch=('x86_64' 'i686') +url='https://www.maturin.rs/' +msys2_repository_url='https://github.com/pyo3/maturin' +msys2_references=( + 'purl: pkg:pypi/maturin' +) +license=('spdx:MIT OR Apache-2.0') +makedepends=( + "python-build" + "python-installer" + "python-setuptools-rust") +options=('!strip') +source=("https://pypi.org/packages/source/${pkgbase::1}/${pkgbase}/${pkgbase}-${pkgver}.tar.gz") +sha256sums=('267ac8d0471d1ee2320b8b2ee36f400a32cd2492d7becbd0d976bd3503c2f69b') + +prepare() { + cp -r "${pkgbase}-${pkgver}" "python-build" && cd "python-build" + + cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" +} + +build() { + cd "python-build" + + export MATURIN_SETUP_ARGS="--features full,rustls" + python -m build --wheel --skip-dependency-check --no-isolation +} + +package_python-maturin() { + pkgdesc+=' (Python bindings)' + depends=("python" "maturin") + + cd "python-build" + + python -m installer --prefix=/usr \ + --destdir="${pkgdir}" dist/*.whl + + install -Dm644 license-{apache,mit} -t "${pkgdir}/usr/share/licenses/python-${pkgbase}/" + + # split maturin executable + mkdir -p "dest/usr/bin" + mv "${pkgdir}/usr"/bin/* "dest/usr/bin/" +} + +package_maturin() { + cd "python-build" + + mv dest/* "${pkgdir}" + + local _complete="${pkgdir}/usr/bin/maturin completions" + $_complete bash | install -Dm644 /dev/stdin "${pkgdir}/usr/share/bash-completion/completions/maturin" + $_complete zsh | install -Dm644 /dev/stdin "${pkgdir}/usr/share/zsh/site-functions/_maturin" + $_complete fish | install -Dm644 /dev/stdin "${pkgdir}/usr/share/fish/vendor_completions.d/maturin.fish" + install -Dm644 license-{apache,mit} -t "${pkgdir}/usr/share/licenses/${pkgbase}/" +} From 79548a8de161ed3a2bc28743de6eb8efdf0ec229 Mon Sep 17 00:00:00 2001 From: ognevnydemon Date: Sun, 24 Aug 2025 15:53:12 +0300 Subject: [PATCH 2/7] try --- maturin/.gitignore | 1 + maturin/PKGBUILD | 34 +++++++++++++++++++++++++++---- maturin/maturin-update-deps.patch | 11 ++++++++++ maturin/tar-rs-update-deps.patch | 9 ++++++++ 4 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 maturin/.gitignore create mode 100644 maturin/maturin-update-deps.patch create mode 100644 maturin/tar-rs-update-deps.patch diff --git a/maturin/.gitignore b/maturin/.gitignore new file mode 100644 index 00000000000..e946964511a --- /dev/null +++ b/maturin/.gitignore @@ -0,0 +1 @@ +/121.patch diff --git a/maturin/PKGBUILD b/maturin/PKGBUILD index ff84c160f2e..cf77dbbf099 100644 --- a/maturin/PKGBUILD +++ b/maturin/PKGBUILD @@ -5,7 +5,7 @@ pkgname=("python-maturin" "maturin") pkgver=1.9.3 pkgrel=1 pkgdesc='Build and publish crates with pyo3, rust-cpython and cffi bindings' -arch=('x86_64' 'i686') +arch=('x86_64') url='https://www.maturin.rs/' msys2_repository_url='https://github.com/pyo3/maturin' msys2_references=( @@ -17,13 +17,39 @@ makedepends=( "python-installer" "python-setuptools-rust") options=('!strip') -source=("https://pypi.org/packages/source/${pkgbase::1}/${pkgbase}/${pkgbase}-${pkgver}.tar.gz") -sha256sums=('267ac8d0471d1ee2320b8b2ee36f400a32cd2492d7becbd0d976bd3503c2f69b') +source=("https://pypi.org/packages/source/${pkgbase::1}/${pkgbase}/${pkgbase}-${pkgver}.tar.gz" + "tar-0.4.43.tar.gz::https://crates.io/api/v1/crates/tar/0.4.43/download" + "target-lexicon-0.13.1.tar.gz::https://crates.io/api/v1/crates/target-lexicon/0.13.1/download" + "maturin-update-deps.patch" + "tar-rs-update-deps.patch" + "https://patch-diff.githubusercontent.com/raw/bytecodealliance/target-lexicon/pull/121.patch") +sha256sums=('267ac8d0471d1ee2320b8b2ee36f400a32cd2492d7becbd0d976bd3503c2f69b' + 'c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6' + 'dc12939a1c9b9d391e0b7135f72fd30508b73450753e28341fed159317582a77' + '36bb5955216d19aed9a8fb2ec9440e7e3133de2e7d5ed1da2ad2204d449a2095' + '2422ed08564445528695499757258aecde785bb6e95cde2d88f4b2cefe8417d8' + 'e0b46bbfb946b0231469e9ae1112e766430113cbeae33edb72eb314a32466cac') prepare() { cp -r "${pkgbase}-${pkgver}" "python-build" && cd "python-build" - cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" + # support cygwin in target-lexicon + patch -d ../target-lexicon-0.13.1 -p1 -i ../121.patch + # update deps to add cygwin support + patch -Np1 -i ../maturin-update-deps.patch + patch -d ../tar-0.4.43 -p1 -i ../tar-rs-update-deps.patch + cat >> Cargo.toml < Date: Sun, 24 Aug 2025 16:13:06 +0300 Subject: [PATCH 3/7] try again --- maturin/PKGBUILD | 12 +++++++++--- maturin/getrandom-support-cygwin.patch | 23 +++++++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 maturin/getrandom-support-cygwin.patch diff --git a/maturin/PKGBUILD b/maturin/PKGBUILD index cf77dbbf099..1a66bf72bdd 100644 --- a/maturin/PKGBUILD +++ b/maturin/PKGBUILD @@ -20,42 +20,48 @@ options=('!strip') source=("https://pypi.org/packages/source/${pkgbase::1}/${pkgbase}/${pkgbase}-${pkgver}.tar.gz" "tar-0.4.43.tar.gz::https://crates.io/api/v1/crates/tar/0.4.43/download" "target-lexicon-0.13.1.tar.gz::https://crates.io/api/v1/crates/target-lexicon/0.13.1/download" + "getrandom-0.2.15.tar.gz::https://crates.io/api/v1/crates/getrandom/0.2.15/download" "maturin-update-deps.patch" "tar-rs-update-deps.patch" + "getrandom-support-cygwin.patch" "https://patch-diff.githubusercontent.com/raw/bytecodealliance/target-lexicon/pull/121.patch") sha256sums=('267ac8d0471d1ee2320b8b2ee36f400a32cd2492d7becbd0d976bd3503c2f69b' 'c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6' 'dc12939a1c9b9d391e0b7135f72fd30508b73450753e28341fed159317582a77' + 'c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7' '36bb5955216d19aed9a8fb2ec9440e7e3133de2e7d5ed1da2ad2204d449a2095' '2422ed08564445528695499757258aecde785bb6e95cde2d88f4b2cefe8417d8' + 'acac76aa379bc45285f067524d7c5adceb3100698d72ae150a6b626a137e947d' 'e0b46bbfb946b0231469e9ae1112e766430113cbeae33edb72eb314a32466cac') prepare() { cp -r "${pkgbase}-${pkgver}" "python-build" && cd "python-build" - # support cygwin in target-lexicon + # support cygwin in some deps patch -d ../target-lexicon-0.13.1 -p1 -i ../121.patch + patch -d ../getrandom-0.2.15 -p1 -i ../getrandom-support-cygwin.patch # update deps to add cygwin support patch -Np1 -i ../maturin-update-deps.patch patch -d ../tar-0.4.43 -p1 -i ../tar-rs-update-deps.patch cat >> Cargo.toml < Date: Sun, 24 Aug 2025 16:19:12 +0300 Subject: [PATCH 4/7] a --- maturin/PKGBUILD | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maturin/PKGBUILD b/maturin/PKGBUILD index 1a66bf72bdd..8604d43397a 100644 --- a/maturin/PKGBUILD +++ b/maturin/PKGBUILD @@ -12,10 +12,13 @@ msys2_references=( 'purl: pkg:pypi/maturin' ) license=('spdx:MIT OR Apache-2.0') +depends=("python" "libopenssl") makedepends=( "python-build" "python-installer" - "python-setuptools-rust") + "python-setuptools-rust" + "openssl-devel" + "pkgconf") options=('!strip') source=("https://pypi.org/packages/source/${pkgbase::1}/${pkgbase}/${pkgbase}-${pkgver}.tar.gz" "tar-0.4.43.tar.gz::https://crates.io/api/v1/crates/tar/0.4.43/download" @@ -62,6 +65,7 @@ build() { cd "python-build" export MATURIN_SETUP_ARGS="--features full,native-tls" + export OPENSSL_NO_VENDOR=1 python -m build --wheel --skip-dependency-check --no-isolation } From e4ec66878461ef36fb41363d8e19b8585d6e96da Mon Sep 17 00:00:00 2001 From: ognevnydemon Date: Sun, 24 Aug 2025 16:24:43 +0300 Subject: [PATCH 5/7] how to get rid of rustls? --- maturin/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maturin/PKGBUILD b/maturin/PKGBUILD index 8604d43397a..cc7a3ea1e89 100644 --- a/maturin/PKGBUILD +++ b/maturin/PKGBUILD @@ -64,7 +64,7 @@ END build() { cd "python-build" - export MATURIN_SETUP_ARGS="--features full,native-tls" + export MATURIN_SETUP_ARGS="--features full" export OPENSSL_NO_VENDOR=1 python -m build --wheel --skip-dependency-check --no-isolation } From 644782a7c53515905477865df44051ad3b3ec69a Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Wed, 27 Aug 2025 20:41:39 +0200 Subject: [PATCH 6/7] maturin: Update to 1.9.4 --- maturin/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maturin/PKGBUILD b/maturin/PKGBUILD index cc7a3ea1e89..ced19311eda 100644 --- a/maturin/PKGBUILD +++ b/maturin/PKGBUILD @@ -2,7 +2,7 @@ pkgbase=maturin pkgname=("python-maturin" "maturin") -pkgver=1.9.3 +pkgver=1.9.4 pkgrel=1 pkgdesc='Build and publish crates with pyo3, rust-cpython and cffi bindings' arch=('x86_64') @@ -28,7 +28,7 @@ source=("https://pypi.org/packages/source/${pkgbase::1}/${pkgbase}/${pkgbase}-${ "tar-rs-update-deps.patch" "getrandom-support-cygwin.patch" "https://patch-diff.githubusercontent.com/raw/bytecodealliance/target-lexicon/pull/121.patch") -sha256sums=('267ac8d0471d1ee2320b8b2ee36f400a32cd2492d7becbd0d976bd3503c2f69b' +sha256sums=('235163a0c99bc6f380fb8786c04fd14dcf6cd622ff295ea3de525015e6ac40cf' 'c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6' 'dc12939a1c9b9d391e0b7135f72fd30508b73450753e28341fed159317582a77' 'c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7' From 197389f0f5f875338d63fc97eaef8926788eb40b Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Mon, 27 Oct 2025 09:13:49 +0100 Subject: [PATCH 7/7] maturin: Update to 1.9.6 disable all features except cli-completion to make it build --- maturin/PKGBUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/maturin/PKGBUILD b/maturin/PKGBUILD index ced19311eda..787a05230b7 100644 --- a/maturin/PKGBUILD +++ b/maturin/PKGBUILD @@ -2,7 +2,7 @@ pkgbase=maturin pkgname=("python-maturin" "maturin") -pkgver=1.9.4 +pkgver=1.9.6 pkgrel=1 pkgdesc='Build and publish crates with pyo3, rust-cpython and cffi bindings' arch=('x86_64') @@ -28,7 +28,7 @@ source=("https://pypi.org/packages/source/${pkgbase::1}/${pkgbase}/${pkgbase}-${ "tar-rs-update-deps.patch" "getrandom-support-cygwin.patch" "https://patch-diff.githubusercontent.com/raw/bytecodealliance/target-lexicon/pull/121.patch") -sha256sums=('235163a0c99bc6f380fb8786c04fd14dcf6cd622ff295ea3de525015e6ac40cf' +sha256sums=('2c2ae37144811d365509889ed7220b0598487f1278c2441829c3abf56cc6324a' 'c65998313f8e17d0d553d28f91a0df93e4dbbbf770279c7bc21ca0f09ea1a1f6' 'dc12939a1c9b9d391e0b7135f72fd30508b73450753e28341fed159317582a77' 'c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7' @@ -64,7 +64,7 @@ END build() { cd "python-build" - export MATURIN_SETUP_ARGS="--features full" + export MATURIN_SETUP_ARGS="--no-default-features --features cli-completion,scaffolding" export OPENSSL_NO_VENDOR=1 python -m build --wheel --skip-dependency-check --no-isolation }