From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 8MVEN9KvtmBLMQEAgWs5BA (envelope-from ) for ; Wed, 02 Jun 2021 00:08:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id YOyeMtKvtmB8OQAAB5/wlQ (envelope-from ) for ; Tue, 01 Jun 2021 22:08:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6A30B236C6 for ; Wed, 2 Jun 2021 00:08:18 +0200 (CEST) Received: from localhost ([::1]:38092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loCYa-0001R5-Kc for larch@yhetil.org; Tue, 01 Jun 2021 18:08:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38148) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loCYN-000197-6w for guix-patches@gnu.org; Tue, 01 Jun 2021 18:08:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54813) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1loCYM-00011O-Vj for guix-patches@gnu.org; Tue, 01 Jun 2021 18:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1loCYM-0003RJ-RL for guix-patches@gnu.org; Tue, 01 Jun 2021 18:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48785] [PATCH 3/3] gnu: Add python-lightgbm. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 01 Jun 2021 22:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48785 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48785@debbugs.gnu.org Cc: Vinicius Monego Received: via spool by 48785-submit@debbugs.gnu.org id=B48785.162258524313160 (code B ref 48785); Tue, 01 Jun 2021 22:08:02 +0000 Received: (at 48785) by debbugs.gnu.org; 1 Jun 2021 22:07:23 +0000 Received: from localhost ([127.0.0.1]:38124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1loCXi-0003QB-Vx for submit@debbugs.gnu.org; Tue, 01 Jun 2021 18:07:23 -0400 Received: from mout01.posteo.de ([185.67.36.65]:38003) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1loCXh-0003Pp-6m for 48785@debbugs.gnu.org; Tue, 01 Jun 2021 18:07:21 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id B349A240027 for <48785@debbugs.gnu.org>; Wed, 2 Jun 2021 00:07:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1622585235; bh=fWDkpn3y+GvpLB3TvwB7ap+RXVf/PA9pUY2CkAYgBN4=; h=From:To:Cc:Subject:Date:From; b=k5HQ2+JWPpou8ahmjs3IIlQcppYKt943O1B79VrvDNF3gM/88K/ngq7X6iCUtLQWG v5DYLnCj4QyLFOpf8QU9qI1bG2Hsvkb5Swo2g8tnlCYZAPg1hKvztATHb0F1wRfB8F 3/lapK/jYCddf+HSWu1lLYa/6jEytkPzKtcArNSWyImT32idIC5FhwVX+2BIhcPWvI kynpFa7FIn7e2/nknRejfPLkGwNf6tdHhDWlTqsPOjRFSH/hcDhGVBuJpqtsHR1I+c aQHtLs70W0sCkz57kSqDPb6DucGOfHppJo7P03y77zYK6bQX5Jlf0Cj4TzHTtQHqvW EP1INidwfquFA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FvmVB3V35z6tmQ; Wed, 2 Jun 2021 00:07:14 +0200 (CEST) From: Vinicius Monego Date: Tue, 1 Jun 2021 22:06:43 +0000 Message-Id: <20210601220643.78439-3-monego@posteo.net> In-Reply-To: <20210601220643.78439-1-monego@posteo.net> References: <20210601220643.78439-1-monego@posteo.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622585298; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=uHev9rFcvieNR4RceqfrR6GiUUGl5lYZmTkBTy0vQq8=; b=mSY4M1B7JpYAUGVKkW4ttDO8V51roUMCwugvTMAae4IPD8fXTQj57Nk4LTRCOy9kH0FE7r wXbCLbds0LOWjWgPqLbfHOjCVq85r+tV03pLLTLjAlJk8cztcX036YUJZjSrQT7pFpLEVP +49SsJ6DiXpRRiSkZZ7NFKGeTR8ShcgD6mqok/0NP1So3VeHkV2loWunmv0pw52swtD/7+ aBVZt78a7ecW089LfIcqCDDOesyVlmkui4hjdNjLPdJQJdThojNONAjmqr63kvUDJo/nqN ON122gjA/S8jOmu9lI+UR9wHt5nO947YmNxvBCSvW86BuqRG0XIY0rwu9tPESw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622585298; a=rsa-sha256; cv=none; b=QzrriG/4Im7rn+qr4Ie2X0AMGMbWbldJPG6z+lqesH8DSH+w8j+5vW7oCPQyTbMLi5L/e1 tRr/9hR0RqDAd+d3HQw55QHLK58Av3sSfdkiQhcOJGh6LBRKQsTYoXrDOKwI8OB0DUVJOX VMI5u+I0pRMERTUbJADw0ou6ftb8QYI0sc73UCfyzObsErKagf3K/W/CRyOQZxGAMXZ9T0 GCajUKd1vIX3WZbh9f4OMdx94SnVMfEsk1dE+idOnghxRy6T9jrSmZxHkVFVJtapKi1zTW UKrs6gFJUfMnaxK1xTKupzCkCeqtSS9u1lj3aspUWzh1tdYckgicQkjhxcfFqA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=k5HQ2+JW; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 3.67 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=k5HQ2+JW; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 6A30B236C6 X-Spam-Score: 3.67 X-Migadu-Scanner: scn1.migadu.com X-TUID: GsUmpbzCDGXm * 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