all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vinicius Monego <monego@posteo.net>
To: 48785@debbugs.gnu.org
Cc: Vinicius Monego <monego@posteo.net>
Subject: [bug#48785] [PATCH 3/3] gnu: Add python-lightgbm.
Date: Tue,  1 Jun 2021 22:06:43 +0000	[thread overview]
Message-ID: <20210601220643.78439-3-monego@posteo.net> (raw)
In-Reply-To: <20210601220643.78439-1-monego@posteo.net>

* gnu/packages/machine-learning.scm (python-lightgbm): New variable.
---
 gnu/packages/machine-learning.scm | 43 +++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 1a3f647dde..900ca15b28 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1110,6 +1110,49 @@ the following advantages:
 @end itemize\n")
     (license license:expat)))
 
+(define-public python-lightgbm
+  (package
+    (inherit lightgbm)
+    (name "python-lightgbm")
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'preparations
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "HOME" "/tmp") ;to write a log file
+             ;; Move Python files to source root to silence some warnings.
+             (rename-file "python-package/setup.py" "setup.py")
+             (rename-file "python-package/README.rst" "README.rst")
+             (rename-file "python-package/lightgbm" "lightgbm")
+             (substitute* "setup.py"
+               (("version = ''")
+                (string-append "version = " "'"
+                               ,(package-version lightgbm) "'")))
+             (substitute* "lightgbm/libpath.py"
+               (("lib_lightgbm_path = ''")
+                (string-append "lib_lightgbm_path = " "'"
+                               (assoc-ref inputs "lightgbm")
+                               "/lib" "'")))))
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "python" "-m" "pytest"
+                       "tests/python_package_test")))))))
+    (native-inputs
+     `(("python-psutil" ,python-psutil)
+       ("python-pytest" ,python-pytest)
+       ("python-wheel" ,python-wheel)))
+    (inputs
+     `(("lightgbm" ,lightgbm)))
+    (propagated-inputs
+     `(("python-numpy" ,python-numpy)
+       ("python-pandas" ,python-pandas)
+       ("python-scipy" ,python-scipy)
+       ("python-scikit-learn" ,python-scikit-learn)))
+    (synopsis "Python frontend for LightGBM")))
+
 (define-public vowpal-wabbit
   ;; Language bindings not included.
   (package
-- 
2.31.1





  parent reply	other threads:[~2021-06-01 22:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 22:05 [bug#48785] [PATCH 0/3] Update LightGBM and split frontends Vinicius Monego
2021-06-01 22:06 ` [bug#48785] [PATCH 1/3] gnu: Add fast-double-parser Vinicius Monego
2021-06-01 22:06   ` [bug#48785] [PATCH 2/3] gnu: lightgbm: Update to 3.2.1 Vinicius Monego
2021-06-01 22:06   ` Vinicius Monego [this message]
2021-06-30 20:09 ` [bug#48785] [PATCH v2 1/3] gnu: Add fast-double-parser Vinicius Monego
2021-06-30 20:09   ` [bug#48785] [PATCH v2 2/3] gnu: lightgbm: Update to 3.2.1 Vinicius Monego
2021-06-30 20:09   ` [bug#48785] [PATCH v2 3/3] gnu: Add python-lightgbm Vinicius Monego
2021-10-08  2:54 ` [bug#48785] [PATCH v3 1/3] gnu: Add fast-double-parser Vinicius Monego
2021-10-08  2:54   ` [bug#48785] [PATCH v3 2/3] gnu: lightgbm: Update to 3.2.1 Vinicius Monego
2021-10-08  2:54   ` [bug#48785] [PATCH v3 3/3] gnu: Add python-lightgbm Vinicius Monego
2021-10-31  1:40 ` [bug#48785] [PATCH v4 1/3] gnu: Add fast-double-parser Vinicius Monego
2021-10-31  1:40   ` [bug#48785] [PATCH v4 2/3] gnu: lightgbm: Update to 3.3.1 Vinicius Monego
2021-10-31  1:40   ` [bug#48785] [PATCH v4 3/3] gnu: Add python-lightgbm Vinicius Monego
2023-04-07 15:17 ` [bug#48785] [PATCH v5 1/3] gnu: Add fast-double-parser Vinicius Monego
2023-04-07 15:17   ` [bug#48785] [PATCH v5 2/3] gnu: lightgbm: Update to 3.3.5 Vinicius Monego
2023-04-07 15:17   ` [bug#48785] [PATCH v5 3/3] gnu: Add python-lightgbm Vinicius Monego
2023-06-26  1:06 ` [bug#48785] [PATCH v6 1/3] gnu: Add fast-double-parser Vinicius Monego
2023-06-26  1:06   ` [bug#48785] [PATCH v6 2/3] gnu: lightgbm: Update to 3.3.5 Vinicius Monego
2023-06-26  1:06   ` [bug#48785] [PATCH v6 3/3] gnu: Add python-lightgbm Vinicius Monego

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210601220643.78439-3-monego@posteo.net \
    --to=monego@posteo.net \
    --cc=48785@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.