diff options
author | Hanketsu <hanketsu@egregore.fun> | 2025-02-27 21:14:17 +0100 |
---|---|---|
committer | Hanketsu <hanketsu@egregore.fun> | 2025-06-13 00:04:32 +0200 |
commit | 1c349ba6d5a9f9cbb3f93e9dfc51c37103553980 (patch) | |
tree | 91637b87ab41958b0f84cfce66a9ed51018ecdda /battering/packages/python-xyz.scm | |
parent | 12de7fe66445f0e3a495b25b89208dd27e51d2de (diff) |
battering: Add python-svglib.
* battering/packages/python-xyz.scm (python-svglib): New variable.
Diffstat (limited to 'battering/packages/python-xyz.scm')
-rw-r--r-- | battering/packages/python-xyz.scm | 36 |
1 files changed, 35 insertions, 1 deletions
diff --git a/battering/packages/python-xyz.scm b/battering/packages/python-xyz.scm index c605ef0..df406af 100644 --- a/battering/packages/python-xyz.scm +++ b/battering/packages/python-xyz.scm @@ -7,12 +7,15 @@ #:use-module (guix packages) #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages check) + #:use-module (gnu packages pdf) #:use-module (gnu packages python-build) #:use-module (gnu packages python-science) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages tmux) - #:use-module (gnu packages xdisorg)) + #:use-module (gnu packages xdisorg) + #:use-module (gnu packages xml)) (define-public python-pyfzf (package @@ -128,3 +131,34 @@ looks like Material Design (close enough).") (description "XMind Python") (license license:expat))) + +(define-public python-svglib + (package + (name "python-svglib") + (version "1.5.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "svglib" version)) + (sha256 + (base32 "11z5jl38zjbzrmdly197m5x6303axcnlrlml1w6fd7j0m79nbrrs")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-cssselect2 python-lxml python-reportlab + python-tinycss2)) + (native-inputs (list python-setuptools python-wheel + python-pytest python-pytest-runner)) + (arguments + `(#:test-flags '("-k" "not Wikipedia and not W3CSVG") + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? test-flags #:allow-other-keys) + (when tests? + (apply invoke "python" "-m" "pytest" "-v" test-flags))))))) + (home-page "https://github.com/deeplook/svglib") + (synopsis "A pure-Python library for reading and converting SVG") + (description + "Svglib is a pure-Python library for reading SVG files and converting +them (to a reasonable degree) to other formats using the ReportLab Open Source +toolkit.") + (license license:lgpl3+))) |