diff options
author | Ricardo Wurmus <[email protected]> | 2025-01-11 20:37:41 +0100 |
---|---|---|
committer | Ricardo Wurmus <[email protected]> | 2025-01-20 21:37:44 +0100 |
commit | fc620dcd82d7db2d72bb41a5fdf9ad3de8feb10e (patch) | |
tree | 28887febb87d3d0b949721b8809fe226bbe4b6f7 /gnu/packages/python-xyz.scm | |
parent | e6207c76b525ce186fac9e9d4e53eb5a3f6c731c (diff) |
gnu: Add python-nanobind.
* gnu/packages/python-xyz.scm (python-nanobind): New variable.
Change-Id: Ic3525712e7b5c6baaaf3b7660079c1ba15f7c3ee
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r-- | gnu/packages/python-xyz.scm | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index de004cc567..82728cccf9 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -2144,6 +2144,42 @@ generator MkDocs.") bindings to the C++ random forest implementation, ranger, using Cython.") (license license:gpl3+))) +(define-public python-nanobind + (package + (name "python-nanobind") + (version "2.4.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "nanobind" version)) + (sha256 + (base32 "15hw9r0znv7pz8mlgcb892m8ahppaf7gx2xcna2i122qbzp2sfd0")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'configure-cmake + (lambda _ + (invoke "cmake" "-S" "." "-B" "build" "-DNB_TEST_STABLE_ABI=ON"))) + (add-after 'configure-cmake 'build-c++ + (lambda _ + (invoke "cmake" "--build" "build" "-j" "2"))) + (add-before 'check 'pre-check + (lambda _ (chdir "build")))))) + (inputs (list eigen)) + (native-inputs (list cmake-minimal + python-pytest + python-scikit-build-core)) + (home-page "https://github.com/wjakob/nanobind/") + (synopsis "nanobind: tiny and efficient C++/Python bindings") + (description "Nanobind is a small binding library that exposes C++ types +in Python and vice versa. It is reminiscent of @code{Boost.Python} and +@code{pybind11} and uses near-identical syntax. In contrast to these existing +tools, @code{nanobind} is more efficient: bindings compile in a shorter amount +of time, produce smaller binaries, and have better runtime performance.") + (license license:bsd-3))) + (define-public python-nr-date (package (name "python-nr-date") |