summaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-10-01 15:52:16 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-11-11 12:18:11 -0500
commita6d9dbb1b2499236f6c70c5154d9f024be9321de (patch)
tree4b5f48ce5add70d995dd3ed0d9f534a021499008 /gnu/packages
parent95878336881eaa5383348712b11087029e943b92 (diff)
gnu: Add python-tomli.
* gnu/packages/python-build.scm (python-tomli): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/python-build.scm38
1 files changed, 38 insertions, 0 deletions
diff --git a/gnu/packages/python-build.scm b/gnu/packages/python-build.scm
index 44edb2d097..9f59c3500d 100644
--- a/gnu/packages/python-build.scm
+++ b/gnu/packages/python-build.scm
@@ -135,6 +135,44 @@ Python file, so it can be easily copied into your project.")
(define-public python2-six-bootstrap
(package-with-python2 python-six-bootstrap))
+(define-public python-tomli
+ (package
+ (name "python-tomli")
+ (version "1.2.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "tomli" version))
+ (sha256
+ (base32 "1vjg44narb7hdiazdmbv8bfv7pi6phnq7nxm6aphx0iqxcah1kn6"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f ;disabled to avoid extra dependencies
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'build
+ (lambda _
+ (setenv "PYTHONPATH" (string-append (getcwd) ":"
+ (getenv "GUIX_PYTHONPATH")))
+ (invoke "python" "-m" "build" "--wheel" "--no-isolation"
+ "--skip-dependency-check")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (whl (car (find-files "dist" "\\.whl$"))))
+ (invoke "pip" "--no-cache-dir" "--no-input"
+ "install" "--no-deps" "--prefix" out whl)))))))
+ (native-inputs
+ `(("python-flit-core" ,python-flit-core)
+ ("python-pypa-build" ,python-pypa-build)
+ ("python-six", python-six-bootstrap)))
+ (home-page "https://github.com/hukkin/tomli")
+ (synopsis "Small and fast TOML parser")
+ (description "Tomli is a minimal TOML parser that is fully compatible with
+@url{https://toml.io/en/v1.0.0,TOML v1.0.0}. It is about 2.4 times as fast as
+@code{python-toml}.")
+ (license license:expat)))
+
(define-public python-pep517-bootstrap
(hidden-package
(package