From 1eac8429ce035dbbe54eeed66628519c20bb4bd8 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 14 Feb 2025 22:18:43 -0600 Subject: [PATCH 1/8] lightgbm v4.6.0 --- recipe/meta.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index c3f4890..7864170 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,7 +6,7 @@ package: source: url: https://pypi.org/packages/source/l/lightgbm/lightgbm-{{ version }}.tar.gz - sha256: e1cd7baf0318d4e308a26575a63a4635f08df866ad3622a9d8e3d71d9637a1ba + sha256: cb1c59720eb569389c0ba74d14f52351b573af489f230032a1c9f314f8bab7fe patches: - boost_shared.diff # Taken from https://github.com/microsoft/LightGBM/blob/v4.5.0/build-python.sh#L308-L316 @@ -14,7 +14,7 @@ source: - use_precompiled.diff 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 From 316f62eb0772cdecc06c4effa488981c9cbc5b4f Mon Sep 17 00:00:00 2001 From: "conda-forge-webservices[bot]" <91080706+conda-forge-webservices[bot]@users.noreply.github.com> Date: Sat, 15 Feb 2025 04:23:03 +0000 Subject: [PATCH 2/8] MNT: Re-rendered with conda-build 25.1.2, conda-smithy 3.45.4, and conda-forge-pinning 2025.02.15.02.01.29 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From 6ce80ca5731d5d34e0c3a1167601ae3221a28b49 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 14 Feb 2025 22:23:38 -0600 Subject: [PATCH 3/8] update scikit-learn run dep --- recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 7864170..b703b23 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -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 From 5e3cf5e71083f134db007ad4b792d87e5d2ec6c9 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 14 Feb 2025 22:56:40 -0600 Subject: [PATCH 4/8] update Boost patch --- recipe/boost_shared.diff | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/recipe/boost_shared.diff b/recipe/boost_shared.diff index 56f0693..64ffa1e 100644 --- a/recipe/boost_shared.diff +++ b/recipe/boost_shared.diff @@ -1,17 +1,11 @@ ---- CMakeLists.txt 2022-11-09 06:37:21.000000000 -0600 -+++ CMakeLists.txt 2024-06-26 09:35:55.336166188 -0500 -@@ -187,13 +187,13 @@ +--- ../../LightGBM/CMakeLists.txt 2025-02-14 22:53:20 ++++ ./CMakeLists.txt 2025-02-13 14:26:56 +@@ -191,7 +191,7 @@ 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) +- set(Boost_USE_STATIC_LIBS OFF) ++ set(Boost_USE_STATIC_LIBS ON) 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() From 5e8acf638e600bafa8708aa54786ddfdf72a1bf0 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 14 Feb 2025 23:00:20 -0600 Subject: [PATCH 5/8] reformat patch --- recipe/boost_shared.diff | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/recipe/boost_shared.diff b/recipe/boost_shared.diff index 64ffa1e..374fa40 100644 --- a/recipe/boost_shared.diff +++ b/recipe/boost_shared.diff @@ -1,11 +1,11 @@ ---- ../../LightGBM/CMakeLists.txt 2025-02-14 22:53:20 -+++ ./CMakeLists.txt 2025-02-13 14:26:56 -@@ -191,7 +191,7 @@ +--- 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 OFF) -+ set(Boost_USE_STATIC_LIBS ON) +- 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) From 72bfe1c274e70ec1bfb711cd5992c1c4b0a2414c Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 14 Feb 2025 23:12:35 -0600 Subject: [PATCH 6/8] update use_precompiled patch too --- recipe/use_precompiled.diff | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/recipe/use_precompiled.diff b/recipe/use_precompiled.diff index 5383409..63205ad 100644 --- a/recipe/use_precompiled.diff +++ b/recipe/use_precompiled.diff @@ -1,8 +1,8 @@ -diff --git a/lightgbm/libpath.py b/lightgbm/libpath.py -index a55e736..0ee2c7f 100644 ---- a/lightgbm/libpath.py -+++ b/lightgbm/libpath.py -@@ -4,6 +4,7 @@ +diff --git a/python-package/lightgbm/libpath.py b/python-package/lightgbm/libpath.py +index 0e6b8425..a6f843c0 100644 +--- a/python-package/lightgbm/libpath.py ++++ b/python-package/lightgbm/libpath.py +@@ -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 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -54,35 +54,11 @@ documentation = "https://lightgbm.readthedocs.io/en/latest/" +diff --git a/python-package/pyproject.toml b/python-package/pyproject.toml +index fa281078..3e35059f 100644 +--- a/python-package/pyproject.toml ++++ b/python-package/pyproject.toml +@@ -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 From 094b3520852c9b9d37dae372ef97440303ce6dc6 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Fri, 14 Feb 2025 23:46:32 -0600 Subject: [PATCH 7/8] fix paths in use-precompiled, put all patches in a patches/ directory --- recipe/meta.yaml | 4 ++-- .../{boost_shared.diff => patches/0001-boost-shared.patch} | 0 .../0002-use-precompiled.patch} | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) rename recipe/{boost_shared.diff => patches/0001-boost-shared.patch} (100%) rename recipe/{use_precompiled.diff => patches/0002-use-precompiled.patch} (93%) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index b703b23..28bed03 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -8,10 +8,10 @@ source: url: https://pypi.org/packages/source/l/lightgbm/lightgbm-{{ version }}.tar.gz 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: 0 diff --git a/recipe/boost_shared.diff b/recipe/patches/0001-boost-shared.patch similarity index 100% rename from recipe/boost_shared.diff rename to recipe/patches/0001-boost-shared.patch diff --git a/recipe/use_precompiled.diff b/recipe/patches/0002-use-precompiled.patch similarity index 93% rename from recipe/use_precompiled.diff rename to recipe/patches/0002-use-precompiled.patch index 63205ad..2a363a1 100644 --- a/recipe/use_precompiled.diff +++ b/recipe/patches/0002-use-precompiled.patch @@ -1,7 +1,7 @@ -diff --git a/python-package/lightgbm/libpath.py b/python-package/lightgbm/libpath.py +diff --git a/lightgbm/libpath.py b/lightgbm/libpath.py index 0e6b8425..a6f843c0 100644 ---- a/python-package/lightgbm/libpath.py -+++ b/python-package/lightgbm/libpath.py +--- a/lightgbm/libpath.py ++++ b/lightgbm/libpath.py @@ -6,6 +6,7 @@ from os import environ from pathlib import Path from platform import system From 53c89a151260a121a6b8e3ddec790604af0be4f7 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Sat, 15 Feb 2025 01:00:42 -0600 Subject: [PATCH 8/8] more patch fixes --- recipe/patches/0002-use-precompiled.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipe/patches/0002-use-precompiled.patch b/recipe/patches/0002-use-precompiled.patch index 2a363a1..ab7fcfe 100644 --- a/recipe/patches/0002-use-precompiled.patch +++ b/recipe/patches/0002-use-precompiled.patch @@ -31,10 +31,10 @@ index 0e6b8425..a6f843c0 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/python-package/pyproject.toml b/python-package/pyproject.toml +diff --git a//pyproject.toml b/pyproject.toml index fa281078..3e35059f 100644 ---- a/python-package/pyproject.toml -+++ b/python-package/pyproject.toml +--- a/pyproject.toml ++++ b/pyproject.toml @@ -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"