Package Details: python-fontmath 0.9.2-1

Git Clone URL: https://aur.archlinux.org/python-fontmath.git (read-only, click to copy)
Package Base: python-fontmath
Description: A collection of objects that implement fast font, glyph, etc. math
Upstream URL: https://github.com/robotools/fontMath
Licenses: MIT
Submitter: wiill
Maintainer: alerque (thrasibule)
Last Packager: alerque
Votes: 3
Popularity: 0.97
First Submitted: 2017-01-05 01:32 (UTC)
Last Updated: 2022-05-10 14:22 (UTC)

Pinned Comments

alerque commented on 2021-08-03 14:30 (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

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

alerque commented on 2021-06-29 10:36 (UTC) (edited on 2021-06-29 10:38 (UTC) by alerque)

...continued from last comment.

In this case the problem is that this project uses setuptools_scm, not just setuptools. The fix is to set makedepends=(python-setuptools-scm). Here is a patch that fixes that and does some other cleanup to bring it more in line with Arch packaging guidelines scattered around the Wiki. You can same the following to a file and apply it with git am <patch_file>:

From 11391ef912cc1dbd3d18af2ad90c5f08a0f5c8bd Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <caleb@alerque.com>
Date: Tue, 29 Jun 2021 13:34:51 +0300
Subject: [PATCH] Fix make dependencies and split build/package phases

Signed-off-by: Caleb Maclennan <caleb@alerque.com>
---
 PKGBUILD | 37 ++++++++++++++++++++++---------------
 1 file changed, 22 insertions(+), 15 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD
index a07d15b..6892db8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,27 +1,34 @@
 # Maintainer: Guillaume Horel <guillaume.horel@gmail.com>
 # Ex-Maintainer: William Turner <willtur.will@gmail.com>
-pkgname='python-fontmath'
+# Contributer: Caleb Maclennan <caleb@alerque.com>
+
+pkgname=python-fontmath
 _pkgname=fontMath
 pkgver=0.8.1
-pkgrel=1
+pkgrel=2
 pkgdesc='A set of objects for performing math operations on font data.'
-arch=('any')
-url='https://github.com/robotools/fontMath'
-license=('MIT')
-makedepends=('python-setuptools')
-depends=('python-fonttools')
-checkdepends=('python-pytest' 'python-pytest-runner')
+arch=(any)
+url="https://github.com/robotools/$_pkgname"
+license=(MIT)
+depends=(python-fonttools)
+checkdepends=(python-pytest python-pytest-runner)
+makedepends=(python-setuptools-scm)
 options=(!emptydirs)
-source=("https://pypi.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.zip")
+source=("https://pypi.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.zip")
 sha256sums=('39d71e8b7eeb33c0ddc25e94c1ae64bf29340aeea443f4327392f2be38175f54')

-package() {
-  cd "$_pkgname-$pkgver"
-  python setup.py install --root=$pkgdir || return 1
-  install -D -m644 License.txt "${pkgdir}/usr/share/licenses/${pkgname}/License.txt"
+build() {
+   cd "$_pkgname-$pkgver"
+   python setup.py build
 }

 check() {
-  cd "$_pkgname-$pkgver"
-  python setup.py test
+   cd "$_pkgname-$pkgver"
+   python setup.py test
+}
+
+package() {
+   cd "$_pkgname-$pkgver"
+   python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+   install -D -m644 -t "$pkgdir/usr/share/licenses/$pkgname/" License.txt
 }
-- 
2.32.0

This builds cleanly is a chroot with no dependency issues.

@thraasibule Please consider applying this patch and/or adding me as a co-maintainer. I've fixed similar problems with dependencies and the build/package split on quite a few of your other packages, I think you can see from my comments and fixes that I'm not a stranger to packaging issues and I have an interest in the font tool ecosystem functioning smoothly in Arch.

alerque commented on 2021-06-29 10:28 (UTC) (edited on 2021-06-29 10:35 (UTC) by alerque)

@abouvier: No, python-pip should never be a makedepends for Python packages. That error shows up because something else is missing from the dependencies and the Python setup system tries to use pip to fetch it. The right fix is always to figure out what the something else is that is missing and add that to depends=() directly.

abouvier commented on 2021-06-28 01:30 (UTC)

python-pip is needed in makedepends.

alerque commented on 2020-04-02 17:38 (UTC)

@lglu47 This package really isn't responsible for that, you should raise this as an issue with the upstream fontmath project.

Iglu47 commented on 2020-04-02 16:59 (UTC)

works fine, only 1 warn on tests: /usr/lib/python3.8/site-packages/fontTools/misc/py23.py:11: DeprecationWarning: The py23 module has been deprecated and will be removed in the next release. Please update your code.

yochananmarqos commented on 2020-01-08 23:28 (UTC)

Ah, good point about python-wheel. It built fine without it.

When I use your PKGBUILD, the tests don't run. They only do with mine. That's odd they would run for you but not me. It's been a long day, maybe I'm missing something.

thrasibule commented on 2020-01-08 22:49 (UTC)

Well unless you run python setup.py bdist_wheel, needs_wheel will be empty, so I seriously doubt it depends on python-wheel. I agree that based on setup.py, it looks like it should depend on python-pytest-runner, but I don't have it installed, and the tests run fine here, do you see otherwise?

yochananmarqos commented on 2020-01-08 22:38 (UTC)

I apologize, they should be in checkdepends(). I've updated my PKGBUILD.

See the setup.py. The test actually does not run at all without them. You're missing the build() function. The tests should be run after building and before installing.

thrasibule commented on 2020-01-08 20:19 (UTC)

This package does not depend on python-wheel nor python-pytest-runner, so I don't see why you put them in makedepends. I will change the url and add the License file. Anything else that does not conform to the Python package guidelines?

yochananmarqos commented on 2020-01-08 20:09 (UTC)

This is missing dependencies and does not adhere to Python package guidelines. See my PKGBUILD. Also the upstream URL has changed to https://github.com/robotools/fontMath.