aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2023-12-20 07:41:01 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2023-12-20 07:42:34 +0000
commit97dcba7265f4c4b5e67311af0f1a432e1f2a3f39 (patch)
tree1c7e0ffbd5e7811da3e4141b73a970ffd33de832
parent903be3df5b7485a21d1d68ca1c4590dbc6ee6c2d (diff)
downloadports-97dcba7265f4c4b5e67311af0f1a432e1f2a3f39.tar.gz
ports-97dcba7265f4c4b5e67311af0f1a432e1f2a3f39.zip
misc/{,py-}xgboost: update 1.7.6 → 2.0.3
Reported by: portscout
-rw-r--r--misc/py-xgboost/Makefile18
-rw-r--r--misc/py-xgboost/distinfo6
-rw-r--r--misc/py-xgboost/files/patch-setup.py38
-rw-r--r--misc/py-xgboost/files/patch-xgboost_libpath.py6
-rw-r--r--misc/py-xgboost/pkg-plist50
-rw-r--r--misc/xgboost/Makefile2
-rw-r--r--misc/xgboost/distinfo6
-rw-r--r--misc/xgboost/pkg-plist4
8 files changed, 23 insertions, 107 deletions
diff --git a/misc/py-xgboost/Makefile b/misc/py-xgboost/Makefile
index 59712f927e70..27163ba21abe 100644
--- a/misc/py-xgboost/Makefile
+++ b/misc/py-xgboost/Makefile
@@ -1,6 +1,6 @@
PORTNAME= xgboost
DISTVERSIONPREFIX= v
-DISTVERSION= 1.7.6
+DISTVERSION= 2.0.3
CATEGORIES= misc # machine-learning
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -11,15 +11,15 @@ WWW= https://xgboost.ai/
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/../LICENSE
-BUILD_DEPENDS= cmake:devel/cmake-core
-LIB_DEPENDS= libdmlc.so:devel/dmlc-core \
- libxgboost.so:misc/xgboost
+BUILD_DEPENDS= cmake:devel/cmake-core \
+ ${PYTHON_PKGNAMEPREFIX}hatchling>=1.12.1:devel/py-hatchling@${PY_FLAVOR}
+LIB_DEPENDS= libdmlc.so:devel/dmlc-core
RUN_DEPENDS= ${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}scikit-learn>0:science/py-scikit-learn@${PY_FLAVOR}
USES= compiler:c11 python localbase:ldflags
-USE_PYTHON= distutils pytest # Python tests are broken because py-scikit-learn is missing the py-threadpoolctl dependency which is also currently broken
+USE_PYTHON= pep517 autoplist pytest # Python tests are broken because py-scikit-learn is missing the py-threadpoolctl dependency which is also currently broken
USE_LDCONFIG= yes
USE_GITHUB= yes
@@ -27,14 +27,16 @@ GH_ACCOUNT= dmlc
WRKSRC_SUBDIR= python-package
-PYDISTUTILS_INSTALLARGS= --use-system-libxgboost # this is ignored so that setup.py has to be patched, see https://github.com/dmlc/xgboost/issues/6879
+LDFLAGS+= -lexecinfo \
+ -ldmlc
-NO_ARCH= yes
+PYDISTUTILS_INSTALLARGS= --use-system-libxgboost # this is ignored so that setup.py has to be patched, see https://github.com/dmlc/xgboost/issues/6879
TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
TEST_WRKSRC= ${WRKSRC}/../tests/python
post-install:
- ${PYTHON_CMD} -m compileall -d ${PYTHON_SITELIBDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}
+ @${PYTHON_CMD} -m compileall -d ${PYTHON_SITELIBDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}
+ @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/xgboost/lib/libxgboost.so
.include <bsd.port.mk>
diff --git a/misc/py-xgboost/distinfo b/misc/py-xgboost/distinfo
index aa0287d7cf33..82743aed43c5 100644
--- a/misc/py-xgboost/distinfo
+++ b/misc/py-xgboost/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1687151492
-SHA256 (dmlc-xgboost-v1.7.6_GH0.tar.gz) = 20acbdc04e5c724884788a51abbc400fc0d8497ae6cb5b404fef4e0d32fe1a0e
-SIZE (dmlc-xgboost-v1.7.6_GH0.tar.gz) = 1873636
+TIMESTAMP = 1703054780
+SHA256 (dmlc-xgboost-v2.0.3_GH0.tar.gz) = 94e5deb27133459ec4172f3fed83971383366ad2a7d646b6f0b51f63484c5138
+SIZE (dmlc-xgboost-v2.0.3_GH0.tar.gz) = 1988289
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.
diff --git a/misc/py-xgboost/pkg-plist b/misc/py-xgboost/pkg-plist
deleted file mode 100644
index c82e9f35fad2..000000000000
--- a/misc/py-xgboost/pkg-plist
+++ /dev/null
@@ -1,50 +0,0 @@
-%%PYTHON_SITELIBDIR%%/xgboost/VERSION
-%%PYTHON_SITELIBDIR%%/xgboost/__init__.py
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/_typing%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/callback%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/collective%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/compat%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/config%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/core%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/dask%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/data%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/federated%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/libpath%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/plotting%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/rabit%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/sklearn%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/testing%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/tracker%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/__pycache__/training%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/_typing.py
-%%PYTHON_SITELIBDIR%%/xgboost/callback.py
-%%PYTHON_SITELIBDIR%%/xgboost/collective.py
-%%PYTHON_SITELIBDIR%%/xgboost/compat.py
-%%PYTHON_SITELIBDIR%%/xgboost/config.py
-%%PYTHON_SITELIBDIR%%/xgboost/core.py
-%%PYTHON_SITELIBDIR%%/xgboost/dask.py
-%%PYTHON_SITELIBDIR%%/xgboost/data.py
-%%PYTHON_SITELIBDIR%%/xgboost/federated.py
-%%PYTHON_SITELIBDIR%%/xgboost/libpath.py
-%%PYTHON_SITELIBDIR%%/xgboost/plotting.py
-%%PYTHON_SITELIBDIR%%/xgboost/py.typed
-%%PYTHON_SITELIBDIR%%/xgboost/rabit.py
-%%PYTHON_SITELIBDIR%%/xgboost/sklearn.py
-%%PYTHON_SITELIBDIR%%/xgboost/spark/__init__.py
-%%PYTHON_SITELIBDIR%%/xgboost/spark/__pycache__/__init__%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/spark/__pycache__/core%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/spark/__pycache__/data%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/spark/__pycache__/estimator%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/spark/__pycache__/model%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/spark/__pycache__/params%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/spark/__pycache__/utils%%PYTHON_EXT_SUFFIX%%.pyc
-%%PYTHON_SITELIBDIR%%/xgboost/spark/core.py
-%%PYTHON_SITELIBDIR%%/xgboost/spark/data.py
-%%PYTHON_SITELIBDIR%%/xgboost/spark/estimator.py
-%%PYTHON_SITELIBDIR%%/xgboost/spark/model.py
-%%PYTHON_SITELIBDIR%%/xgboost/spark/params.py
-%%PYTHON_SITELIBDIR%%/xgboost/spark/utils.py
-%%PYTHON_SITELIBDIR%%/xgboost/testing.py
-%%PYTHON_SITELIBDIR%%/xgboost/tracker.py
-%%PYTHON_SITELIBDIR%%/xgboost/training.py
diff --git a/misc/xgboost/Makefile b/misc/xgboost/Makefile
index 73aba1ead0c9..b5117e696724 100644
--- a/misc/xgboost/Makefile
+++ b/misc/xgboost/Makefile
@@ -1,6 +1,6 @@
PORTNAME= xgboost
DISTVERSIONPREFIX= v
-DISTVERSION= 1.7.6
+DISTVERSION= 2.0.3
CATEGORIES= misc # machine-learning
MAINTAINER= yuri@FreeBSD.org
diff --git a/misc/xgboost/distinfo b/misc/xgboost/distinfo
index 1cb1b2f71dfb..18a646e7686e 100644
--- a/misc/xgboost/distinfo
+++ b/misc/xgboost/distinfo
@@ -1,6 +1,6 @@
-TIMESTAMP = 1687149910
-SHA256 (dmlc-xgboost-v1.7.6_GH0.tar.gz) = 20acbdc04e5c724884788a51abbc400fc0d8497ae6cb5b404fef4e0d32fe1a0e
-SIZE (dmlc-xgboost-v1.7.6_GH0.tar.gz) = 1873636
+TIMESTAMP = 1703054318
+SHA256 (dmlc-xgboost-v2.0.3_GH0.tar.gz) = 94e5deb27133459ec4172f3fed83971383366ad2a7d646b6f0b51f63484c5138
+SIZE (dmlc-xgboost-v2.0.3_GH0.tar.gz) = 1988289
SHA256 (NVlabs-cub-af39ee2_GH0.tar.gz) = 3444f1d0af16d3680bf5089c1a91e707769d946580b80f12463860366fb6884b
SIZE (NVlabs-cub-af39ee2_GH0.tar.gz) = 413215
SHA256 (rapidsai-gputreeshap-acb5be3_GH0.tar.gz) = c2b67f8f398000570cac6b9d82a0bdab251105391602a3e07fd497c5e61534c4
diff --git a/misc/xgboost/pkg-plist b/misc/xgboost/pkg-plist
index d8185719749b..f0f4a6dba4e3 100644
--- a/misc/xgboost/pkg-plist
+++ b/misc/xgboost/pkg-plist
@@ -1,11 +1,12 @@
bin/xgboost
include/xgboost/base.h
include/xgboost/c_api.h
+include/xgboost/cache.h
include/xgboost/collective/socket.h
+include/xgboost/context.h
include/xgboost/data.h
include/xgboost/feature_map.h
include/xgboost/gbm.h
-include/xgboost/generic_parameters.h
include/xgboost/global_config.h
include/xgboost/host_device_vector.h
include/xgboost/intrusive_ptr.h
@@ -17,6 +18,7 @@ include/xgboost/linear_updater.h
include/xgboost/logging.h
include/xgboost/metric.h
include/xgboost/model.h
+include/xgboost/multi_target_tree_model.h
include/xgboost/objective.h
include/xgboost/parameter.h
include/xgboost/predictor.h