mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-06-08 01:44:40 +02:00
Switch to gpep517 and fix check failure due to removed `setup.py test` command, which was deprecated in setuptools 72.0.0. ``` usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help error: invalid command 'test' ``` Ref: https://gitlab.alpinelinux.org/alpine/aports/-/issues/17110
39 lines
1.2 KiB
Text
39 lines
1.2 KiB
Text
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
|
|
# Maintainer: Roberto Oliveira <robertoguimaraes8@gmail.com>
|
|
pkgname=py3-parsedatetime
|
|
pkgver=2.6
|
|
pkgrel=7
|
|
pkgdesc="Parse human-readable date/time strings"
|
|
url="https://github.com/bear/parsedatetime"
|
|
arch="noarch"
|
|
license="Apache-2.0"
|
|
depends="py3-future"
|
|
makedepends="py3-gpep517 py3-setuptools py3-wheel"
|
|
checkdepends="py3-pytest"
|
|
subpackages="$pkgname-pyc"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/bear/parsedatetime/archive/v$pkgver.tar.gz"
|
|
builddir="$srcdir/parsedatetime-$pkgver"
|
|
|
|
replaces=py-parsedatetime # Backwards compatibility
|
|
provides=py-parsedatetime=$pkgver-r$pkgrel # Backwards compatibility
|
|
|
|
build() {
|
|
gpep517 build-wheel \
|
|
--wheel-dir .dist \
|
|
--output-fd 3 3>&1 >&2
|
|
}
|
|
|
|
check() {
|
|
python3 -m venv --clear --without-pip --system-site-packages .testenv
|
|
.testenv/bin/python3 -m installer .dist/*.whl
|
|
.testenv/bin/python3 -m unittest -v tests/*.py
|
|
}
|
|
|
|
package() {
|
|
python3 -m installer -d "$pkgdir" \
|
|
.dist/*.whl
|
|
}
|
|
|
|
sha512sums="
|
|
ed7649feb8773fdb33d609ef0abe4d20f555744bd70e9766aba6b9a79d8415c7e2efea1d7ef5c6b5906f3bc90bff124ef92992ce17d83fe70575da2db918e543 py3-parsedatetime-2.6.tar.gz
|
|
"
|