summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCaleb Maclennan2021-06-09 23:44:36 +0300
committerCaleb Maclennan2021-06-09 23:51:27 +0300
commitdcba11e761b08bd58813fee4bf30359c555dd71e (patch)
treef41a162d8f70cc04152cdde287b1d5de51dcb042 /PKGBUILD
parent6b1db11346696889b9b2ac2ee430677a19e96a41 (diff)
downloadaur-dcba11e761b08bd58813fee4bf30359c555dd71e.tar.gz
Overhaul packaging per Python guidelines
* Drop bogus pip dependency, add the thing it was trying to use pip to fetch directly instead * Add missing setuptools dependency * Drop transient dependencies, use official upstream install_requires list as a guide for actual dependencies, confirm by chroot build * Drop unused string manipulations (that could be done easier with bash expansions anyway) * Use Arch recommended downloads for Python packages, official sdist instead of Git archive * Split build() from package() steps * Cleanup scripting
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD34
1 files changed, 18 insertions, 16 deletions
diff --git a/PKGBUILD b/PKGBUILD
index b684dcae1250..117b2cfffe06 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,24 +1,26 @@
# Maintainer: Florijan Hamzic <florijanh at gmail dot com>
-_pypi_name='WeasyPrint'
+# Maintainer: Caleb Maclennan <caleb@alerque.com>
+
+_pypi_name=WeasyPrint
+pkgname=python-${_pypi_name,,}
pkgver=52.5
-pkgrel=2
-pkgdesc="Converts web documents (HTML, CSS, SVG, ...) to PDF."
+pkgrel=3
+pkgdesc='Convert web documents (HTML, CSS, SVG, ...) to PDF'
license=('BSD')
arch=('any')
-url="http://weasyprint.org/"
-makedepends=('python' 'python-distribute' 'python-pip')
-depends=('python' 'pango>=1.29.3' 'gdk-pixbuf2>=2.25' 'cairo>=1.15.4'
- 'python-cairo' 'python-cairosvg'
- 'python-tinycss2' 'python-cssselect2>=0.1' 'python-html5lib'
- 'python-cffi' 'python-cairocffi' 'python-pyphen' 'python-xcffib')
-
-pkgname="python-weasyprint"
-_pypi_name_inital=$(echo ${_pypi_name}|cut -c1)
-source=("https://github.com/Kozea/WeasyPrint/archive/v${pkgver}.tar.gz")
-md5sums=('dae9e7b3d0d48312669050593d504e12')
+url='http://weasyprint.org'
+_py_deps=(cairo cairocffi cairosvg cffi cssselect2 html5lib pillow pyphen pytest-runner tinycss2)
+depends=(python "${_py_deps[@]/#/python-}")
+makedepends=(python-setuptools)
+source=("https://files.pythonhosted.org/packages/source/${_pypi_name::1}/$_pypi_name/$_pypi_name-$pkgver.tar.gz")
+sha256sums=('b37ea02d75ca04babd7becad7341426be332ae560d8f02d664bfa1e9afb18481')
+build() {
+ cd "$_pypi_name-$pkgver"
+ python setup.py build
+}
package() {
- cd "$srcdir/WeasyPrint-$pkgver"
- python3 setup.py install --root="$pkgdir/" --optimize=1
+ cd "$_pypi_name-$pkgver"
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}