all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 69cb721daadcb61b55e0b5aeabf39bbd233dd4c8 2662 bytes (raw)
name: gnu/packages/patches/lightgbm-python-use-system-lib-lightgbm.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
 
From c73be84d8ec6ac71dfdaa71b7943ae344f5d7cde Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Tue, 1 Jun 2021 00:24:38 -0300
Subject: [PATCH] Use system lib_lightgbm.

---
 python-package/lightgbm/libpath.py |  4 ++++
 python-package/setup.py            | 12 ++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/python-package/lightgbm/libpath.py b/python-package/lightgbm/libpath.py
index 6533792..27af2b9 100644
--- a/python-package/lightgbm/libpath.py
+++ b/python-package/lightgbm/libpath.py
@@ -17,8 +17,12 @@ def find_lib_path() -> List[str]:
         # we don't need lib_lightgbm while building docs
         return []
 
+    # This variable will be set during substitution.
+    lib_lightgbm_path = ''
+
     curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
     dll_path = [curr_path,
+                lib_lightgbm_path,
                 os.path.join(curr_path, '../../'),
                 os.path.join(curr_path, 'compile'),
                 os.path.join(curr_path, '../compile'),
diff --git a/python-package/setup.py b/python-package/setup.py
index ee98b1a..2f7ce38 100644
--- a/python-package/setup.py
+++ b/python-package/setup.py
@@ -231,7 +231,7 @@ class CustomInstall(install):
         self.opencl_library = None
         self.mpi = 0
         self.hdfs = 0
-        self.precompile = 0
+        self.precompile = 1
         self.nomp = 0
         self.bit32 = 0
 
@@ -274,7 +274,7 @@ class CustomBdistWheel(bdist_wheel):
         self.opencl_library = None
         self.mpi = 0
         self.hdfs = 0
-        self.precompile = 0
+        self.precompile = 1
         self.nomp = 0
         self.bit32 = 0
 
@@ -324,7 +324,10 @@ if __name__ == "__main__":
         copy_file(os.path.join(CURRENT_DIR, os.path.pardir, 'VERSION.txt'),
                   os.path.join(CURRENT_DIR, 'lightgbm', 'VERSION.txt'),
                   verbose=0)  # type:ignore
-    version = open(os.path.join(CURRENT_DIR, 'lightgbm', 'VERSION.txt'), encoding='utf-8').read().strip()
+
+    # This variable will be set during substitution.
+    version = ''
+
     readme = open(os.path.join(CURRENT_DIR, 'README.rst'), encoding='utf-8').read()
 
     sys.path.insert(0, CURRENT_DIR)
@@ -355,7 +358,8 @@ if __name__ == "__main__":
           zip_safe=False,
           cmdclass={
               'install': CustomInstall,
-              'install_lib': CustomInstallLib,
+              # Lib will be loaded from the lightgbm package.
+              # 'install_lib': CustomInstallLib,
               'bdist_wheel': CustomBdistWheel,
               'sdist': CustomSdist,
           },
-- 
2.31.1


debug log:

solving 69cb721daa ...
found 69cb721daa in https://yhetil.org/guix/20210601220643.78439-2-monego@posteo.net/

applying [1/1] https://yhetil.org/guix/20210601220643.78439-2-monego@posteo.net/
diff --git a/gnu/packages/patches/lightgbm-python-use-system-lib-lightgbm.patch b/gnu/packages/patches/lightgbm-python-use-system-lib-lightgbm.patch
new file mode 100644
index 0000000000..69cb721daa

1:24: trailing whitespace.
 
1:46: trailing whitespace.
 
1:55: trailing whitespace.
 
1:66: trailing whitespace.
 
1:78: trailing whitespace.
-- 
Checking patch gnu/packages/patches/lightgbm-python-use-system-lib-lightgbm.patch...
Applied patch gnu/packages/patches/lightgbm-python-use-system-lib-lightgbm.patch cleanly.
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.

index at:
100644 69cb721daadcb61b55e0b5aeabf39bbd233dd4c8	gnu/packages/patches/lightgbm-python-use-system-lib-lightgbm.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

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.