This allows us to include a version and we already use PURL for other things, so might as well remove the pypi special case. Normalize the names, since that is required for PURLs.
43 lines
1.4 KiB
Bash
43 lines
1.4 KiB
Bash
# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.pro>
|
|
|
|
_realname=python-multipart
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=0.0.20
|
|
pkgrel=1
|
|
pkgdesc='A streaming multipart parser for Python (mingw-w64)'
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url='https://github.com/Kludex/python-multipart'
|
|
msys2_references=(
|
|
'purl: pkg:pypi/python-multipart'
|
|
)
|
|
license=('spdx:Apache-2.0')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-hatchling")
|
|
source=("https://pypi.org/packages/source/${_realname::1}/${_realname}/${_realname/-/_}-${pkgver}.tar.gz")
|
|
sha256sums=('8dd0cab45b8e23064ae09147625994d090fa46f5b0d1e13af944c331a7fa9d13')
|
|
|
|
prepare() {
|
|
cp -r "${_realname/-/_}-${pkgver}" "python-build-${MSYSTEM}"
|
|
}
|
|
|
|
build() {
|
|
msg "Python build for ${MSYSTEM}"
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
|
|
${MINGW_PREFIX}/bin/python -m build --wheel --skip-dependency-check --no-isolation
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/python-build-${MSYSTEM}"
|
|
|
|
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
|
"${MINGW_PREFIX}"/bin/python -m installer --prefix=${MINGW_PREFIX} \
|
|
--destdir="${pkgdir}" dist/*.whl
|
|
|
|
install -Dm644 LICENSE.txt "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE.txt"
|
|
}
|