void-packages/srcpkgs/python-tempora/template

41 lines
1.1 KiB
Bash

# Template file for 'python-tempora'
pkgname=python-tempora
version=1.14.1
revision=1
archs=noarch
wrksrc="tempora-${version}"
build_style=python-module
pycompile_module="tempora"
hostmakedepends="python-setuptools python3-setuptools"
depends="python-setuptools python-six python-pytz"
short_desc="Objects and routines pertaining to date and time (Python2)"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://github.com/jaraco/tempora"
distfiles="${PYPI_SITE}/t/tempora/tempora-${version}.tar.gz"
checksum=cb60b1d2b1664104e307f8e5269d7f4acdb077c82e35cd57246ae14a3427d2d6
alternatives="tempora:calc-prorate:/usr/bin/calc-prorate2"
pre_build() {
vsed -i setup.py \
-e '/setuptools_scm/d' \
-e "s|use_scm_version=True|version='${version}'|"
}
post_install() {
vlicense LICENSE
}
python3-tempora_package() {
archs=noarch
pycompile_module="tempora"
depends="python3-setuptools python3-six python3-pytz"
alternatives="tempora:calc-prorate:/usr/bin/calc-prorate3"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove usr/bin/*3
vmove usr/lib/python3*
vlicense LICENSE
}
}