summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaleb Maclennan2021-08-06 11:34:20 +0300
committerCaleb Maclennan2021-08-06 11:34:20 +0300
commit23aae35cd25da575a880ac1ba3bdef19c60d2060 (patch)
tree98f4e59bdd17d8880a49509473d6f3409a1aaaf4
parent79ba457d182d95ca679eaf71cc3ae4c233152cc3 (diff)
downloadaur-23aae35cd25da575a880ac1ba3bdef19c60d2060.tar.gz
upgpkg: python-weasyprint 53.0-1
upstream release
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD29
2 files changed, 33 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c1783f57a35..49c851cd73c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -5,7 +5,12 @@ pkgbase = python-weasyprint
url = http://weasyprint.org
arch = any
license = BSD
- makedepends = python-pytest-runner
+ checkdepends = python-coverage
+ checkdepends = python-pytest
+ checkdepends = python-pytest-cov
+ checkdepends = python-pytest-flake8
+ checkdepends = python-pytest-isort
+ checkdepends = python-toml
makedepends = python-setuptools
depends = pango
depends = python
@@ -19,6 +24,7 @@ pkgbase = python-weasyprint
depends = python-pyphen
depends = python-tinycss2
depends = python-zopfli
+ depends = ttf-font
source = https://files.pythonhosted.org/packages/source/w/weasyprint/weasyprint-53.0.tar.gz
sha256sums = 21ea1626e15ae4070f3eb4ffc90e5fd65bf17650f912affa911f829fb7c0e112
diff --git a/PKGBUILD b/PKGBUILD
index 495cdae107f..d1b5ae95202 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -21,19 +21,42 @@ _py_deps=(brotli # for fonttools[woff]
zopfli) # for fonttools[woff]
depends=(pango
python
- "${_py_deps[@]/#/python-}")
-makedepends=(python-pytest-runner
- python-setuptools)
+ "${_py_deps[@]/#/python-}"
+ ttf-font)
+makedepends=(python-setuptools)
+_py_check_deps=(coverage
+ pytest
+ pytest-cov
+ pytest-flake8
+ pytest-isort
+ toml) # for coverage[toml
+checkdepends=("${_py_check_deps[@]/#/python-}")
_archive="$_pypi_name-$pkgver"
source=("https://files.pythonhosted.org/packages/source/${_pypi_name::1}/$_pypi_name/$_archive.tar.gz")
sha256sums=('21ea1626e15ae4070f3eb4ffc90e5fd65bf17650f912affa911f829fb7c0e112')
+prepare() {
+ cd "$_archive"
+ # Flit produces broken setup.py scripts that pretend distutils is setuptools
+ # Upstream Issue: https://github.com/Kozea/WeasyPrint/issues/1410
+ sed -i -e 's/distutils.core/setuptools/' setup.py
+}
+
build() {
cd "$_archive"
export PYTHONHASHSEED=0
+ python setup.py build_ext
python setup.py build
}
+check() {
+ cd "$_archive"
+ # Test suite results: 303 failed, 1309 passed, 29 xfailed, 479 warnings
+ # For now I'm giving this a pass because I think some of it is font metric
+ # related, and perhaps some to do with SVG rendering pixel differences.
+ PYTHONPATH=. pytest tests ||:
+}
+
package() {
cd "$_archive"
python setup.py install --root="$pkgdir" --optimize=1 --skip-build