diff --git a/python-cairo/PKGBUILD b/python-cairo/PKGBUILD new file mode 100644 index 0000000..ba0e62e --- /dev/null +++ b/python-cairo/PKGBUILD @@ -0,0 +1,51 @@ +#!/usr/bin/bash +# JOBoRun : Jwm OpenBox Obarun RUNit +# Maintainer : Joe Bo Run +# PkgSource : url="https://gittea.disroot.org/joborun-pkg/jobextra/$pkgname" +# Website : https://pozol.eu +#-----------------------------------------| DESCRIPTION |--------------------------------------- + +pkgname=python-cairo +pkgver=1.21.0 +pkgrel=01 +pkgdesc="Python bindings for the cairo graphics library" +arch=('x86_64') +url="https://pycairo.readthedocs.io/en/latest/" +depends=(cairo python) +makedepends=(git python-setuptools) +_commit=7f7869f4139dbcc84a6f688a321516cb25cea1b0 # tags/v1.21.0 + +#source=(https://github.com/pygobject/pycairo/releases/download/v$pkgver/pycairo-$pkgver.tar.gz{,.sig}) +source=("git+https://github.com/pygobject/pycairo/#commit=$_commit") + +pkgver() { + cd pycairo + git describe --tags | sed 's/^v//;s/-/+/g' +} + +build() { + cd pycairo + python setup.py build +} + +#check() { +# cd pycairo-$pkgver +# python setup.py test +#} + +package() { + cd pycairo + python setup.py install --skip-build --root="$pkgdir" --optimize='1' +} + +#---- license gpg-key sha256sums ---- + +license=('LGPL2.1' 'MPL') + +validpgpkeys=(0EBF782C5D53F7E5FB02A66746BD761F7A49B0EC) # 46BD761F7A49B0EC: "Christoph Reiter + +#sha256sums=(251907f18a552df938aa3386657ff4b5a4937dde70e11aa042bc297957f4b74b # pycairo-1.21.0.tar.gz +# 85a49d1e1fc29d3f57698bf3acafbaa2c4327dbe4de221de9b1686a83e695593) # pycairo-1.21.0.tar.gz.sig + +sha256sums=('SKIP') + diff --git a/python-cairo/PKGBUILD-arch b/python-cairo/PKGBUILD-arch new file mode 100644 index 0000000..8b01b36 --- /dev/null +++ b/python-cairo/PKGBUILD-arch @@ -0,0 +1,32 @@ +# Maintainer: Angel Velasquez +# Maintainer: Jan de Groot + +pkgname=python-cairo +pkgver=1.21.0 +pkgrel=1 +pkgdesc="Python bindings for the cairo graphics library" +arch=('x86_64') +url="https://pycairo.readthedocs.io/en/latest/" +license=('LGPL2.1' 'MPL') +depends=(cairo python) +makedepends=(python-setuptools) +checkdepends=(python-pytest) +source=(https://github.com/pygobject/pycairo/releases/download/v$pkgver/pycairo-$pkgver.tar.gz{,.sig}) +sha256sums=('251907f18a552df938aa3386657ff4b5a4937dde70e11aa042bc297957f4b74b' + 'SKIP') +validpgpkeys=(0EBF782C5D53F7E5FB02A66746BD761F7A49B0EC) # Christoph Reiter + +build() { + cd pycairo-$pkgver + python setup.py build +} + +check() { + cd pycairo-$pkgver + python setup.py test +} + +package() { + cd pycairo-$pkgver + python setup.py install --root="$pkgdir" --skip-build --optimize=1 +} diff --git a/python-cairo/clean b/python-cairo/clean new file mode 100644 index 0000000..de000cb --- /dev/null +++ b/python-cairo/clean @@ -0,0 +1 @@ +rm -rf {src,pkg,*.tar.gz*,pycairo} diff --git a/python-cairo/deps b/python-cairo/deps new file mode 100644 index 0000000..6571a7b --- /dev/null +++ b/python-cairo/deps @@ -0,0 +1,5 @@ +cairo +python +python-setuptools +python-pytest +git diff --git a/python-cairo/key b/python-cairo/key new file mode 100644 index 0000000..87892a9 --- /dev/null +++ b/python-cairo/key @@ -0,0 +1 @@ +gpg --recv-keys 46BD761F7A49B0EC diff --git a/python-cairo/note b/python-cairo/note new file mode 100644 index 0000000..363fcbb --- /dev/null +++ b/python-cairo/note @@ -0,0 +1,19 @@ +_____________________________________ test_svg_surface_get_document_unit _____________________________________ + + @pytest.mark.skipif(not hasattr(cairo.SVGSurface, get_document_unit), + reason=too old cairo) + def test_svg_surface_get_document_unit(): + with cairo.SVGSurface(None, 10, 10) as surface: +> assert surface.get_document_unit() == cairo.SVGUnit.PT +E AssertionError: assert cairo.SVGUnit.USER == cairo.SVGUnit.PT +E + where cairo.SVGUnit.USER = () +E + where = .get_document_unit +E + and cairo.SVGUnit.PT = .PT +E + where = cairo.SVGUnit + +tests/test_surface.py:270: AssertionError +========================================== short test summary info =========================================== +FAILED tests/test_surface.py::test_svg_surface_get_document_unit - AssertionError: assert cairo.SVGUnit.USE... +================================== 1 failed, 261 passed, 3 skipped in 0.41s ================================== + +With 1 failing test indicating too-old-cairo how is Arch building it with the tests? diff --git a/python-cairo/time b/python-cairo/time new file mode 100644 index 0000000..687ce27 --- /dev/null +++ b/python-cairo/time @@ -0,0 +1,5 @@ + +real 0m10.554s +user 0m9.382s +sys 0m0.623s +