aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@riseup.net>2021-01-05 14:42:12 +0100
committerAndrew Ammerlaan <andrewammerlaan@riseup.net>2021-01-05 17:03:39 +0100
commit2dd13d3a9df4b23f22b0b8bc1023daefb47de7ea (patch)
treed796895e0a7fcdc6971243d5df8afc6fac5a4d36 /dev-python/xgboost
parentdev-python/imageutils: bump py targets, bump EAPI (diff)
downloadsci-2dd13d3a9df4b23f22b0b8bc1023daefb47de7ea.tar.gz
sci-2dd13d3a9df4b23f22b0b8bc1023daefb47de7ea.tar.bz2
sci-2dd13d3a9df4b23f22b0b8bc1023daefb47de7ea.zip
dev-python/xgboost: version bump, bump py targets
Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@riseup.net>
Diffstat (limited to 'dev-python/xgboost')
-rw-r--r--dev-python/xgboost/Manifest2
-rw-r--r--dev-python/xgboost/files/xgboost-1.3.1-fix-install.patch31
-rw-r--r--dev-python/xgboost/xgboost-1.0.1.ebuild26
-rw-r--r--dev-python/xgboost/xgboost-1.3.1.ebuild25
4 files changed, 57 insertions, 27 deletions
diff --git a/dev-python/xgboost/Manifest b/dev-python/xgboost/Manifest
index c3c4e0988..1bcc6ae18 100644
--- a/dev-python/xgboost/Manifest
+++ b/dev-python/xgboost/Manifest
@@ -1 +1 @@
-DIST xgboost-1.0.1.tar.gz 820343 BLAKE2B 9e41049de189e9e6a93fbc84522d4ac3b39001ad5580bcae8e2ea5dff83fbc06f24f0195612bb6b5d32f6195db1571b000140439fe1c0cff59cea6b06ea0b5f4 SHA512 5bd3c0894b11e73211811f0490886e197b658ce4d7a2403cbba2c9fbb36a5b22c6404fb882b374b86ac5a5010bbb85c4b40ede566a4d6ad79bcdf92f5ddcf06a
+DIST xgboost-1.3.1.tar.gz 764139 BLAKE2B cde5e36b07fd4e2dba4961921bc169b730c775a12d8ec98a80d3f442a894f4bcc946094122df8d9fc5e76c8f505d4c57416e2deb13fe88751a9f51d8e4e09cad SHA512 ffe5851bd600d3a2f9b92850df6a028ec2c7d5f40ce4bad8e21b24e128a251e577e4344d8ce5cc50d6c17accf23bf283ff605d93fe6e12b9bfea6b544c57f428
diff --git a/dev-python/xgboost/files/xgboost-1.3.1-fix-install.patch b/dev-python/xgboost/files/xgboost-1.3.1-fix-install.patch
new file mode 100644
index 000000000..8c2d3d180
--- /dev/null
+++ b/dev-python/xgboost/files/xgboost-1.3.1-fix-install.patch
@@ -0,0 +1,31 @@
+The BUILD_TEMP_DIR variable is set in the build phase but is no
+longer available in the install phase. We write the variable to
+a tmp file and read it later in the install phase as a workaround
+diff --git a/setup.py b/setup.py
+index 6244066..934e7cf 100644
+--- a/setup.py
++++ b/setup.py
+@@ -137,6 +137,11 @@ class BuildExt(build_ext.build_ext): # pylint: disable=too-many-ancestors
+ build_dir = self.build_temp
+ global BUILD_TEMP_DIR # pylint: disable=global-statement
+ BUILD_TEMP_DIR = build_dir
++ tmp_workdir = os.environ["WORKDIR"]
++ py_vers = os.environ["EPYTHON"]
++ f = open(tmp_workdir + f"/build-path-{py_vers}.txt", "w")
++ f.write(BUILD_TEMP_DIR)
++ f.close()
+ libxgboost = os.path.abspath(
+ os.path.join(CURRENT_DIR, os.path.pardir, 'lib', lib_name()))
+
+@@ -229,6 +234,11 @@ class InstallLib(install_lib.install_lib):
+ dst = os.path.join(self.install_dir, 'xgboost', 'lib', lib_name())
+
+ global BUILD_TEMP_DIR # pylint: disable=global-statement
++ tmp_workdir = os.environ["WORKDIR"]
++ py_vers = os.environ["EPYTHON"]
++ f = open(tmp_workdir + f"/build-path-{py_vers}.txt", "r")
++ BUILD_TEMP_DIR = f.read()
++ f.close()
+ libxgboost_path = lib_name()
+
+ dft_lib_dir = os.path.join(CURRENT_DIR, os.path.pardir, 'lib')
diff --git a/dev-python/xgboost/xgboost-1.0.1.ebuild b/dev-python/xgboost/xgboost-1.0.1.ebuild
deleted file mode 100644
index 8a0dec405..000000000
--- a/dev-python/xgboost/xgboost-1.0.1.ebuild
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${PN}-${PV}.tar.gz"
-PYTHON_COMPAT=( python3_6 )
-
-inherit distutils-r1
-
-DESCRIPTION="XGBoost Python Package"
-
-HOMEPAGE="https://xgboost.readthedocs.io"
-LICENSE="Apache-2.0"
-
-SLOT="0"
-KEYWORDS="~amd64"
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
-
-python_prepare_all() {
- sed -e "/ADD_CFLAGS/s:=:=${CFLAGS/-O?/}:" \
- -e "/ADD_LDFLAGS/s:=:=${LDFLAGS}:" \
- -i ${PN}/make/config.mk || die
-
- distutils-r1_python_prepare_all
-}
diff --git a/dev-python/xgboost/xgboost-1.3.1.ebuild b/dev-python/xgboost/xgboost-1.3.1.ebuild
new file mode 100644
index 000000000..25145f93d
--- /dev/null
+++ b/dev-python/xgboost/xgboost-1.3.1.ebuild
@@ -0,0 +1,25 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit distutils-r1
+
+DESCRIPTION="XGBoost Python Package"
+HOMEPAGE="https://xgboost.readthedocs.io"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+PATCHES=( "${FILESDIR}/${P}-fix-install.patch" )
+
+RDEPEND="
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/scipy[${PYTHON_USEDEP}]
+"
+
+PATCHES=( "${FILESDIR}/${P}-fix-install.patch" )