PSA: Like most of the PKGBUILDs that I (co-)maintain, I host prebuilt packages for this in my user repository and all its dependencies for those who wish to install it using pacman
without messing around with building from the AUR. Issues or contributions are welcome either in comments below or via this GitHub repository.
Search Criteria
Package Details: python-compreffor 0.5.6-1
Package Actions
Git Clone URL: | https://aur.archlinux.org/python-compreffor.git (read-only, click to copy) |
---|---|
Package Base: | python-compreffor |
Description: | A CFF table suroutinizer for FontTools |
Upstream URL: | https://github.com/googlefonts/compreffor |
Licenses: | Apache-2.0 |
Submitter: | thrasibule |
Maintainer: | thrasibule (alerque) |
Last Packager: | alerque |
Votes: | 3 |
Popularity: | 0.000003 |
First Submitted: | 2019-08-18 01:21 (UTC) |
Last Updated: | 2024-10-21 10:00 (UTC) |
Dependencies (9)
- python (python37AUR, python311AUR, python310AUR)
- python-fonttools (python-fonttools-gitAUR)
- cython (cython-gitAUR, cython0AUR) (make)
- python-build (make)
- python-installer (python-installer-gitAUR) (make)
- python-setuptools-git-ls-filesAUR (python-setuptools-git-ls-files-gitAUR) (make)
- python-setuptools-scm (make)
- python-wheel (make)
- python-pytest (check)
Required by (10)
- otf-fira-code-git (make)
- python-fontmake (check)
- python-fontmake-git (check)
- python-pysilfont
- python-pysilfont-git
- python-ufo2ft (check)
- python-ufo2ft (optional)
- python-ufo2ft-git
- trufont
- trufont-git
Sources (1)
Latest Comments
alerque commented on 2021-08-03 19:58 (UTC)
alerque commented on 2021-07-21 09:57 (UTC)
Thanks for fixing the deps and some of the other things I mentioned. I can confirm this now builds in a clean chroot. In the future please bump the pkgrel
value when changing anything about the build that affects the package registry such as changing dependencies. This still needs a bump for that reason.
In this case it's not a huge deal because it doesn't actually break, but removing python
from the dependencies was a mistake. Please see here for where Arch guidelines emphatically say to not rely on transitive dependencies. Just think if every python library assumed python
, eventually they would all break. This only works because python-fonttools
has not made this mistake and hence this package works. Not that it's likely to change, but on general principle following the guidelines is a good idea. That was a step away from them.
As you review the guidelines please still consider adding me as a co-maintainer. If the things I'm suggesting are not good for end users and not following the guidelines that's one thing, but if what I'm pointing out is making better packages for everybody why not add me?
alerque commented on 2021-07-19 16:24 (UTC)
Per previous discussion, here are two incremental packages needed to bring this up to even minimal Arch packaging requirements. This package does not build before these patches, and it does with them. There are more things mentioned in the Arch Python package guidelines that are not correct yet, but this is an essential start to even get a working build.
Please apply each with git am < file.patch
:
From 13ec35097988bd3ba13c4a59609da0bbb4c9d176 Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <caleb@alerque.com>
Date: Mon, 19 Jul 2021 19:20:05 +0300
Subject: [PATCH 1/2] Split build/package functions
See https://wiki.archlinux.org/title/Python_package_guidelines#distutils
Signed-off-by: Caleb Maclennan <caleb@alerque.com>
---
PKGBUILD | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/PKGBUILD b/PKGBUILD
index 3493fbb..fe8eae2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -14,6 +14,11 @@ arch=('x86_64')
source=("https://pypi.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.zip")
sha256sums=('b804999e0c256094e28a9cbb9306f6031b7cf6884bbb98fd44ad70eed6c4c2fd')
+build() {
+ cd "$_pkgname-$pkgver"
+ python setup.py build
+}
+
check() {
cd "$srcdir/$_pkgname-$pkgver"
python setup.py test
@@ -21,5 +26,5 @@ check() {
package() {
cd "${srcdir}/${_pkgname}-${pkgver}"
- python setup.py install --root="${pkgdir}" --optimize=1
+ python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
}
--
2.32.0
From a15180b7a037f5cc660f6fab7e5bee48e665b33c Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <caleb@alerque.com>
Date: Mon, 19 Jul 2021 19:21:40 +0300
Subject: [PATCH 2/2] Fix missing checkdepends
Signed-off-by: Caleb Maclennan <caleb@alerque.com>
---
.SRCINFO | 4 ++--
PKGBUILD | 6 ++++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/.SRCINFO b/.SRCINFO
index b54aa9b..0a20669 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,10 +1,11 @@
pkgbase = python-compreffor
pkgdesc = A CFF table suroutinizer for FontTools.
pkgver = 0.5.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/googlefonts/compreffor
arch = x86_64
license = Apache
+ checkdepends = python-pytest-runner
makedepends = cython
makedepends = python-setuptools
depends = python
@@ -13,4 +14,3 @@ pkgbase = python-compreffor
sha256sums = b804999e0c256094e28a9cbb9306f6031b7cf6884bbb98fd44ad70eed6c4c2fd
pkgname = python-compreffor
-
diff --git a/PKGBUILD b/PKGBUILD
index fe8eae2..8447d7e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,11 +1,13 @@
# Maintainer: Guillaume Horel <guillaume.horel@gmail.com>
+# Contributor: Caleb Maclennan <caleb@alerque.com>
+
pkgname='python-compreffor'
_pkgname='compreffor'
pkgver='0.5.0'
-pkgrel=1
+pkgrel=2
pkgdesc="A CFF table suroutinizer for FontTools."
url="https://github.com/googlefonts/compreffor"
-checkdepends=()
+checkdepends=('python-pytest-runner')
depends=('python' 'python-fonttools')
makedepends=('cython' 'python-setuptools')
optdepends=()
--
2.32.0
alerque commented on 2020-03-26 08:09 (UTC)
Similar to the patch I just sent for python-skia-pathops, this uses a more stable download URL, splits the build() and package() phases and makes a few other touchups inline with the general and python specific Arch package guidelines. Please consider applying the following using git am
:
From 9f4547dd6fc1c3f4e9a612b3eb2bfcd8b0e95a86 Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <caleb@alerque.com>
Date: Thu, 26 Mar 2020 11:05:10 +0300
Subject: [PATCH] Use stable URL, split build() and package(), cleanup per
guidelines
Signed-off-by: Caleb Maclennan <caleb@alerque.com>
---
.SRCINFO | 6 +++---
PKGBUILD | 33 +++++++++++++++++++--------------
2 files changed, 22 insertions(+), 17 deletions(-)
diff --git a/.SRCINFO b/.SRCINFO
index b54aa9b..3d75053 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = python-compreffor
- pkgdesc = A CFF table suroutinizer for FontTools.
+ pkgdesc = A CFF table suroutinizer for FontTools
pkgver = 0.5.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/googlefonts/compreffor
arch = x86_64
license = Apache
@@ -9,7 +9,7 @@ pkgbase = python-compreffor
makedepends = python-setuptools
depends = python
depends = python-fonttools
- source = https://pypi.org/packages/source/c/compreffor/compreffor-0.5.0.zip
+ source = https://files.pythonhosted.org/packages/source/c/compreffor/compreffor-0.5.0.zip
sha256sums = b804999e0c256094e28a9cbb9306f6031b7cf6884bbb98fd44ad70eed6c4c2fd
pkgname = python-compreffor
diff --git a/PKGBUILD b/PKGBUILD
index 3493fbb..72f4f4d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,30 @@
# Maintainer: Guillaume Horel <guillaume.horel@gmail.com>
-pkgname='python-compreffor'
-_pkgname='compreffor'
-pkgver='0.5.0'
-pkgrel=1
-pkgdesc="A CFF table suroutinizer for FontTools."
-url="https://github.com/googlefonts/compreffor"
-checkdepends=()
+# Contributor: Caleb Maclennan <caleb@alerque.com>
+
+pkgname=python-compreffor
+_pkgname=${pkgname#python-}
+pkgver=0.5.0
+pkgrel=2
+pkgdesc='A CFF table suroutinizer for FontTools'
+arch=('x86_64')
+url="https://github.com/googlefonts/$_pkgname"
+license=('Apache')
depends=('python' 'python-fonttools')
makedepends=('cython' 'python-setuptools')
-optdepends=()
-license=('Apache')
-arch=('x86_64')
-source=("https://pypi.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.zip")
+source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.zip")
sha256sums=('b804999e0c256094e28a9cbb9306f6031b7cf6884bbb98fd44ad70eed6c4c2fd')
+build() {
+ cd "$_pkgname-$pkgver"
+ python setup.py build
+}
+
check() {
- cd "$srcdir/$_pkgname-$pkgver"
+ cd "$_pkgname-$pkgver"
python setup.py test
}
package() {
- cd "${srcdir}/${_pkgname}-${pkgver}"
- python setup.py install --root="${pkgdir}" --optimize=1
+ cd "$_pkgname-$pkgver"
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
}
--
2.26.0
Pinned Comments
alerque commented on 2021-08-03 19:58 (UTC)
PSA: Like most of the PKGBUILDs that I (co-)maintain, I host prebuilt packages for this in my user repository and all its dependencies for those who wish to install it using
pacman
without messing around with building from the AUR. Issues or contributions are welcome either in comments below or via this GitHub repository.