Files
MINGW-packages/mingw-w64-python-setuptools-rust/PKGBUILD
Christoph Reiter 0c6a93b936 Python 3.12 rebuilds
2024-11-03 19:29:19 +01:00

47 lines
1.6 KiB
Bash

# Maintainer: Christoph Reiter <reiter.christoph@gmail.com>
_realname=setuptools-rust
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=1.10.2
pkgrel=2
pkgdesc="Compile and distribute Python extensions written in rust as easily as if they were written in C (mingw-w64)"
url='https://github.com/PyO3/setuptools-rust'
msys2_references=(
'archlinux: python-setuptools-rust'
'pypi: setuptools-rust'
)
license=('spdx:MIT')
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
depends=("${MINGW_PACKAGE_PREFIX}-rust"
"${MINGW_PACKAGE_PREFIX}-python-semantic-version"
"${MINGW_PACKAGE_PREFIX}-python-setuptools")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-setuptools-scm")
source=("https://pypi.org/packages/source/${_realname::1}/${_realname/-/_}/${_realname/-/_}-${pkgver}.tar.gz")
sha256sums=('5d73e7eee5f87a6417285b617c97088a7c20d1a70fcea60e3bdc94ff567c29dc')
prepare() {
cp -r "${_realname/-/_}-${pkgver}" "python-build-${MSYSTEM}"
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
}
build() {
cd "python-build-${MSYSTEM}"
python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
cd "python-build-${MSYSTEM}"
MSYS2_ARG_CONV_EXCL="--prefix=" \
python -m installer --prefix=${MINGW_PREFIX} \
--destdir="${pkgdir}" dist/*.whl
install -Dm644 "${srcdir}/${_realname/-/_}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}