Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions extra/python3-time-machine/APKBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Alpine-Contributor: Hoang Nguyen <[email protected]>
# Alpine-Contributor: Celeste <[email protected]>
# Maintainer: Ethan Leir <[email protected]>
pkgname=python3-time-machine
pkgver=2.16.0
pkgrel=0
pkgdesc="Python library for mocking the current time"
url="https://github.com/adamchainz/time-machine"
arch="all"
license="MIT"
depends="python3-dateutil"
makedepends="
python3-dev
python3-setuptools
python3-gpep517
python3-wheel
"
checkdepends="python3-pytest tzdata"
subpackages=""
source="$pkgname-$pkgver.tar.gz::https://github.com/adamchainz/time-machine/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/time-machine-$pkgver"

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 pytest
}

package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}

sha512sums="
19b764cccdff07056a7d42841da576d90037661a9f124e3fbab408bfa61dccf4b51b88a7e0741c87b03e7a8cc3306bb0ed32bd66588e45c9ab7e9d9cb5ba44ae python3-time-machine-2.16.0.tar.gz
"