summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-06-26 15:05:22 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-06-26 22:10:40 -0400
commit02b09d3769d071c8588d45d661d0d2ef40cbfe32 (patch)
tree35deb521ead3992883dc9b96550d56fadfc60e04
parentgnu: Add python-cattrs. (diff)
downloadguix-02b09d3769d071c8588d45d661d0d2ef40cbfe32.tar.gz
guix-02b09d3769d071c8588d45d661d0d2ef40cbfe32.tar.bz2
guix-02b09d3769d071c8588d45d661d0d2ef40cbfe32.tar.xz
gnu: Add python-statmake.
* gnu/packages/fontutils.scm (python-statmake): New variable.
-rw-r--r--gnu/packages/fontutils.scm73
1 files changed, 73 insertions, 0 deletions
diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm
index 712517c685..44b050795d 100644
--- a/gnu/packages/fontutils.scm
+++ b/gnu/packages/fontutils.scm
@@ -1396,6 +1396,79 @@ generate bitmaps.")
1396 `(("python" ,python-2) 1396 `(("python" ,python-2)
1397 ,@(alist-delete "python" (package-inputs fontforge)))))) 1397 ,@(alist-delete "python" (package-inputs fontforge))))))
1398 1398
1399(define-public python-statmake
1400 (package
1401 (name "python-statmake")
1402 (version "0.5.1")
1403 (source (origin
1404 (method git-fetch)
1405 (uri (git-reference
1406 (url "https://github.com/daltonmaag/statmake")
1407 (commit (string-append "v" version))))
1408 (file-name (git-file-name name version))
1409 (sha256
1410 (base32
1411 "0qavzspxhwnaayj5mxq6ncjjziggabxj157ls04h2rdrpq167706"))))
1412 (build-system python-build-system)
1413 (arguments
1414 (list
1415 #:phases
1416 #~(modify-phases %standard-phases
1417 ;; XXX: PEP 517 manual build copied from python-isort.
1418 (add-after 'unpack 'adjust-for-older-attrs
1419 ;; Our older attrs package is using the 'attr' rather than 'attrs'
1420 ;; namespace.
1421 ;; TODO: Remove after python-attrs is updated to >= 21.4.0.
1422 (lambda _
1423 (substitute* "pyproject.toml"
1424 (("attrs = \">=21.3\"")
1425 "attrs = \">=21.2\""))
1426 (substitute* (find-files "." "\\.py$")
1427 (("from attrs\\b")
1428 "from attr")
1429 (("import attrs")
1430 "import attr")
1431 (("@attrs")
1432 "@attr")
1433 (("\\battrs\\.")
1434 "attr."))))
1435 (replace 'build
1436 (lambda _
1437 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
1438 (replace 'install
1439 (lambda _
1440 (let ((whl (car (find-files "dist" "\\.whl$"))))
1441 (invoke "pip" "--no-cache-dir" "--no-input"
1442 "install" "--no-deps" "--prefix" #$output whl))))
1443 (replace 'check
1444 (lambda* (#:key tests? #:allow-other-keys)
1445 (when tests?
1446 (invoke "pytest" "-vv" "tests"
1447 ;;"-n" (number->string (parallel-job-count))
1448 ;; This test requires orjson, which needs the maturin
1449 ;; build system and new Rust dependencies.
1450 ;;"--ignore" "tests/test_preconf.py"
1451 )))))))
1452 (native-inputs
1453 (list python-poetry-core
1454 python-pypa-build
1455 python-pytest
1456 python-ufo2ft))
1457 (propagated-inputs
1458 (list python-attrs
1459 python-cattrs
1460 python-fonttools))
1461 (home-page "https://github.com/daltonmaag/statmake")
1462 (synopsis "Apply OpenType STAT information to a variable font")
1463 (description
1464 "@command{statmake} takes a user-written Stylespace that defines
1465@url{https://docs.microsoft.com/en-us/typography/opentype/spec/stat, OpenType
1466STAT information} for an entire font family and then (potentially subsets and)
1467applies it to a specific variable font. This spares users from having to deal
1468with @url{https://github.com/fonttools/fonttools/, raw TTX dumps} and juggling
1469with @samp{nameIDs}.")
1470 (license license:expat)))
1471
1399(define-public python-ufolib2 1472(define-public python-ufolib2
1400 (package 1473 (package
1401 (name "python-ufolib2") 1474 (name "python-ufolib2")