Package Details: python-skia 87.5-1

Git Clone URL: https://aur.archlinux.org/python-skia.git (read-only, click to copy)
Package Base: python-skia
Description: Python binding to Skia Graphics Library (wheel)
Upstream URL: https://github.com/kyamagu/skia-python
Licenses: BSD
Submitter: alerque
Maintainer: alerque
Last Packager: alerque
Votes: 1
Popularity: 0.000000
First Submitted: 2020-10-02 11:28 (UTC)
Last Updated: 2024-03-28 10:17 (UTC)

Latest Comments

alerque commented on 2022-01-20 16:46 (UTC)

@fbrennan Don't get me wrong I see why the _py=$(pacman -Q python ...) hack is useful, but there are a couple of reasons it shouldn't be in this PKGBUILD by default. It runs afoul of both some Arch packaging guidelines and the way some AUR package helpers handle downloads vs. build environments. Fetching the upstream URL should not require the dependencies on the host system, and querying the host system for versions might run amuck when building in a chroot.

If it's a regular problem I can stick that code in the PKGBUILD in a comment for others to use when need arises. If we get into another dry spell again where upstream is behind locking to an old Python build is certainly an option too, although I think it would require patching to do properly so it could co-exist on a system with more than one python.

fbrennan commented on 2022-01-19 16:08 (UTC)

Here's a python39-skia:

# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Hacker: Fredrick Brennan <copypaste@kittens.ph>

_pyrel=39
pkgname=python$_pyrel-skia
_pkgname=skia-python
pkgver=87.2
pkgrel=2
pkgdesc='Python binding to Skia Graphics Library (wheel)'
arch=(x86_64)
url="https://github.com/kyamagu/$_pkgname"
license=(BSD)
depends=(fontconfig opengl-driver python39)
#makedepends=(python-pip)
options=(!strip)
_py=cp$_pyrel
_wheel="${_pkgname/-/_}-$pkgver-$_py-$_py-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
source=("https://files.pythonhosted.org/packages/$_py/${_pkgname::1}/$_pkgname/$_wheel")
sha256sums=('abaa3c78850ed310a4a6b93ecd3e7b9276cd9a170defbaa6da896a2dcd1b642f')

# If anybody wants to muck around with the Chromium tree and figure out how to
# build skia from source on Arch I'm open to patches, but even after mucking
# around with ninja and Python2 and various patched bulid toolchains I have
# come up short of a way to build this against Arch packages. Drop a comment on
# the AUR page if you have ideas.

package() {
    export PIP_CONFIG_FILE=/dev/null
    warning "Using Python3.9!"
    warning 'The Python3.9 installation you use will need numpy installed separately e.g. `pip3.9 install --user numpy`!'
    python3.9 -m ensurepip
    pip3.9 install --isolated --root="$pkgdir" --ignore-installed --no-deps $_wheel
    python3.9 -O -m compileall "$pkgdir"
}

fbrennan commented on 2022-01-19 15:50 (UTC)

Non-functional package due to https://github.com/kyamagu/skia-python/issues/170.

When that is fixed, this package will still be non-functional without this patch:

diff --git a/PKGBUILD b/PKGBUILD
index a43a498..d2428a1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,7 +11,7 @@ license=(BSD)
 depends=(fontconfig opengl-driver python)
 makedepends=(python-pip)
 options=(!strip)
-_py=cp39
+_py=$(pacman -Q python|awk '{print $2}'|sed -e 's/\([0-9]\)\.\([0-9]\+\).*/cp\1\2/')
 _wheel="${_pkgname/-/_}-$pkgver-$_py-$_py-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
 source=("https://files.pythonhosted.org/packages/$_py/${_pkgname::1}/$_pkgname/$_wheel")
 sha256sums=('abaa3c78850ed310a4a6b93ecd3e7b9276cd9a170defbaa6da896a2dcd1b642f')