guix_mirror_bot pushed a commit to branch python-klayout
in repository guix.

commit fb94a69d4308c75ddbea465fe9d0aee4d6edb42d
Author: Gabriel Wicki <[email protected]>
AuthorDate: Sat Jan 10 02:52:46 2026 +0100

    gnu: python-klayout: Enable tests.
    
    * gnu/packages/electronics.scm (python-klayout)
    [native-inputs]: Add python-wrapper.
    [arguments]: Enable tests.
    
    Change-Id: I76c5c7ad7f06b1973dce60198047b24f9421a7b9
    Signed-off-by: Gabriel Wicki <[email protected]>
---
 gnu/packages/electronics.scm | 25 +++++++++++++++++++++++--
 1 file changed, 23 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index d01a0702fc..9267bf3003 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -2248,8 +2248,29 @@ for @acronym{EDA, elecronic design automation} and chip 
design.")))
        (file-name (git-file-name name version))))
     (build-system pyproject-build-system)
     (arguments
-     '(#:tests? #f))
-    (native-inputs (list curl expat libpng python-setuptools python-tomli))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'check
+            (lambda* (#:key tests? #:allow-other-keys)
+              ;; Run the tests as specified in pyproject.toml.
+              (when tests?
+                (invoke "python"
+                        #$(plain-file "python-klayout-test-runner.py"
+                                      "import tomllib, subprocess
+with open(\"pyproject.toml\", \"rb\") as f:
+    config = tomllib.load(f)
+
+commands = config['tool']['cibuildwheel']['test-command']
+
+for command in commands:
+    subprocess.run(command.format(package=\".\").split())"))))))))
+    (native-inputs (list curl
+                         expat
+                         libpng
+                         python-setuptools
+                         python-tomli
+                         python-wrapper)) ;; The test commands invoke "python".
     (home-page "https://klayout.de";)
     (synopsis "Mask layout library for Python")
     (description

Reply via email to