1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2021, 2022 Vinicius Monego <monego@posteo.net>
4 ;;; This file is part of GNU Guix.
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19 (define-module (gnu packages orange)
20 #:use-module ((guix licenses) #:prefix license:)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system python)
24 #:use-module (gnu packages)
25 #:use-module (gnu packages freedesktop)
26 #:use-module (gnu packages graph)
27 #:use-module (gnu packages machine-learning)
28 #:use-module (gnu packages python-crypto)
29 #:use-module (gnu packages python-science)
30 #:use-module (gnu packages python-web)
31 #:use-module (gnu packages python-xyz)
32 #:use-module (gnu packages qt))
34 (define-public python-orange-canvas-core
36 (name "python-orange-canvas-core")
41 (uri (pypi-uri "orange-canvas-core" version))
43 (base32 "0m3dszdkc5bc80ahcvrqxz8jahs33js9cx1mc6rc9ihysq2ddnfz"))))
44 (build-system python-build-system)
47 (modify-phases %standard-phases
48 (add-before 'check 'check-setup
50 ;; This test fails with: RuntimeError: Event loop is closed.
51 (substitute* "orangecanvas/application/tests/test_mainwindow.py"
52 (("test_help_requests") "_test_help_requests"))
53 (setenv "HOME" "/tmp")
54 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
63 (home-page "https://github.com/biolab/orange-canvas-core")
64 (synopsis "Core component of Orange Canvas")
66 "Orange Canvas Core is a framework for building graphical user interfaces
67 for editing workflows. It is a component used to build the Orange Canvas
68 data-mining application.")
69 (license license:gpl3)))
71 (define-public python-orange-widget-base
73 (name "python-orange-widget-base")
78 (uri (pypi-uri "orange-widget-base" version))
80 (base32 "0a0sijsvzijj71sxq8ckpgz59z1cq9sxn4fya3z23ibdzjzwrsi7"))))
81 (build-system python-build-system)
83 `(;; unittest fails to load one test, all other tests are passing:
84 ;; AttributeError: module 'orangewidget' has no attribute 'version'.
87 (modify-phases %standard-phases
88 (add-before 'check 'check-setup
90 (setenv "HOME" "/tmp")
91 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
93 (list python-anyqt python-matplotlib python-orange-canvas-core
94 python-pyqtgraph python-typing-extensions))
95 (home-page "https://github.com/biolab/orange-widget-base")
96 (synopsis "Base Widget for Orange Canvas")
98 "Orange Widget Base provides a base widget component for a interactive
99 GUI based workflow. It is primarily used in the Orange framework.")
100 (license license:gpl3+)))
102 (define-public orange
109 (uri (pypi-uri "Orange3" version))
111 (base32 "0pxjwisc209cdgpqlqazc2vlmr0iqz8ry862w7jx95zic54d9p5l"))))
112 (build-system python-build-system)
115 (modify-phases %standard-phases
116 (add-after 'unpack 'preparations
118 ;; Delete test that opens an outgoing connection.
119 (delete-file "Orange/tests/test_url_reader.py")
120 ;; This is a binary data file and it breaks runpath validation.
121 (delete-file "Orange/tests/datasets/binary-blob.tab")
122 ;; Skip the test which uses that binary file.
123 (substitute* "Orange/tests/test_txt_reader.py"
124 (("test_read_nonutf8_encoding") "_test_read_nonutf8_encoding"))
125 ;; We use a correct version of PyQtWebEngine, but the build scripts
126 ;; consider it incorrect anyways. Remove the constraint entirely to
127 ;; work around this bug.
128 (substitute* "requirements-pyqt.txt" (("PyQtWebEngine>=5.12") ""))))
129 (add-before 'check 'pre-check
130 ;; Tests need a writable home.
132 (setenv "HOME" "/tmp")
133 (setenv "QT_QPA_PLATFORM" "offscreen")))
134 (add-after 'install 'wrap-executable
135 ;; Ensure that icons are found at runtime.
136 (lambda* (#:key inputs outputs #:allow-other-keys)
137 (let ((out (assoc-ref outputs "out")))
138 (wrap-program (string-append out "/bin/orange-canvas")
139 `("QT_PLUGIN_PATH" prefix
140 ,(list (string-append (assoc-ref inputs "qtsvg")
141 "/lib/qt5/plugins/"))))))))))
143 (list python-cython))
159 python-orange-canvas-core
160 python-orange-widget-base
163 python-pyqt-without-qtwebkit
177 (home-page "https://orangedatamining.com/")
178 (synopsis "Component-based data mining framework")
180 "Orange is a component-based, graphical framework for machine learning,
181 data analysis, data mining and data visualization.")
182 (license license:gpl3+)))
184 (define-public python-serverfiles
186 (name "python-serverfiles")
191 (uri (pypi-uri "serverfiles" version))
193 (base32 "1qgbzgnaxj4wsp2rdas53qxsh0j7xpibq25w6lviwyaqwwrgq42y"))))
194 (build-system python-build-system)
196 (list python-requests))
197 (home-page "https://github.com/biolab/serverfiles")
198 (synopsis "Utility to access files on a HTTP server and store them locally")
200 "This package provides an utility that accesses files on a HTTP server
201 and stores them locally for reuse. It is primarily used by the Orange
203 (license license:gpl3+)))