From 8c655cec9d7b8e7a75e8715249e36586d2c666d3 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 29 Jun 2023 15:54:12 +0100 Subject: gnu: Add python-lazy-loader. * gnu/packages/python-xyz.scm (python-lazy-loader): New variable. --- gnu/packages/python-xyz.scm | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python-xyz.scm') diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index f6f34c12b4..c4105c4685 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -29,7 +29,7 @@ ;;; Copyright © 2016-2022 Marius Bakke ;;; Copyright © 2016, 2017, 2021, 2022 Stefan Reichör ;;; Copyright © 2016, 2017, 2019 Alex Vong -;;; Copyright © 2016, 2017, 2018, 2021, 2022 Arun Isaac +;;; Copyright © 2016–2018, 2021–2023 Arun Isaac ;;; Copyright © 2016, 2017, 2018, 2020, 2021 Julien Lepiller ;;; Copyright © 2016–2022 Tobias Geerinckx-Rice ;;; Copyright © 2016, 2017 Thomas Danckaert @@ -19137,6 +19137,34 @@ feels like an AST.") inspection of types defined in the Python standard typing module.") (license license:expat))) +(define-public python-lazy-loader + (package + (name "python-lazy-loader") + (version "0.2") + (source (origin + (method url-fetch) + (uri (pypi-uri "lazy_loader" version)) + (sha256 + (base32 + "12piaj94m5wbx33cxb80xgnsvzgya6cp90zj12qsq064fm8pmp0f")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest python-pytest-cov)) + (propagated-inputs + (list python-flit-core)) + (home-page "https://scientific-python.org/specs/spec-0001/") + (synopsis "Load subpackages and functions on demand") + (description "@code{python-lazy-loader} makes it easy to load subpackages +and functions on demand. Its main features are: + +@itemize +@item Allow subpackages to be made visible to users without incurring import +costs. +@item Allow external libraries to be imported only when used, improving import +times. +@end itemize") + (license license:bsd-3))) + (define-public python-lazy-object-proxy (package (name "python-lazy-object-proxy") -- cgit v1.2.3