Files
MINGW-packages/mingw-w64-python-setuptools-rust/PKGBUILD
Christoph Reiter ad3a0c37e7 Python 3.10 rebuilds
2022-06-10 17:54:24 +02:00

42 lines
1.5 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.2.0
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'
license=('MIT')
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64')
depends=("${MINGW_PACKAGE_PREFIX}-rust"
"${MINGW_PACKAGE_PREFIX}-python-toml"
"${MINGW_PACKAGE_PREFIX}-python-semantic-version"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${MINGW_PACKAGE_PREFIX}-python-typing_extensions")
makedepends=("${MINGW_PACKAGE_PREFIX}-python-setuptools-scm"
"${MINGW_PACKAGE_PREFIX}-python-wheel")
source=("https://github.com/PyO3/setuptools-rust/archive/v$pkgver/$_realname-$pkgver.tar.gz")
sha256sums=('a47d72d3723d03c7f66c283e301bbbf4260c2a0e7f02cda30ac2b8f65e42720b')
prepare() {
cd "${srcdir}/${_realname}-$pkgver"
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
}
build() {
cd "${srcdir}/${_realname}-$pkgver"
${MINGW_PREFIX}/bin/python setup.py build
}
package() {
cd "${srcdir}/${_realname}-$pkgver"
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} --root="${pkgdir}" --optimize=1 --skip-build
install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}