blob: 3bc5a66844dc2b9bf4f62aa4f98eacdf51222dc0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# Maintainer: Carl Smedstad <carl.smedstad at protonmail dot com>
# Contributor: András Wacha <awacha@gmail.com>
# Contributor: Michał Wojdyła < micwoj9292 at gmail dot com >
pkgname=python-xhtml2pdf
_pkgname=${pkgname#python-}
pkgver=0.2.16
pkgrel=1
pkgdesc="A library for converting HTML into PDFs using ReportLab"
arch=(any)
url="https://github.com/xhtml2pdf/xhtml2pdf"
license=(Apache-2.0)
depends=(
python
python-arabic-reshaper
python-asn1crypto
python-bidi
python-html5lib
python-pillow
python-pyhanko
python-pyhanko-certvalidator
python-pypdf
python-reportlab
python-svglib
python-typing_extensions
)
makedepends=(
python-build
python-installer
python-setuptools
python-wheel
# Documentation
python-sphinx_rtd_theme
python-sphinxcontrib-pdfembed
texlive-fontsextra
texlive-latexextra
)
checkdepends=(python-nose)
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('c031b662d3f999e18f384e8d606be84a8a1e516d8380a87b3bd9fd2446a1e754')
_archive="$_pkgname-$pkgver"
build() {
cd "$_archive"
python -m build --wheel --no-isolation
export PYTHONPATH=$PWD/docs/source:$PWD
make -C docs html man
}
check() {
cd "$_archive"
nosetests
}
package() {
cd "$_archive"
python -m installer --destdir="$pkgdir" dist/*.whl
install -dm755 "$pkgdir/usr/share/doc/$pkgname"
cp -a -t "$pkgdir/usr/share/doc/$pkgname" docs/build/html
install -Dm644 -t "$pkgdir/usr/share/man/man1" docs/build/man/xhtml2pdf.1
}
|