~ruther/guix-local

faac2082a69d0e9a1c2c21b38489cc65ee509416 — Sharlatan Hellseher 7 months ago b2bac9d
gnu: orange: Update to 3.39.0-0.44e6628.

* gnu/packages/orange.scm (orange): Update to
44e66283aff4132614ef64a877f9ceef963588a7 commit, providing comparability
with GCC 14 and more. Use G-Expressions.
[source]: Switch to git-fetch.
[arguments] <tests?>: Disable for now.
[phases]{wrap-executable}: Place after 'wrap; adjust to include qtbase
and qtwayland.
[inputs]: Remove python-pyqt, python-pyqtwebengine, python-qtconsole,
qtbase-5, and qtsvg-5; add python-pyqt-6, python-pyqtwebengine-6,
python-packaging, python-xgboost, qtbase, qtsvg, and qtwayand.
[native-inputs]: Add python-recommonmark, python-setuptools, and
python-trubar.

Fixes: guix/guix#2938
Change-Id: I1aeda03087367df1611209738630333eb8a63f67
1 files changed, 52 insertions(+), 39 deletions(-)

M gnu/packages/orange.scm
M gnu/packages/orange.scm => gnu/packages/orange.scm +52 -39
@@ 22,6 22,7 @@
  #:use-module (guix build-system pyproject)
  #:use-module (guix build-system python)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix gexp)
  #:use-module (guix packages)
  #:use-module (gnu packages)


@@ 155,47 156,56 @@ GUI based workflow.  It is primarily used in the Orange framework.")
(define-public orange
  (package
    (name "orange")
    (version "3.32.0")
    ;; XXX: The latest commit provides comparability with GCC 14, revert to
    ;; git tag in the next refresh cycle.
    (properties '((commit . "44e66283aff4132614ef64a877f9ceef963588a7")
                  (revision . "0")))
    (version (git-version "3.39.0"
                          (assoc-ref properties 'revision)
                          (assoc-ref properties 'commit)))
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "Orange3" version))
       (method git-fetch)
       (uri (git-reference
              (url "https://github.com/biolab/orange3")
              (commit (assoc-ref properties 'commit))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "0pxjwisc209cdgpqlqazc2vlmr0iqz8ry862w7jx95zic54d9p5l"))))
    (build-system python-build-system)
        (base32 "0d2ws64y8chj77yw689pr98wndpiapbh0msxyjah5ki8lygflizs"))))
    (build-system pyproject-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'preparations
           (lambda _
             ;; Delete test that opens an outgoing connection.
             (delete-file "Orange/tests/test_url_reader.py")
             ;; This is a binary data file and it breaks runpath validation.
             (delete-file "Orange/tests/datasets/binary-blob.tab")
             ;; Skip the test which uses that binary file.
             (substitute* "Orange/tests/test_txt_reader.py"
               (("test_read_nonutf8_encoding") "_test_read_nonutf8_encoding"))
             ;; We use a correct version of PyQtWebEngine, but the build scripts
             ;; consider it incorrect anyways. Remove the constraint entirely to
             ;; work around this bug.
             (substitute* "requirements-pyqt.txt" (("PyQtWebEngine>=5.12") ""))))
         (add-before 'check 'pre-check
           ;; Tests need a writable home.
           (lambda _
             (setenv "HOME" "/tmp")
             (setenv "QT_QPA_PLATFORM" "offscreen")))
         (add-after 'install 'wrap-executable
           ;; Ensure that icons are found at runtime.
           (lambda* (#:key inputs outputs #:allow-other-keys)
             (let ((out (assoc-ref outputs "out")))
               (wrap-program (string-append out "/bin/orange-canvas")
                 `("QT_PLUGIN_PATH" prefix
                   ,(list (string-append (assoc-ref inputs "qtsvg")
                                         "/lib/qt5/plugins/"))))))))))
     (list
      ;; TODO: Figure out how to enable/fix tests: ImportError: cannot import
      ;; name '_variable' from partially initialized module 'Orange.data'
      #:tests? #f
      #:test-backend #~'unittest
      #:test-flags #~(list "-v" "Orange.tests" "Orange.widgets.tests")
      #:phases
      #~(modify-phases %standard-phases
          (add-before 'check 'pre-check
            ;; Tests need a writable home.
            (lambda _
              (setenv "HOME" "/tmp")
              (setenv "QT_QPA_PLATFORM" "offscreen")))
          (add-after 'wrap 'wrap-executable
            ;; Ensure that icons are found at runtime.
            (lambda _
              (wrap-program (string-append #$output "/bin/orange-canvas")
                `("QT_PLUGIN_PATH" prefix
                  ,(list (string-append
                          (string-join
                           (list #$(this-package-input "qtbase")
                                 #$(this-package-input "qtsvg")
                                 #$(this-package-input "qtwayland"))
                           "/lib/qt6/plugins:")
                          "/lib/qt6/plugins")))))))))
    (native-inputs
     (list python-cython))
     (list python-cython
           python-recommonmark
           python-setuptools
           python-trubar))
    (inputs
     (list bash-minimal
     (list bash-minimal ;for wrap
           python-anyqt
           python-baycomp
           python-bottleneck


@@ 212,21 222,24 @@ GUI based workflow.  It is primarily used in the Orange framework.")
           python-opentsne
           python-orange-canvas-core
           python-orange-widget-base
           python-packaging
           python-pandas
           python-pygments
           python-pyqt
           python-pyqt-6
           python-pyqtgraph
           python-pyqtwebengine
           python-pyqtwebengine-6
           python-pyyaml
           python-qtconsole
           python-requests
           python-scikit-learn
           python-scipy
           python-serverfiles
           python-xgboost
           python-xlrd
           python-xlsxwriter
           qtbase-5
           qtsvg-5
           qtbase
           qtsvg
           qtwayland
           xdg-utils))
    (home-page "https://orangedatamining.com/")
    (synopsis "Component-based data mining framework")