python-hightime: new package
This commit is contained in:
committed by
Biswapriyo Nath
parent
93ffcd7673
commit
feeede1b3e
45
mingw-w64-python-hightime/PKGBUILD
Normal file
45
mingw-w64-python-hightime/PKGBUILD
Normal file
@@ -0,0 +1,45 @@
|
||||
# Maintainer: fsagbuya <fa@m-labs.ph>
|
||||
|
||||
_realname=hightime
|
||||
pkgbase=mingw-w64-python-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-python-${_realname}")
|
||||
pkgver=0.2.2
|
||||
pkgrel=1
|
||||
pkgdesc="Hightime allows for up to yoctosecond precision replacements for the datetime datetime and timedelta types (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
url="https://github.com/ni/hightime"
|
||||
msys2_references=(
|
||||
'pypi: hightime'
|
||||
)
|
||||
license=('spdx:MIT')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-python-build"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-installer"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-setuptools")
|
||||
checkdepends=("${MINGW_PACKAGE_PREFIX}-python-pytest")
|
||||
options=('!strip')
|
||||
source=("${_realname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
|
||||
sha256sums=('058996409f78c58d603188138ab17b800fa9e6ae600bfb18f0ed9727f0447660')
|
||||
|
||||
build() {
|
||||
cp -r "${_realname}-${pkgver}" "python-build-${MSYSTEM}" && cd "python-build-${MSYSTEM}"
|
||||
|
||||
python -m build --wheel --skip-dependency-check --no-isolation
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "python-build-${MSYSTEM}"
|
||||
|
||||
python -m pytest tests || warning "Tests failed"
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "python-build-${MSYSTEM}"
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=" \
|
||||
python -m installer --prefix=${MINGW_PREFIX} \
|
||||
--destdir="${pkgdir}" dist/*.whl
|
||||
|
||||
install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
|
||||
}
|
||||
Reference in New Issue
Block a user