summary refs log tree commit diff
path: root/gnu/packages/fontutils.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-04-08 22:33:46 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-05-12 12:45:38 -0400
commit7e776ea007b394cb901e771dc2fd838d72f1585f (patch)
tree27678a12d270763fd0a43fd4902e6a188246871c /gnu/packages/fontutils.scm
parent25b4c8a0244fdaf0b92b372a9bda81e0bd3adc67 (diff)
downloadguix-7e776ea007b394cb901e771dc2fd838d72f1585f.tar.gz
gnu: Add python-ufolib2.
* gnu/packages/fontutils.scm (python-ufolib2): New variable.
Diffstat (limited to 'gnu/packages/fontutils.scm')
-rw-r--r--gnu/packages/fontutils.scm46
1 files changed, 46 insertions, 0 deletions
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index f2a76b9492..3d8447703f 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -1315,6 +1315,52 @@ generate bitmaps.")
      `(("python" ,python-2)
        ,@(alist-delete "python" (package-inputs fontforge))))))
 
+(define-public python-ufolib2
+  (package
+    (name "python-ufolib2")
+    (version "0.13.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "ufoLib2" version))
+       (sha256
+        (base32 "0yx4i8q5rfyqhr2fj70a7z1bp1jv7bdlr64ww9z4nv9ycbda4x9j"))))
+    (build-system python-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; XXX: PEP 517 manual build copied from python-isort.
+          (replace 'build
+            (lambda _
+              ;; ZIP does not support timestamps before 1980.
+              (setenv "SOURCE_DATE_EPOCH" "315532800")
+              (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              (when tests?
+                (invoke "pytest" "-vv"))))
+          (replace 'install
+            (lambda _
+              (let ((whl (car (find-files "dist" "\\.whl$"))))
+                (invoke "pip" "--no-cache-dir" "--no-input"
+                        "install" "--no-deps" "--prefix" #$output whl)))))))
+    (native-inputs
+     (list python-pypa-build
+           python-pytest
+           python-setuptools-scm
+           python-wheel))
+    (propagated-inputs (list python-attrs python-fonttools-full))
+    (home-page "https://github.com/fonttools/ufoLib2")
+    (synopsis "Unified Font Object (UFO) font processing library")
+    (description "The ufoLib2 Python library is meant to be a thin
+representation of the Unified Font Object (UFO) version 3 data model, intended
+for programmatic manipulation and fast batch processing of UFOs.  It resembles
+the defcon library, but does without notifications, the layout engine and
+other support classes.  Where useful and possible, ufoLib2 tries to be
+API-compatible with defcon.")
+    (license license:asl2.0)))
+
 (define-public python2-ufolib
   (package
     (name "python2-ufolib")