diff mbox series

[bug#47976,v2,10/10] gnu: Add orange.

Message ID 20210425032608.124210-10-monego@posteo.net
State Accepted
Headers show
Series [bug#47976,v2,01/10] gnu: Add python-anyqt. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Vinicius Monego April 25, 2021, 3:26 a.m. UTC
* gnu/packages/orange.scm (orange): New variable.
---
Removed httpx version substitution, rewritten description.

 gnu/packages/orange.scm | 85 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 85 insertions(+)

Comments

Leo Famulari April 25, 2021, 6:59 p.m. UTC | #1
On Sun, Apr 25, 2021 at 03:26:08AM +0000, Vinicius Monego wrote:
> * gnu/packages/orange.scm (orange): New variable.

Thanks for the v2 patches.

I pushed as 5461efe81f680b577cb12ba7d003e38009628b81 after making the
following changes:

> +             ;; Relax some dependency versions.
> +             (substitute* "requirements-gui.txt" (("PyQtWebEngine>=5.12") ""))

I rewrote this comment to explain the reason for the substitution.

Like I said, we do not change version constraints that are chosen by
upstream developers without a good reason, and so this comment was not
sufficient.

> +       ("python-louvain" ,python-python-louvain)

I missed this in the first round of review but, as specified in our
manual section Python Modules, we don't name packages
"python-python-foo", but instead just "python-foo".

After I changed it, I realized that we already have a python-louvain
package.

Anyways, I changed the pre-existing python-louvain package to be called
python-louvain-0.6, adjusted its user, and renamed your package to
python-louvain.

It would be nice to check if python-scanpy, which uses
python-louvain-0.6, can instead use python-louvain.

Let us know if you want advice about how to handle this situation in the
future.
diff mbox series

Patch

diff --git a/gnu/packages/orange.scm b/gnu/packages/orange.scm
index 97be36e489..19014c748d 100644
--- a/gnu/packages/orange.scm
+++ b/gnu/packages/orange.scm
@@ -22,6 +22,11 @@ 
   #:use-module (guix download)
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
+  #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages graph)
+  #:use-module (gnu packages machine-learning)
+  #:use-module (gnu packages python-crypto)
+  #:use-module (gnu packages python-science)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt))
@@ -100,6 +105,86 @@  data-mining application.")
 GUI based workflow.  It is primarily used in the Orange framework.")
     (license license:gpl3+)))
 
+(define-public orange
+  (package
+    (name "orange")
+    (version "3.28.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "Orange3" version))
+       (sha256
+        (base32 "1ac4xjjkx06z10hl7k0zh1z3qhkl5vng15l9jkpkmck9spinbzil"))))
+    (build-system python-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"))
+             ;; Relax some dependency versions.
+             (substitute* "requirements-gui.txt" (("PyQtWebEngine>=5.12") ""))
+             #t))
+         (add-before 'check 'set-HOME
+           ;; Tests need a writable home.
+           (lambda _ (setenv "HOME" "/tmp") #t))
+         (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/")))))
+             #t)))))
+    (native-inputs
+     `(("python-cython" ,python-cython)))
+    (inputs
+     `(("python-anyqt" ,python-anyqt)
+       ("python-baycomp" ,python-baycomp)
+       ("python-bottleneck" ,python-bottleneck)
+       ("python-chardet" ,python-chardet)
+       ("python-httpx" ,python-httpx)
+       ("python-joblib" ,python-joblib)
+       ("python-keyring" ,python-keyring)
+       ("python-keyrings.alt" ,python-keyrings.alt)
+       ("python-louvain" ,python-python-louvain)
+       ("python-matplotlib" ,python-matplotlib)
+       ("python-networkx" ,python-networkx)
+       ("python-numpy" ,python-numpy)
+       ("python-openpyxl" ,python-openpyxl)
+       ("python-opentsne" ,python-opentsne)
+       ("python-orange-canvas-core"
+        ,python-orange-canvas-core)
+       ("python-orange-widget-base"
+        ,python-orange-widget-base)
+       ("python-pandas" ,python-pandas)
+       ("python-pyqt" ,python-pyqt)
+       ("python-pyqtgraph" ,python-pyqtgraph)
+       ("python-pyqtwebengine" ,python-pyqtwebengine)
+       ("python-pyyaml" ,python-pyyaml)
+       ("python-requests" ,python-requests)
+       ("python-scikit-learn" ,python-scikit-learn)
+       ("python-scipy" ,python-scipy)
+       ("python-serverfiles" ,python-serverfiles)
+       ("python-xlrd" ,python-xlrd)
+       ("python-xlsxwriter" ,python-xlsxwriter)
+       ("qtbase" ,qtbase)
+       ("qtsvg" ,qtsvg)
+       ("xdg-utils" ,xdg-utils)))
+    (home-page "https://orangedatamining.com/")
+    (synopsis "Component-based data mining framework")
+    (description
+     "Orange is a component-based, graphical framework for machine learning,
+data analysis, data mining and data visualization.")
+    (license license:gpl3+)))
+
 (define-public python-serverfiles
   (package
     (name "python-serverfiles")