From fb94a69d4308c75ddbea465fe9d0aee4d6edb42d Mon Sep 17 00:00:00 2001 From: Gabriel Wicki Date: Sat, 10 Jan 2026 02:52:46 +0100 Subject: 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 --- gnu/packages/electronics.scm | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'gnu') 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 -- cgit v1.3