-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-python/lightgbm: new package, add 4.5.0
Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
- Loading branch information
1 parent
cba66fe
commit 710b668
Showing
4 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DIST lightgbm-4.5.0.tar.gz 1701072 BLAKE2B 1323d27ad7f34b43699c7d6605d34a6cbca4c85ace1ffdecfd3d169132c6bf97ae23b48634957af093d235f37c85d7ad157a16d93b15eab4ad5bae38ac938aff SHA512 66cf32bd9dc9cd74629052e59b6fe8e404c264a9ef529d40b073685c5ded9a1deb028e78b7ccff48cfe78f29fcc9746ec957a38b14d86c7fa89fd3ed88fbf6ac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Index: lightgbm-4.5.0/lightgbm/basic.py | ||
=================================================================== | ||
--- lightgbm-4.5.0.orig/lightgbm/basic.py | ||
+++ lightgbm-4.5.0/lightgbm/basic.py | ||
@@ -261,8 +261,7 @@ def _log_callback(msg: bytes) -> None: | ||
|
||
def _load_lib() -> ctypes.CDLL: | ||
"""Load LightGBM library.""" | ||
- lib_path = find_lib_path() | ||
- lib = ctypes.cdll.LoadLibrary(lib_path[0]) | ||
+ lib = ctypes.cdll.LoadLibrary("lib_lightgbm.so") | ||
lib.LGBM_GetLastError.restype = ctypes.c_char_p | ||
callback = ctypes.CFUNCTYPE(None, ctypes.c_char_p) | ||
lib.callback = callback(_log_callback) # type: ignore[attr-defined] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Copyright 1999-2022 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
|
||
PYTHON_COMPAT=( python3_{10..12} ) | ||
DISTUTILS_USE_PEP517=scikit-build-core | ||
|
||
inherit distutils-r1 pypi | ||
|
||
DESCRIPTION="LightGBM Python Package" | ||
HOMEPAGE="https://github.com/microsoft/LightGBM" | ||
SRC_URI="$(pypi_sdist_url "${PN^}" "${PV}")" | ||
|
||
LICENSE="MIT" | ||
SLOT="0" | ||
KEYWORDS="~amd64" | ||
|
||
RDEPEND="dev-python/wheel[${PYTHON_USEDEP}] | ||
dev-python/numpy[${PYTHON_USEDEP}] | ||
dev-python/scipy[${PYTHON_USEDEP}] | ||
dev-python/scikit-learn[${PYTHON_USEDEP}] | ||
sci-libs/lightgbm" | ||
distutils_enable_tests pytest | ||
|
||
PATCHES=( "${FILESDIR}/${PN}-4.5.0-loadlib.patch" ) | ||
|
||
python_compile() { | ||
SKBUILD_WHEEL_CMAKE=false distutils-r1_python_compile | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<email>heroxbd@gentoo.org</email> | ||
</maintainer> | ||
<upstream> | ||
<remote-id type="github">microsoft/LightGBM</remote-id> | ||
<remote-id type="pypi">Lightgbm</remote-id> | ||
</upstream> | ||
</pkgmetadata> |