diff --git a/README.md b/README.md index 98b2586..fd5a498 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Summary: LightGBM is a gradient boosting framework that uses tree based learning Development: https://github.com/microsoft/LightGBM -Documentation: https://lightgbm.readthedocs.io/en/v4.5.0/ +Documentation: https://lightgbm.readthedocs.io/en/v4.6.0/ A fast, distributed, high performance gradient boosting (GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks. diff --git a/recipe/boost_shared.diff b/recipe/boost_shared.diff deleted file mode 100644 index 56f0693..0000000 --- a/recipe/boost_shared.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- CMakeLists.txt 2022-11-09 06:37:21.000000000 -0600 -+++ CMakeLists.txt 2024-06-26 09:35:55.336166188 -0500 -@@ -187,13 +187,13 @@ - include_directories(${OpenCL_INCLUDE_DIRS}) - message(STATUS "OpenCL include directory: " ${OpenCL_INCLUDE_DIRS}) - if(WIN32) -- set(Boost_USE_STATIC_LIBS ON) -+ set(Boost_USE_STATIC_LIBS OFF) - endif() - find_package(Boost 1.56.0 COMPONENTS filesystem system REQUIRED) - if(WIN32) - # disable autolinking in boost - add_definitions(-DBOOST_ALL_NO_LIB) - endif() - include_directories(${Boost_INCLUDE_DIRS}) - add_definitions(-DUSE_GPU) - endif() diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c3f4890..28bed03 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set version = "4.5.0" %} +{% set version = "4.6.0" %} package: name: liblightgbm @@ -6,15 +6,15 @@ package: source: url: https://pypi.org/packages/source/l/lightgbm/lightgbm-{{ version }}.tar.gz - sha256: e1cd7baf0318d4e308a26575a63a4635f08df866ad3622a9d8e3d71d9637a1ba + sha256: cb1c59720eb569389c0ba74d14f52351b573af489f230032a1c9f314f8bab7fe patches: - - boost_shared.diff + - patches/0001-boost-shared.patch # Taken from https://github.com/microsoft/LightGBM/blob/v4.5.0/build-python.sh#L308-L316 # except that we don't copy lib_lightgbm.so to SP_DIR - - use_precompiled.diff + - patches/0002-use-precompiled.patch build: - number: 4 + number: 0 string: cuda_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version != "None"] string: cpu_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }} # [cuda_compiler_version == "None"] # CUDA is not supported in windows @@ -80,7 +80,7 @@ outputs: - dask >=2.0.0 - pandas >=0.24.0 - pyarrow >=6.0.1 - - scikit-learn !=0.22.0 + - scikit-learn >=0.24.2 test: files: - python_run_test.py diff --git a/recipe/patches/0001-boost-shared.patch b/recipe/patches/0001-boost-shared.patch new file mode 100644 index 0000000..374fa40 --- /dev/null +++ b/recipe/patches/0001-boost-shared.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -191,7 +191,7 @@ if(USE_GPU) + include_directories(${OpenCL_INCLUDE_DIRS}) + message(STATUS "OpenCL include directory: " ${OpenCL_INCLUDE_DIRS}) + if(WIN32) +- set(Boost_USE_STATIC_LIBS ON) ++ set(Boost_USE_STATIC_LIBS OFF) + endif() + find_package(Boost 1.56.0 COMPONENTS filesystem system REQUIRED) + if(WIN32) diff --git a/recipe/use_precompiled.diff b/recipe/patches/0002-use-precompiled.patch similarity index 79% rename from recipe/use_precompiled.diff rename to recipe/patches/0002-use-precompiled.patch index 5383409..ab7fcfe 100644 --- a/recipe/use_precompiled.diff +++ b/recipe/patches/0002-use-precompiled.patch @@ -1,8 +1,8 @@ diff --git a/lightgbm/libpath.py b/lightgbm/libpath.py -index a55e736..0ee2c7f 100644 +index 0e6b8425..a6f843c0 100644 --- a/lightgbm/libpath.py +++ b/lightgbm/libpath.py -@@ -4,6 +4,7 @@ +@@ -6,6 +6,7 @@ from os import environ from pathlib import Path from platform import system from typing import List @@ -10,7 +10,7 @@ index a55e736..0ee2c7f 100644 __all__: List[str] = [] -@@ -16,15 +17,14 @@ def find_lib_path() -> List[str]: +@@ -18,15 +19,14 @@ def _find_lib_path() -> List[str]: lib_path: list of str List of all found library paths to LightGBM. """ @@ -31,32 +31,32 @@ index a55e736..0ee2c7f 100644 dll_path = [p / "lib_lightgbm.dll" for p in dll_path] elif system() == "Darwin": dll_path = [p / "lib_lightgbm.dylib" for p in dll_path] -diff --git a/pyproject.toml b/pyproject.toml -index 6234464..74de135 100644 +diff --git a//pyproject.toml b/pyproject.toml +index fa281078..3e35059f 100644 --- a/pyproject.toml +++ b/pyproject.toml -@@ -54,35 +54,11 @@ documentation = "https://lightgbm.readthedocs.io/en/latest/" +@@ -55,35 +55,11 @@ documentation = "https://lightgbm.readthedocs.io/en/latest/" repository = "https://github.com/microsoft/LightGBM.git" changelog = "https://github.com/microsoft/LightGBM/releases" -# start:build-system [build-system] - --requires = ["scikit-build-core>=0.9.3"] +-requires = ["scikit-build-core>=0.10.1"] -build-backend = "scikit_build_core.build" - -# based on https://github.com/scikit-build/scikit-build-core#configuration -[tool.scikit-build] - --cmake.version = ">=3.18" +-cmake.version = "CMakeLists.txt" -ninja.version = ">=1.11" -ninja.make-fallback = true -cmake.args = [ - "-D__BUILD_FOR_PYTHON:BOOL=ON" -] --cmake.verbose = false +-build.verbose = false -cmake.build-type = "Release" --cmake.targets = ["_lightgbm"] +-build.targets = ["_lightgbm"] -# stripping binaries should be turned back on once this is fixed: -# https://github.com/jameslamb/pydistcheck/issues/235 -install.strip = false @@ -65,7 +65,7 @@ index 6234464..74de135 100644 -wheel.py-api = "py3" -experimental = false -strict-config = false --minimum-version = "0.9.3" +-minimum-version = "build-system.requires" - -# end:build-system +requires = ["setuptools"] @@ -73,5 +73,5 @@ index 6234464..74de135 100644 +[tool.setuptools.packages] +find = {} - [tool.isort] - include_trailing_comma = true + [tool.mypy] + disallow_untyped_defs = true