void-packages/srcpkgs/python3-tempora/template

27 lines
960 B
Bash

# Template file for 'python3-tempora'
pkgname=python3-tempora
version=5.2.1
revision=2
build_style=python3-pep517
hostmakedepends="python3-wheel python3-setuptools_scm"
depends="python3-pytz python3-jaraco.functools"
checkdepends="python3-pytest python3-freezegun $depends"
short_desc="Objects and routines pertaining to date and time (Python3)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://github.com/jaraco/tempora"
changelog="https://raw.githubusercontent.com/jaraco/tempora/main/CHANGES.rst"
distfiles="${PYPI_SITE}/t/tempora/tempora-${version}.tar.gz"
checksum=b7176486c5948a75201e8d0b21ef2c23ca808474060df47218c92295bdce5276
alternatives="tempora:calc-prorate:/usr/bin/calc-prorate3"
do_check() {
# Test relies on pytest-freezegun, which is not packaged
python3 -m pytest -k 'not get_nearest_year_for_day'
}
post_install() {
vlicense LICENSE
mv "${DESTDIR}/usr/bin/calc-prorate" "${DESTDIR}/usr/bin/calc-prorate3"
}