1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-12 18:59:50 +03:00

testing/py3-rst2pdf: new aport

https://rst2pdf.org
Use a text editor. Make a PDF.
This commit is contained in:
Marian Buschsieweke 2025-06-08 14:26:46 +02:00 committed by omni
parent 3bd9c11fe8
commit cd94c1c53b

View file

@ -0,0 +1,73 @@
# Maintainer: Marian Buschsieweke <marian.buschsieweke@posteo.net>
pkgname=py3-rst2pdf
_pkgname=rst2pdf
pkgver=0.102
pkgrel=0
pkgdesc="Use a text editor. Make a PDF."
url="https://rst2pdf.org"
# ppc64le, s390x: limited by py3-pymupdf
# x86: limited by py3-svglib
arch="noarch !ppc64le !s390x !x86"
license="MIT"
depends="
py3-docutils
py3-importlib-metadata
py3-jinja2
py3-matplotlib
py3-pygments
py3-reportlab
py3-sphinx
py3-svglib
py3-yaml
smartypants
"
makedepends="
py3-gpep517
py3-setuptools
py3-setuptools_scm
py3-wheel
"
checkdepends="
py3-flake8
py3-pymupdf
py3-pytest
"
subpackages="$pkgname-pyc"
source="
$pkgname-$pkgver.tar.gz::https://github.com/rst2pdf/rst2pdf/archive/refs/tags/$pkgver.tar.gz
"
builddir="$srcdir"/$_pkgname-$pkgver
build() {
SETUPTOOLS_SCM_PRETEND_VERSION="$pkgver" \
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
local pythonpath
pythonpath="$(.testenv/bin/python3 -c 'import site; print(site.getsitepackages()[0])')"
pythonpath="$pythonpath:$(python3 -c 'import site; print(site.getsitepackages()[0])')"
export PYTHONPATH="$pythonpath"
echo "PYTHONPATH=$PYTHONPATH"
PATH="$PATH:$builddir/.testenv/bin" \
.testenv/bin/python3 -m pytest \
--deselect tests/input/test_aafigure.rst::test_aafigure \
--deselect tests/input/test_aafigure_extra.rst::test_aafigure_extra \
--deselect tests/input/test_blockquotes_in_table.rst::test_blockquotes_in_table \
--deselect tests/input/test_jpg_scaling.rst::test_jpg_scaling \
--deselect tests/input/test_raw_html.rst::test_raw_html
}
package() {
python3 -m installer --destdir "$pkgdir" \
.dist/*.whl
}
sha512sums="
39b6e280741ee58a36e34328a11edf26644b470cefc270b0fc6a50cdf20fb15bb068aa52c5e8da2a58e06085ecbaf730c00b58db4bcc42c2682cf0efb6f5c7be py3-rst2pdf-0.102.tar.gz
"