Package Details: python-glyphslib 6.9.5-1

Git Clone URL: https://aur.archlinux.org/python-glyphslib.git (read-only, click to copy)
Package Base: python-glyphslib
Description: A bridge from Glyphs source files (.glyphs) to UFOs
Upstream URL: https://github.com/googlefonts/glyphsLib
Licenses: Apache-2.0
Submitter: thrasibule
Maintainer: alerque (thrasibule)
Last Packager: alerque
Votes: 2
Popularity: 0.000002
First Submitted: 2019-08-12 17:18 (UTC)
Last Updated: 2024-11-14 11:59 (UTC)

Pinned Comments

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

binarynoise commented on 2022-05-09 06:30 (UTC)

I can't build the update from a few days ago. It always fails with a bunch of these after a seemingly successful compilation:

______________________ test_designspace_generation_regular_same_family_name[defcon] ______________________

tmpdir = local('/tmp/pytest-of-tilo/pytest-0/test_designspace_generation_re0')
ufo_module = <module 'defcon' from '/usr/lib/python3.10/site-packages/defcon/__init__.py'>

    def test_designspace_generation_regular_same_family_name(tmpdir, ufo_module):
        ufo_Lt = ufo_module.Font()
        ufo_Lt.info.familyName = "CoolFoundry Examplary Serif"
        ufo_Lt.info.styleName = "Light"
        ufo_Lt.info.openTypeOS2WeightClass = 300

        ufo_Rg = ufo_module.Font()
        ufo_Rg.info.familyName = "CoolFoundry Examplary Serif"
        ufo_Rg.info.styleName = "Regular"
        ufo_Rg.info.openTypeOS2WeightClass = 400

        ufo_Md = ufo_module.Font()
        ufo_Md.info.familyName = "CoolFoundry Examplary Serif"
        ufo_Md.info.styleName = "Medium"
        ufo_Md.info.openTypeOS2WeightClass = 500

        ufo_Bd = ufo_module.Font()
        ufo_Bd.info.familyName = "CoolFoundry Examplary Serif"
        ufo_Bd.info.styleName = "Bold"
        ufo_Bd.info.openTypeOS2WeightClass = 700

        ufo_ExBd = ufo_module.Font()
        ufo_ExBd.info.familyName = "CoolFoundry Examplary Serif"
        ufo_ExBd.info.styleName = "XBold"
        ufo_ExBd.info.openTypeOS2WeightClass = 800

        font = to_glyphs([ufo_Lt, ufo_Rg, ufo_Md, ufo_Bd, ufo_ExBd])
        designspace = to_designspace(font, ufo_module=ufo_module)

        path = os.path.join(str(tmpdir), "actual.designspace")
        designspace.write(path)

        expected_path = os.path.join(
            os.path.dirname(__file__), "..", "data", "DesignspaceGenTestRegular.designspace"
        )

>       assert (
            len(main.diff_files(path, expected_path, formatter=formatting.DiffFormatter()))
            == 0
        )
E       assert 50 == 0
E        +  where 50 = len('[update-attribute, /designspace[1], format, "4.1"]')
E        +    where '[update-attribute, /designspace[1], format, "4.1"]' = <function diff_files at 0x7f07ac28e4d0>('/tmp/pytest-of-tilo/pytest-0/test_designspace_generation_re0/actual.designspace', '/tmp/yay/python-glyphslib/src/glyphsLib-6.0.5/tests/builder/../data/DesignspaceGenTestRegular.designspace', formatter=<xmldiff.formatting.DiffFormatter object at 0x7f07ac5d5ff0>)
E        +      where <function diff_files at 0x7f07ac28e4d0> = main.diff_files
E        +      and   <xmldiff.formatting.DiffFormatter object at 0x7f07ac5d5ff0> = <class 'xmldiff.formatting.DiffFormatter'>()
E        +        where <class 'xmldiff.formatting.DiffFormatter'> = formatting.DiffFormatter

tests/builder/designspace_gen_test.py:69: AssertionError

...

======================= 10 failed, 515 passed, 67 skipped, 191 deselected in 7.40s =======================

