Skip to content

Commit

Permalink
misc/{,py-}xgboost: update 1.7.6 → 2.0.3
Browse files Browse the repository at this point in the history
Reported by:	portscout
  • Loading branch information
yurivict committed Dec 20, 2023
1 parent 903be3d commit 97dcba7
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 107 deletions.
18 changes: 10 additions & 8 deletions 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}

Expand All @@ -11,30 +11,32 @@ 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
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>
6 changes: 3 additions & 3 deletions 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
38 changes: 0 additions & 38 deletions misc/py-xgboost/files/patch-setup.py

This file was deleted.

6 changes: 3 additions & 3 deletions 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


Expand All @@ -15,5 +15,5 @@ class XGBoostLibraryNotFound(Exception):
+ 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.
50 changes: 0 additions & 50 deletions misc/py-xgboost/pkg-plist

This file was deleted.

2 changes: 1 addition & 1 deletion 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
Expand Down
6 changes: 3 additions & 3 deletions 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
Expand Down
4 changes: 3 additions & 1 deletion 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
Expand All @@ -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
Expand Down

0 comments on commit 97dcba7

Please sign in to comment.