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.
46 lines
1.5 KiB
Bash
46 lines
1.5 KiB
Bash
# Maintainer: ???
|
|
|
|
_pyname=func_timeout
|
|
_realname=func-timeout
|
|
pkgbase=mingw-w64-python-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
|
pkgver=4.3.5
|
|
pkgrel=5
|
|
pkgdesc='Python module which allows you to specify timeouts when calling any existing function, and support for stoppable threads (mingw-w64)'
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url="https://github.com/kata198/func_timeout"
|
|
msys2_references=(
|
|
'purl: pkg:pypi/func-timeout'
|
|
)
|
|
license=('spdx:MIT')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-python")
|
|
makedepends=(
|
|
"${MINGW_PACKAGE_PREFIX}-python-build"
|
|
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
|
"${MINGW_PACKAGE_PREFIX}-python-setuptools-scm"
|
|
)
|
|
source=("https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
|
|
sha256sums=('74cd3c428ec94f4edfba81f9b2f14904846d5ffccc27c92433b8b5939b5575dd')
|
|
|
|
prepare() {
|
|
cd "$srcdir"/"${_pyname}-${pkgver}"
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=${pkgver}
|
|
}
|
|
|
|
build() {
|
|
cp -r "${_pyname}-${pkgver}" "python-build-${MSYSTEM}" && cd "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 "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
|
|
}
|