[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#55104] [PATCH 079/232] gnu: Add python-cffsubr.
From: |
Maxim Cournoyer |
Subject: |
[bug#55104] [PATCH 079/232] gnu: Add python-cffsubr. |
Date: |
Sun, 24 Apr 2022 23:56:45 -0400 |
* gnu/packages/fontutils.scm (python-cffsubr): New variable.
---
gnu/packages/fontutils.scm | 49 ++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index 0c479cd5de..9d170da953 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -271,6 +271,55 @@ (define-public python-afdko
@end table")
(license license:asl2.0)))
+(define-public python-cffsubr
+ (package
+ (name "python-cffsubr")
+ (version "0.2.9.post1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "cffsubr" version))
+ (modules '((guix build utils)))
+ (snippet '(delete-file-recursively "external")) ;unbundle ADFKO
+ (sha256
+ (base32 "0p7wyagkmwf4agr6ysgswrpmpifx5rz8dnjbcs2gmj29rwnl2cbb"))))
+ (build-system python-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-setup.py
+ (lambda _
+ (substitute* '("pyproject.toml"
+ "setup.py")
+ ;; This is not needed when building the package.
+ (("setuptools-git-ls-files") "")
+ ;; Do not attempt to build the unbundled ADFKO.
+ (("cmdclass\\[\"build_ext\"] = ExecutableBuildExt.*")
+ ""))))
+ (add-after 'unpack 'patch-tx-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define tx (search-input-file inputs "bin/tx"))
+ (substitute* "src/cffsubr/__init__.py"
+ (("TX_EXE = \"tx\"")
+ (format #f "TX_EXE = ~s" tx))
+ ;; Use the full 'tx' file name directly.
+ (("with path\\(__name__, TX_EXE) as tx_cli:")
+ "")
+ ((" (return subprocess.run\\(\\[)str\\(tx_cli)(].*)" _ h t)
+ (format #f "~a~s~a" h tx t)))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-vv")))))))
+ (native-inputs (list python-pytest python-setuptools-scm python-wheel))
+ (inputs (list python-afdko))
+ (propagated-inputs (list python-fonttools))
+ (home-page "https://github.com/adobe-type-tools/cffsubr")
+ (synopsis "Compact Font Format (CFF) subroutinizer")
+ (description "This package provides the @command{cffsubr} command, a
+Compact Font Format (CFF) subroutinizer based on the Adobe Font Development
+Kit for OpenType (AFDKO) @command{tx} tool.")
(license license:asl2.0)))
(define-public python-cu2qu
--
2.34.0
- [bug#55104] [PATCH 039/232] gnu: Add python-jaraco-functools-bootstrap., (continued)
- [bug#55104] [PATCH 039/232] gnu: Add python-jaraco-functools-bootstrap., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 027/232] gnu: Add python-fontpens-bootstrap., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 047/232] gnu: python-importlib-metadata: Update to 4.11.3., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 020/232] gnu: Add opentype-sanitizer., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 059/232] gnu: Add python-pytest-perf., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 060/232] gnu: python-factory-boy: Update to 3.2.1., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 063/232] gnu: Add psautohint-font-data., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 065/232] gnu: Add python-ordered-set., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 050/232] gnu: Add python-types-docutils., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 067/232] gnu: Add python-ubelt., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 079/232] gnu: Add python-cffsubr.,
Maxim Cournoyer <=
- [bug#55104] [PATCH 077/232] gnu: Add python-fonttools-next., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 086/232] gnu: Add font-amiri., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 089/232] gnu: Add font-gfs-ambrosia., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 096/232] gnu: Add python-pydevd., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 093/232] gnu: python-black: Update to 22.3.0., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 034/232] gnu: Add python-ufoprocessor., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 054/232] gnu: Add python-jaraco-functools., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 058/232] gnu: Add python-tempora., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 061/232] gnu: python-faker: Update to 13.3.4 and honor TESTS?., Maxim Cournoyer, 2022/04/25
- [bug#55104] [PATCH 049/232] gnu: python-mypy: Update to 0.942 and fix search path., Maxim Cournoyer, 2022/04/25