2019-11-19 11:55:42 +08:00
|
|
|
%global pypi_name xgboost
|
|
|
|
|
%define _debugsource_template %{nil}
|
|
|
|
|
|
|
|
|
|
Name: python-%{pypi_name}
|
|
|
|
|
Version: 0.90
|
2025-02-27 17:21:16 +08:00
|
|
|
Release: 10
|
2019-11-19 11:55:42 +08:00
|
|
|
Summary: Scalable, Portable and Distributed Gradient Boosting Library
|
2022-05-18 11:10:15 +08:00
|
|
|
License: Apache-2.0
|
2019-11-19 11:55:42 +08:00
|
|
|
URL: https://github.com/dmlc/xgboost
|
|
|
|
|
Source0: https://files.pythonhosted.org/packages/96/84/4e2cae6247f397f83d8adc5c2a2a0c5d7d790a14a4c7400ff6574586f589/%{pypi_name}-%{version}.tar.gz
|
2021-06-23 16:27:08 +08:00
|
|
|
BuildRequires: python3-devel gcc-c++
|
2019-11-19 11:55:42 +08:00
|
|
|
Requires: dejavu-fonts-common dejavu-sans-fonts libgfortran
|
|
|
|
|
Requires: openblas openblas-serial openblas-threads
|
|
|
|
|
Requires: python3-numpy python3-numpy-f2py python3-scipy
|
|
|
|
|
Requires: fontconfig fontpackages-filesystem
|
|
|
|
|
Requires: libX11 libXau libXft libXrender libxcb
|
2022-12-22 11:27:58 +08:00
|
|
|
Requires: %{_vendor}-rpm-config
|
2019-11-19 11:55:42 +08:00
|
|
|
Requires: python3-devel python3-rpm-generators tk
|
2025-02-27 17:21:16 +08:00
|
|
|
Patch01: xgboost-add-sw64-mips64el-loongarch64-riscv64-support.patch
|
2019-11-19 11:55:42 +08:00
|
|
|
|
|
|
|
|
%global _description \
|
|
|
|
|
XGBoost is an optimized distributed gradient boosting library designed to be \
|
|
|
|
|
highly efficient, flexible and portable. It implements machine learning \
|
|
|
|
|
algorithms under the Gradient Boosting framework. XGBoost provides a parallel \
|
|
|
|
|
tree boosting (also known as GBDT, GBM) that solve many data science problems \
|
|
|
|
|
in a fast and accurate way. The same code runs on major distributed environment \
|
|
|
|
|
(Kubernetes, Hadoop, SGE, MPI, Dask) and can solve problems beyond billions of \
|
|
|
|
|
examples.
|
|
|
|
|
|
|
|
|
|
%description %{_description}
|
|
|
|
|
|
|
|
|
|
%package -n python3-%{pypi_name}
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
%{?python_provide:%python_provide python3-%{pypi_name}}
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{pypi_name} %{_description}
|
|
|
|
|
|
|
|
|
|
%prep
|
2022-01-21 09:33:03 +00:00
|
|
|
%autosetup -n %{pypi_name}-%{version} -p1
|
2019-11-19 11:55:42 +08:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
pushd %{pypi_name}
|
2023-06-07 17:18:01 +08:00
|
|
|
sed -i "s/(PLUGIN_CFLAGS)/(PLUGIN_CFLAGS) -fPIE -pie/g" Makefile
|
2019-11-19 11:55:42 +08:00
|
|
|
%make_build
|
|
|
|
|
popd
|
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
pushd %{pypi_name}
|
|
|
|
|
install -m 755 -d %{buildroot}%{_bindir}
|
|
|
|
|
install -m 755 xgboost %{buildroot}%{_bindir}
|
|
|
|
|
install -m 755 -d %{buildroot}/usr/xgboost
|
|
|
|
|
install lib/libxgboost.so %{buildroot}/usr/xgboost
|
|
|
|
|
popd
|
|
|
|
|
%py3_install
|
2020-02-27 08:53:51 -05:00
|
|
|
find %{buildroot} -name "*.py" -exec sed -i -r 's!/usr/bin/python(\s|$)!/usr/bin/python3\1!' {} \;
|
2019-11-19 11:55:42 +08:00
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{pypi_name}
|
|
|
|
|
%{_bindir}/xgboost
|
|
|
|
|
/usr/xgboost
|
|
|
|
|
%doc README.rst
|
2022-07-25 10:40:13 +08:00
|
|
|
%{python3_sitearch}/%{pypi_name}/
|
|
|
|
|
%{python3_sitearch}/%{pypi_name}-*.egg-info/
|
2019-11-19 11:55:42 +08:00
|
|
|
|
|
|
|
|
%changelog
|
2025-02-27 17:21:16 +08:00
|
|
|
* Thu Feb 27 2025 zhangshaoning <zhangshaoning@uniontech.com> - 0.90-10
|
|
|
|
|
- Add sw_64 loongarch64 riscv64 and mips64 support
|
|
|
|
|
|
2023-06-07 17:18:01 +08:00
|
|
|
* Wed Jun 07 2023 chenchen <chen_aka_jan@163.com> - 0.90-9
|
|
|
|
|
- add PIE compiler option
|
|
|
|
|
|
2023-03-04 14:26:56 +08:00
|
|
|
* Sat Mar 04 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 0.90-8
|
|
|
|
|
- disable sse for loongarch64
|
|
|
|
|
|
2022-12-22 11:27:58 +08:00
|
|
|
* Thu Dec 22 2022 wanglin <wangl29@chinatelecom.cn> - 0.90-7
|
|
|
|
|
- Fix rpm-config hard code problem
|
|
|
|
|
|
2022-07-25 10:40:13 +08:00
|
|
|
* Mon Jul 25 2022 caodongxia <caodongxia@h-partners.com> - 0.90-6
|
|
|
|
|
- Use python3_sitearch instead of python3_sitelib
|
|
|
|
|
|
2022-05-18 11:10:15 +08:00
|
|
|
* Wed May 18 2022 liukuo <liukuo@kylinos.cn> - 0.90-5
|
|
|
|
|
- License compliance rectification
|
|
|
|
|
|
2022-01-21 09:33:03 +00:00
|
|
|
* Mon Jan 24 2022 lvxiaoqian <xiaoqian@nj.iscas.ac.cn> - 0.90-4
|
|
|
|
|
- do not use sse for riscv
|
|
|
|
|
|
2021-06-23 16:27:08 +08:00
|
|
|
* Wed Jun 23 2021 wuchaochao <wuchaochao4@huawei.com> - 0.90-3
|
|
|
|
|
- add buildrequires: gcc-c++
|
|
|
|
|
|
2020-02-27 08:53:51 -05:00
|
|
|
* Thu Feb 27 2020 lijin Yang <yanglijin@huawei.com> - 0.90-2
|
|
|
|
|
- remove dependency of python2
|
2019-11-19 11:55:42 +08:00
|
|
|
* Thu Nov 7 2019 mengxian <mengxian@huawei.com> - 0.90-1
|
|
|
|
|
- Init package
|