alerque commented on 2021-08-03 18:31 (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-07-19 22:29 (UTC)

Still doesn't build cleanly, as mentioned last August python-lxml (and possible other ufo related things that are only optdepends on the python-fonttools package) is missing from checkdependes.

txtsd commented on 2021-01-12 03:36 (UTC)

@thrasibule Thanks I rebuilt everything that was listed and it did the trick!

thrasibule commented on 2021-01-11 19:20 (UTC)

@txtsd did you rebuild python-xmldiff since you upgraded to python-3.9? all python aur packages need to be rebuilt after python upgrades. You can do something like pacman -Qo /usr/lib/python3.8/site-packages to know the list of packages that need to be rebuild.

txtsd commented on 2021-01-10 10:55 (UTC) (edited on 2021-01-10 10:56 (UTC) by txtsd)

===================================================================================== test session starts =====================================================================================
platform linux -- Python 3.9.1, pytest-6.2.1, py-1.10.0, pluggy-0.13.1
rootdir: /home/txtsd/.cache/yay/python-glyphslib/src/glyphsLib-5.3.1
plugins: requests-mock-1.8.0
collected 539 items / 2 errors / 537 selected                                                                                                                                                 

=========================================================================================== ERRORS ============================================================================================
___________________________________________________________________ ERROR collecting tests/builder/designspace_gen_test.py ____________________________________________________________________
ImportError while importing test module '/home/txtsd/.cache/yay/python-glyphslib/src/glyphsLib-5.3.1/tests/builder/designspace_gen_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/builder/designspace_gen_test.py:20: in <module>
    from xmldiff import main, formatting
E   ModuleNotFoundError: No module named 'xmldiff'
____________________________________________________________________ ERROR collecting tests/builder/interpolation_test.py _____________________________________________________________________
ImportError while importing test module '/home/txtsd/.cache/yay/python-glyphslib/src/glyphsLib-5.3.1/tests/builder/interpolation_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/builder/interpolation_test.py:23: in <module>
    from xmldiff import main, formatting
E   ModuleNotFoundError: No module named 'xmldiff'
====================================================================================== warnings summary =======================================================================================
../../../../../../../usr/lib/python3.9/site-packages/fontTools/misc/py23.py:11
  /usr/lib/python3.9/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.
    warnings.warn(

../../../../../../../usr/lib/python3.9/site-packages/packaging/version.py:127: 2498 warnings
  /usr/lib/python3.9/site-packages/packaging/version.py:127: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=================================================================================== short test summary info ===================================================================================
ERROR tests/builder/designspace_gen_test.py
ERROR tests/builder/interpolation_test.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================== 2499 warnings, 2 errors in 1.99s ===============================================================================
==> ERROR: A failure occurred in check().
    Aborting...
error making: python-glyphslib
λ yay -Ss python-xmldiff
aur/python-xmldiff 2.4-1 (+1 0.00) (Installed)

allspark commented on 2020-08-04 09:14 (UTC)

missing (make) dependency python-lxml

alerque commented on 2020-03-27 11:48 (UTC)

Attached is a patch to apply with git am:

From 1518df71f392b8cae002bd4329431473927a81ad Mon Sep 17 00:00:00 2001
From: Caleb Maclennan <caleb@alerque.com>
Date: Fri, 27 Mar 2020 14:42:48 +0300
Subject: [PATCH] Relax unicodedata version dependency, split build() from
 package()

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

diff --git a/.SRCINFO b/.SRCINFO
index b6a62d3..9ed72e2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,13 +1,13 @@
 pkgbase = python-glyphslib
    pkgdesc = A bridge from Glyphs source files (.glyphs) to UFOs
    pkgver = 5.0.1
-   pkgrel = 1
+   pkgrel = 2
    url = https://github.com/googlefonts/glyphsLib
    arch = any
    license = Apache
    checkdepends = python-pytest
    checkdepends = python-ufonormalizer
-   checkdepends = python-unicodedata2=12.0.0
+   checkdepends = python-unicodedata2>=12.0.0
    checkdepends = python-xmldiff
    makedepends = python-setuptools
    depends = python
diff --git a/PKGBUILD b/PKGBUILD
index 3d61627..508bbe5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,32 @@
 # Maintainer: Guillaume Horel <guillaume.horel@gmail.com>
-pkgname=('python-glyphslib')
+# Contributor: Caleb Maclennan <caleb@alerque.com>
+
+pkgname=python-glyphslib
 _pkgname='glyphsLib'
-pkgver='5.0.1'
-pkgrel=1
+pkgver=5.0.1
+pkgrel=2
 pkgdesc="A bridge from Glyphs source files (.glyphs) to UFOs"
-url="https://github.com/googlefonts/glyphsLib"
-checkdepends=('python-pytest' 'python-ufonormalizer' 'python-unicodedata2=12.0.0' 'python-xmldiff')
+url="https://github.com/googlefonts/$_pkgname"
+arch=('any')
+checkdepends=('python-pytest' 'python-ufonormalizer' 'python-unicodedata2>=12.0.0' 'python-xmldiff')
+license=('Apache')
 depends=('python' 'python-defcon' 'python-fonttools')
 makedepends=('python-setuptools')
 optdepends=('python-ufonormalizer')
-license=('Apache')
-arch=('any')
-source=("https://pypi.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.zip")
+source=("https://pypi.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.zip")
 sha256sums=('424402e3e4405f5aa6f1b88699f12f636cad9225ddcfd05624cf4f55aaa62cd6')

-#check() {
-    #cd "$srcdir/$_pkgname-$pkgver"
+build() {
+    cd "$_pkgname-$pkgver"
+    python setup.py build
+}
+
+check() {
+    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

alerque commented on 2020-03-27 11:07 (UTC)

I can't build python-fontmake right now because this package has requires python-unicode=12.0.0 and I have v13. Can you please relax that check to be greater-or-equal-to? It's probably too aggressive this way.