[bug#76259,2/3] gnu: Add python-triangle.

Message ID 64d4e2e3b8a474234bd7875dfc2e90e7e53a21b1.1739439090.git.lars.bilke@ufz.de
State New
Headers
Series Add python-triangle, python-pandamesh and update gmsh to 4.13.1. |

Commit Message

Lars Bilke Feb. 13, 2025, 9:38 a.m. UTC
  * gnu/packages/python-xyz.scm (python-triangle): New variable.

Change-Id: I0bc8f96eaf3c2c7d45277ce2ae54ed3b526f8e15
---
 gnu/packages/python-xyz.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
  

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5f359d9c54..dde22ebc27 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -161,6 +161,7 @@ 
 ;;; Copyright © 2025 Jordan Moore <lockbox@struct.foo>
 ;;; Copyright © 2025 Dariqq <dariqq@posteo.net>
 ;;; Copyright © 2025 Nguyễn Gia Phong <mcsinyx@disroot.org>
+;;; Copyright © 2025 Lars Bilke <lars.bilke@ufz.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36144,6 +36145,38 @@  (define-public python-pyhull
 Voronoi diagram.")
     (license license:expat)))
 
+(define-public python-triangle
+  (package
+    (name "python-triangle")
+    (version "20250106")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/drufat/triangle")
+             (commit (string-append "v" version))
+             (recursive? #t)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1fj8a64k94mibdz5i6zzmlgs0bvsfsa5qns33ppv8wl306yxq1d3"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (replace 'check
+                     (lambda* (#:key tests? #:allow-other-keys)
+                       (when tests?
+                         (invoke "pytest" "-v")))))))
+    (propagated-inputs (list python-numpy))
+    (native-inputs (list python-setuptools python-wheel python-pytest))
+    (home-page "https://github.com/drufat/triangle")
+    (synopsis "Python bindings to the triangle library")
+    (description
+     "Triangle is a python wrapper around Jonathan Richard
+Shewchuk's two-dimensional quality mesh generator and delaunay
+triangulator library.")
+    (license license:lgpl3)))
+
 (define-public python-opcodes
   ;; There are no tags in this repo, but 'opcodes/__init__.py' specifies a
   ;; version number, which is what we use here.