Subject: [PATCH 2/3] gnu: Add python-triangle.

From: Lars Bilke <[email-masked]>
Date: Thu, 13 Feb 2025 10:38:42 +0100

* gnu/packages/python-xyz.scm (python-triangle): New variable.

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

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 <[email-masked]>
 ;;; Copyright © 2025 Dariqq <[email-masked]>
 ;;; Copyright © 2025 Nguyễn Gia Phong <[email-masked]>
+;;; Copyright © 2025 Lars Bilke <[email-masked]>
 ;;;
 ;;; 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.
-- 
2.46.1