python-setuptools-rust: update to 1.7.0

This commit is contained in:
Mehdi Chinoune
2023-09-06 06:15:12 +00:00
committed by مهدي شينون (Mehdi Chinoune)
parent 63288966c7
commit dc93c6f0dd

View File

@@ -3,39 +3,43 @@
_realname=setuptools-rust
pkgbase=mingw-w64-python-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
pkgver=1.6.0
pkgrel=2
pkgver=1.7.0
pkgrel=1
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')
license=('spdx:MIT')
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
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"
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
"${MINGW_PACKAGE_PREFIX}-python-installer"
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
"${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=('f6692cab380a00db8fedf3267280a76a809349ade24c60a2406a5dab78cd4b5b')
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname}-${pkgver}.tar.gz")
sha256sums=('c7100999948235a38ae7e555fe199aa66c253dc384b125f5d85473bf81eae3a3')
prepare() {
cd "${srcdir}/${_realname}-$pkgver"
cd "${srcdir}"
rm -rf "python-build-${MSYSTEM}" | true
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}"
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
}
build() {
cd "${srcdir}/${_realname}-$pkgver"
${MINGW_PREFIX}/bin/python setup.py build
cd "${srcdir}/python-build-${MSYSTEM}"
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
}
package() {
cd "${srcdir}/${_realname}-$pkgver"
cd "${srcdir}/python-build-${MSYSTEM}"
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
MSYS2_ARG_CONV_EXCL="--prefix=" \
${MINGW_PREFIX}/bin/python -m installer --prefix=${MINGW_PREFIX} \
--destdir="${pkgdir}" dist/*.whl
install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
}