Package Details: python-cffsubr 0.2.9.post1-1

Git Clone URL: https://aur.archlinux.org/python-cffsubr.git (read-only, click to copy)
Package Base: python-cffsubr
Description: Standalone CFF subroutinizer based on AFDKO tx
Upstream URL: https://github.com/adobe-type-tools/cffsubr
Licenses: Apache
Submitter: thrasibule
Maintainer: alerque (thrasibule)
Last Packager: alerque
Votes: 2
Popularity: 0.019262
First Submitted: 2020-06-14 01:38 (UTC)
Last Updated: 2021-12-15 21:10 (UTC)

Pinned Comments

alerque commented on 2021-08-03 10:42 (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.

Latest Comments

Rnek0 commented on 2021-08-10 20:44 (UTC) (edited on 2021-08-10 20:45 (UTC) by Rnek0)

Same result, I have :

❯ echo $LANG
C

I did as you said ( LANG=c makepkg ) and still the same. Even with makepkg -si for dependencys
I saw that you have tox.ini in the code, maybe see here at the bottom about check() :
https://wiki.archlinux.org/title/Python_package_guidelines

Maybe it's just me, yesterday I created a file "~/.config/locale.conf" to do some lang tests in Go. But it seems to be correct.

I have to leave you, thanks for your work.

alerque commented on 2021-08-10 20:02 (UTC)

@Rnek0 Thanks for the extra details. I just did some extra testing both in chroots and an empty Docker image and I'm almost 100% sure now this is going to turn out to be an upstream bug where the test suite is language dependent. Can you try running LANG=c makepkg from your clone and see if that builds?

Rnek0 commented on 2021-08-10 18:16 (UTC) (edited on 2021-08-10 18:16 (UTC) by Rnek0)

So only with makepkg after the git clone I have

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 7 errors during collection !!!!!!!!!!!!!!!!!!!!!!!
=============================================================== 1 skipped, 1 warning, 7 errors in 0.41s ============
==> ERREUR : Une erreur s’est produite dans check().
Abandon…

Rnek0 commented on 2021-08-10 18:03 (UTC) (edited on 2021-08-10 18:04 (UTC) by Rnek0)

I have this errors if I want install with paru (sorry I am in fr system): paru -S python-cffsubr

======================================================================= short test summary info ================
SKIPPED [1] ../../../../../../../../usr/lib/python3.9/site-packages/_pytest/doctest.py:535: unable to import module local('/home/rnek0/.local/lib/python3.9/site-packages/tests/test_factory.py')
ERROR test_console.py - File "/home/rnek0/.local/lib/python3.9/site-packages/asyncio/base_events.py", line 296
ERROR test_console.py
ERROR test_factory.py
ERROR test_utils.py - File "/home/rnek0/.local/lib/python3.9/site-packages/asyncio/base_events.py", line 296
ERROR test_utils.py
ERROR id3/test_frames.py - File "/home/rnek0/.local/lib/python3.9/site-packages/asyncio/base_events.py", line 296
ERROR id3/test_frames.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 7 errors during collection !!!!!!!!
=============================================================== 1 skipped, 1 warning, 7 errors in 0.41s ========
==> ERREUR : Une erreur s’est produite dans check().
Abandon…
erreur : échec de la compilation de 'python-cffsubr-0.2.8-3':
erreur : la compilation des paquets suivants a échouée : python-cffsubr-0.2.8-3

alerque commented on 2021-08-10 17:42 (UTC)

@Rnek0 I just re-verified that the tests run and pass just fine in a chroot environment with only the specified dependencies available. What specifically did you have trouble with when running the build with checks enabled?

Rnek0 commented on 2021-08-10 17:30 (UTC) (edited on 2021-08-10 17:31 (UTC) by Rnek0)

I think that your tests are not good. So: git clone https://aur.archlinux.org/python-cffsubr.git

paru -S python-setuptools-git-ls-files
paru -S python-setuptools-scm
paru -S python-fonttools
paru -S python-pytest

makepkg --nocheck

sudo pacman -U python-cffsubr-0.2.8-3-x86_64.pkg.tar.zst

It seems to do it, what do you think? Is it a good alternative or am I wrong?

alerque commented on 2021-08-03 10:42 (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.

thrasibule commented on 2021-07-19 21:44 (UTC)

Well a gentle reminder on those packages would work a lot better than complaining after a few hours that I haven't done it on this one. If I haven't done it after a year and a half, chances are I've forgotten. I think you're needlessly confrontational here.

alerque commented on 2021-07-19 21:38 (UTC) (edited on 2021-07-19 21:38 (UTC) by alerque)

I don't have to apply your patch within a few hours.

Of course not, I don't expect you too. But I have submitted patches that fix the same issue on other packages that you haven't applied for a year and a half.

Unless there is something demonstrably broken I won't change it.

Many of your packages including this one will not build with makechrootpkg in their current form, that is demonstrably broken. There are obvious fixes that are easy to apply. I don't understand your reluctance to just apply them — or let me apply them.

thrasibule commented on 2021-07-19 21:27 (UTC)

Geez, I don't work for you. I don't have to apply your patch within a few hours. Regarding the second point, I'd rather not rely on dependencies if they're not needed. setuptools-scm does exactly nothing, and pytest-runner is deprecated. Anyway you can do what you want in your own packages. Unless there is something demonstrably broken I won't change it.

alerque commented on 2021-07-19 21:12 (UTC)

Thanks, I'll apply the first one.

Okay, you say you will, but you haven't. I'd be happy to actually do the work, if you don't have time yourself to address issues or follow guidelines please at least add me as a co-maintainer. I've been commenting and sending patches like this for years. I didn't even bother reporting this one because you hadn't accepted most of my fixes, so I just had this one forked for my own use.

For the second one, I'd rather just patch setup.py the way I did for ufo2ft.

Why are you trying to patch upstream projects to build with different tooling when they build fine with the dependencies they were specified upstream (and which are in Arch repositories)?

If you want to spend energy fixing broken packages, how about you look at python-skia-pathops, where you're a co-maintainer? This one really is completely broken.

Yes, it was quite broken. I just fixed it — not with an ideal fix but at least with something that follows Arch guidelines for what to do when Wheels are the only known way.

thrasibule commented on 2021-07-19 16:21 (UTC)

Thanks, I'll apply the first one. For the second one, I'd rather just patch setup.py the way I did for ufo2ft.

If you want to spend energy fixing broken packages, how about you look at python-skia-pathops, where you're a co-maintainer? This one really is completely broken.

alerque commented on 2021-07-19 15:58 (UTC) (edited on 2021-07-19 16:25 (UTC) by alerque)

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 2bdc0771d31c9b7bb1fbea27845198e856008ec5 Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <caleb@alerque.com>
Date: Mon, 19 Jul 2021 18:51:50 +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 | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD
index 4f7a0f4..0cf40e1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,9 +15,14 @@ arch=('x86_64')
 source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
 sha256sums=('e24bd03c94944e1536ec8437ab83fb4ac38477412426c1ffd4e056dd16cde235')

+build() {
+    cd "$_pkgname-$pkgver"
+    python setup.py build
+}
+
 package() {
-    cd "${_pkgname}-${pkgver}"
-    python setup.py install --root="${pkgdir}" --optimize=1
+    cd "$_pkgname-$pkgver"
+    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
 }

 check() {
-- 
2.32.0

From 1d4a1b99df1446ee32adf14e3efe9dfae800f6dc Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <caleb@alerque.com>
Date: Mon, 19 Jul 2021 18:53:08 +0300
Subject: [PATCH 2/2] Fix incorrect make dependency, patch out unnecessary one

Signed-off-by: Caleb Maclennan <caleb@alerque.com>
---
 .SRCINFO |  5 ++---
 PKGBUILD | 10 ++++++++--
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/.SRCINFO b/.SRCINFO
index c3885ce..2ace580 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,14 @@
 pkgbase = python-cffsubr
    pkgdesc = Standalone CFF subroutinizer based on AFDKO tx
    pkgver = 0.2.8
-   pkgrel = 1
+   pkgrel = 2
    url = https://github.com/adobe-type-tools/cffsubr
    arch = x86_64
    license = Apache
    checkdepends = python-pytest
-   makedepends = python-setuptools
+   makedepends = python-setuptools-scm
    depends = python-fonttools
    source = https://files.pythonhosted.org/packages/source/c/cffsubr/cffsubr-0.2.8.tar.gz
    sha256sums = e24bd03c94944e1536ec8437ab83fb4ac38477412426c1ffd4e056dd16cde235

 pkgname = python-cffsubr
-
diff --git a/PKGBUILD b/PKGBUILD
index 0cf40e1..13be564 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,20 +1,26 @@
 # Maintainer: Guillaume Horel <guillaume.horel@gmail.com>
+# Contributor: Caleb Maclennan <caleb@alerque.com>

 pkgname='python-cffsubr'
 _pkgname='cffsubr'
 pkgver=0.2.8
-pkgrel=1
+pkgrel=2
 pkgdesc="Standalone CFF subroutinizer based on AFDKO tx"
 url="https://github.com/adobe-type-tools/cffsubr"
 checkdepends=('python-pytest')
 depends=('python-fonttools')
-makedepends=('python-setuptools')
+makedepends=('python-setuptools-scm')
 optdepends=()
 license=('Apache')
 arch=('x86_64')
 source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
 sha256sums=('e24bd03c94944e1536ec8437ab83fb4ac38477412426c1ffd4e056dd16cde235')

+prepare() {
+    cd "$_pkgname-$pkgver"
+    sed -i -e '/git-ls-files/d' setup.py
+}
+
 build() {
     cd "$_pkgname-$pkgver"
     python setup.py build
-- 
2.32.0