guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/19: gnu: Add python-glyphslib.


From: guix-commits
Subject: 05/19: gnu: Add python-glyphslib.
Date: Fri, 16 Sep 2022 13:04:20 -0400 (EDT)

mbakke pushed a commit to branch master
in repository guix.

commit d1c60dd89228197cd0a34c5316f287058f919857
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Fri Sep 16 16:40:17 2022 +0200

    gnu: Add python-glyphslib.
    
    * gnu/packages/fontutils.scm (python-glyphslib): New variable.
---
 gnu/packages/fontutils.scm | 61 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index 6f0cc4f586..6e89124d5e 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -542,6 +542,67 @@ process.  FontParts is the successor of RoboFab.")
      (alist-delete 'hidden?
                    (package-properties python-fontparts-bootstrap)))))
 
+(define-public python-glyphslib
+  (package
+    (name "python-glyphslib")
+    (version "6.0.7")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "glyphsLib" version))
+              (sha256
+               (base32
+                "0mkkwd09g76hvif603ij5aqicxh47zvhgyyd0pjcjmpdy6dr70yw"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'build
+            (lambda _
+              ;; The Zip format does not support pre-1980 time stamps.
+              (let ((circa-1980 (* 10 366 24 60 60)))
+                (setenv "SOURCE_DATE_EPOCH" (number->string circa-1980))
+                (invoke "python" "-m" "build" "--wheel" "--no-isolation" 
"."))))
+          (replace 'install
+            (lambda _
+              (let ((whl (car (find-files "dist" "\\.whl$"))))
+                (invoke "pip" "--no-cache-dir" "--no-input"
+                        "install" "--no-deps" "--prefix" #$output whl))))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (setenv "GUIX_PYTHONPATH"
+                        (string-append (getcwd) ":" (getenv 
"GUIX_PYTHONPATH")))
+                (invoke "pytest" "-vv"
+                        ;; These fail because the test data has not yet been
+                        ;; updated for newer FontTools:
+                        ;;   
https://github.com/googlefonts/glyphsLib/issues/787
+                        ;; Re-enable for versions > 6.0.7.
+                        "--ignore=tests/builder/designspace_gen_test.py"
+                        "--ignore=tests/builder/interpolation_test.py"
+                        )))))))
+    (native-inputs
+     (list python-pypa-build
+           python-setuptools-scm
+           python-wheel
+
+           ;; For tests.
+           python-pytest
+           python-xmldiff))
+    (propagated-inputs
+     (list python-defcon
+           python-fonttools-next
+           python-openstep-plist
+           python-ufolib2
+           python-ufo2ft
+           python-ufonormalizer))
+    (home-page "https://github.com/googlefonts/glyphsLib";)
+    (synopsis "Bridge Glyphs source files to UFOs")
+    (description
+     "This package provides a bridge from Glyphs source files (@file{.glyphs})
+to UFOs and DesignSpace files via @code{defcon} and @code{designspaceLib}.")
+    (license license:asl2.0)))
+
 (define-public python-opentype-sanitizer
   (package
     (name "python-opentype-sanitizer")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]