guix_mirror_bot pushed a commit to branch master
in repository guix.

commit ce3353c66c90c94440d87662cf3f595344e99005
Author: Danny Milosavljevic <[email protected]>
AuthorDate: Sat Mar 7 04:03:18 2026 +0100

    gnu: Add python-onnxscript.
    
    * gnu/packages/speech.scm (python-onnxscript): New variable.
    
    Change-Id: I9c7b7c38fb5d948b16425e310911d5418cc26dbe
---
 gnu/packages/speech.scm | 55 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/speech.scm b/gnu/packages/speech.scm
index 5de1dc36fb..e771a29520 100644
--- a/gnu/packages/speech.scm
+++ b/gnu/packages/speech.scm
@@ -769,3 +769,58 @@ engine.")
     (description "This package provides a Python library for ONNX
 intermediate representation.")
     (license license:asl2.0)))
+
+(define-public python-onnxscript
+  (package
+    (name "python-onnxscript")
+    (version "0.6.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/microsoft/onnxscript";)
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1pdjiyakxqyi6g25ks773brc9wipgalvx9b9yfkzbp5vigqsg1ax"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'delete-build-lib
+            (lambda _
+              ;; Pytest gets confused when test modules exist in both
+              ;; build/lib and source tree.
+              (delete-file-recursively "build/lib"))))
+      #:test-flags
+      #~(list
+         ;; These tests require 2.1 GB of test fixtures stored in Git LFS
+         ;; (testdata/unittest_models/, testdata/e2e_models/).
+         "--ignore=tests/ir/serde_roundtrip_test.py"
+         "--ignore=tests/ir/graph_view_test.py"
+         "--ignore=tests/optimizer/test_models.py"
+         "--ignore=tests/version_converter/version_conversion_test.py"
+         ;; Uses onnx.hub to download models from the internet.
+         "--ignore=tools/ir/model_zoo_test/")))
+    (propagated-inputs
+     (list onnx
+           python-ml-dtypes
+           python-numpy
+           python-onnx-ir
+           python-packaging
+           python-typing-extensions))
+    (native-inputs
+     (list git-minimal
+           python-setuptools
+           python-pytest
+           python-parameterized
+           python-expecttest
+           python-pytorch
+           python-torchvision
+           (list onnxruntime "python")))
+    (home-page "https://github.com/microsoft/onnxscript";)
+    (synopsis "ONNX Script enables authoring ONNX models in Python")
+    (description "This package enables developers to author ONNX models
+using a Python-based domain-specific language.")
+    (license license:expat)))

Reply via email to