summaryrefslogtreecommitdiff
path: root/misc/py-xgboost/files
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2023-12-19 23:41:01 -0800
committerYuri Victorovich <yuri@FreeBSD.org>2023-12-19 23:42:34 -0800
commit97dcba7265f4c4b5e67311af0f1a432e1f2a3f39 (patch)
tree1c7e0ffbd5e7811da3e4141b73a970ffd33de832 /misc/py-xgboost/files
parentdevel/dmlc-core: update 0.3-123 → 0.5-23 (diff)
misc/{,py-}xgboost: update 1.7.6 → 2.0.3
Reported by: portscout
Diffstat (limited to 'misc/py-xgboost/files')
-rw-r--r--misc/py-xgboost/files/patch-setup.py38
-rw-r--r--misc/py-xgboost/files/patch-xgboost_libpath.py6
2 files changed, 3 insertions, 41 deletions
diff --git a/misc/py-xgboost/files/patch-setup.py b/misc/py-xgboost/files/patch-setup.py
deleted file mode 100644
index ffda5eae0975..000000000000
--- a/misc/py-xgboost/files/patch-setup.py
+++ /dev/null
@@ -1,38 +0,0 @@
---- setup.py.orig 2022-08-22 08:36:38 UTC
-+++ setup.py
-@@ -60,7 +60,7 @@ def copy_tree(src_dir: str, target_dir: str) -> None:
-
- src = os.path.join(src_dir, 'src')
- inc = os.path.join(src_dir, 'include')
-- dmlc_core = os.path.join(src_dir, 'dmlc-core')
-+ #dmlc_core = os.path.join(src_dir, 'dmlc-core')
- gputreeshap = os.path.join(src_dir, "gputreeshap")
- rabit = os.path.join(src_dir, 'rabit')
- cmake = os.path.join(src_dir, 'cmake')
-@@ -68,7 +68,7 @@ def copy_tree(src_dir: str, target_dir: str) -> None:
-
- clean_copy_tree(src, os.path.join(target_dir, 'src'))
- clean_copy_tree(inc, os.path.join(target_dir, 'include'))
-- clean_copy_tree(dmlc_core, os.path.join(target_dir, 'dmlc-core'))
-+ #clean_copy_tree(dmlc_core, os.path.join(target_dir, 'dmlc-core'))
- clean_copy_tree(gputreeshap, os.path.join(target_dir, "gputreeshap"))
- clean_copy_tree(rabit, os.path.join(target_dir, 'rabit'))
- clean_copy_tree(cmake, os.path.join(target_dir, 'cmake'))
-@@ -142,7 +142,7 @@ class BuildExt(build_ext.build_ext): # pylint: disabl
-
- def build_cmake_extension(self) -> None:
- '''Configure and build using CMake'''
-- if USER_OPTIONS['use-system-libxgboost'][2]:
-+ if True or USER_OPTIONS['use-system-libxgboost'][2]: # see https://github.com/dmlc/xgboost/issues/6879
- self.logger.info('Using system libxgboost.')
- return
-
-@@ -239,7 +239,7 @@ class InstallLib(install_lib.install_lib):
- def install(self) -> List[str]:
- outfiles = super().install()
-
-- if USER_OPTIONS['use-system-libxgboost'][2] != 0:
-+ if True or USER_OPTIONS['use-system-libxgboost'][2] != 0: # see https://github.com/dmlc/xgboost/issues/6879
- self.logger.info('Using system libxgboost.')
- lib_path = os.path.join(sys.prefix, 'lib')
- msg = 'use-system-libxgboost is specified, but ' + lib_name() + \
diff --git a/misc/py-xgboost/files/patch-xgboost_libpath.py b/misc/py-xgboost/files/patch-xgboost_libpath.py
index e3f94a08c138..0921168a89a9 100644
--- a/misc/py-xgboost/files/patch-xgboost_libpath.py
+++ b/misc/py-xgboost/files/patch-xgboost_libpath.py
@@ -1,9 +1,9 @@
---- xgboost/libpath.py.orig 2021-04-20 00:31:38 UTC
+--- xgboost/libpath.py.orig 2023-12-19 07:49:41 UTC
+++ xgboost/libpath.py
@@ -5,6 +5,7 @@ import os
import platform
- from typing import List
import sys
+ from typing import List
+import sysconfig # from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247408#c0
@@ -15,5 +15,5 @@
+ sysconfig.get_config_var('LIBDIR'), # from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247408#c0
+ os.path.join(sys.prefix, 'xgboost'),
# normal, after installation `lib` is copied into Python package tree.
- os.path.join(curr_path, 'lib'),
+ os.path.join(curr_path, "lib"),
# editable installation, no copying is performed.