Add PyPUG package

master
LEdoian 2 years ago
parent 1ad3ce18ee
commit 5801aea50b

@ -0,0 +1,46 @@
# Maintainer: LEdoian <pypkg@pokemon.ledoian.cz>
pkgname=python-packaging-doc-git
# This is just a placeholder, real version is assigned in the pkgver function.
pkgver=0.0.1
pkgrel=1
pkgdesc="Python Packaging User Guide (PyPUG, a.k.a. packaging.python.org) for offline use"
arch=('any')
url="https://packaging.python.org"
license=('CC BY-SA 3.0')
groups=()
depends=()
makedepends=('git' 'python-nox')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=()
backup=()
options=()
source=('python-packaging-doc::git+https://github.com/pypa/packaging.python.org#branch=main')
noextract=()
md5sums=('SKIP')
pkgver() {
cd "$srcdir/${pkgname%-git}"
printf "r%s.g%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cd "$srcdir/${pkgname%-git}"
nox -s build
}
check() {
cd "$srcdir/${pkgname%-git}"
# We could run `nox -s linkcheck` here, but that takes quite a long time
# and checks also links out, which is not too interesting. Also, since many
# links point to github.com, we get rate-limited.
# Uncomment if you wish.
#nox -s linkcheck
}
package() {
cd "$srcdir/${pkgname%-git}"
mkdir -p "$pkgdir/usr/share/doc"
cp -r build "$pkgdir/usr/share/doc/${pkgname%-git}"
chmod a+rX "$pkgdir/usr/share/doc/${pkgname%-git}"
}
Loading…
Cancel
Save