summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorGabriel Wicki <gabriel@erlikon.ch>2026-01-10 02:52:46 +0100
committerGabriel Wicki <gabriel@erlikon.ch>2026-02-01 23:37:02 +0100
commitfb94a69d4308c75ddbea465fe9d0aee4d6edb42d (patch)
tree3dbf700a8935cb575df064cdd90ef581f00ab91d /gnu
parentb45e6133f025ad53d0870c5f9495834ed6d2c986 (diff)
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 <gabriel@erlikon.ch>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/electronics.scm25
1 files changed, 23 insertions, 2 deletions
diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index d01a0702fc7..9267bf30034 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