public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andrew Ammerlaan" <andrewammerlaan@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/pytorch/
Date: Wed, 22 Dec 2021 14:33:35 +0000 (UTC)	[thread overview]
Message-ID: <1640176942.4c15677854b501ff60e87f35c1b52c2ac2e2db91.andrewammerlaan@gentoo> (raw)

commit:     4c15677854b501ff60e87f35c1b52c2ac2e2db91
Author:     Miezhiko <Miezhiko <AT> gmail <DOT> com>
AuthorDate: Wed Dec 22 06:53:36 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Wed Dec 22 12:42:22 2021 +0000
URL:        https://gitweb.gentoo.org/proj/sci.git/commit/?id=4c156778

Update pytorch to 1.10.1 improve ebuild quality + switch to EAPI 8

Signed-off-by: Miezhiko <Miezhiko <AT> gmail.com>
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 ...pytorch-1.10.0.ebuild => pytorch-1.10.1.ebuild} | 32 ++++++++++++----------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/sci-libs/pytorch/pytorch-1.10.0.ebuild b/sci-libs/pytorch/pytorch-1.10.1.ebuild
similarity index 96%
rename from sci-libs/pytorch/pytorch-1.10.0.ebuild
rename to sci-libs/pytorch/pytorch-1.10.1.ebuild
index 36d68fb14..8fb18d3a0 100644
--- a/sci-libs/pytorch/pytorch-1.10.0.ebuild
+++ b/sci-libs/pytorch/pytorch-1.10.1.ebuild
@@ -1,9 +1,9 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
-PYTHON_COMPAT=( python3_{7..10} )
+PYTHON_COMPAT=( python3_{8..10} )
 
 inherit cmake cuda distutils-r1 prefix
 
@@ -56,10 +56,9 @@ https://github.com/mikey/linux-syscall-support/archive/e1e7b0ad8ee99a875b272c8e3
 
 LICENSE="BSD"
 SLOT="0"
-KEYWORDS="~x86 ~amd64"
+KEYWORDS="~amd64 ~x86"
 
-IUSE="asan blas cuda +fbgemm ffmpeg gflags glog +gloo leveldb lmdb mkldnn mpi namedtensor +nnpack numa +observers opencl opencv +openmp +python +qnnpack redis rocm static test tools zeromq"
-RESTRICT="!test? ( test )"
+IUSE="asan blas cuda +fbgemm ffmpeg gflags glog +gloo leveldb lmdb mkldnn mpi namedtensor +nnpack numa +observers opencl opencv +openmp +python +qnnpack redis rocm static tools zeromq"
 REQUIRED_USE="
 	?? ( cuda rocm )
 "
@@ -104,7 +103,6 @@ RDEPEND="
 BDEPEND="dev-python/pyyaml"
 
 DEPEND="${RDEPEND}
-	test? ( dev-python/pytest[${PYTHON_USEDEP}] )
 	dev-cpp/tbb
 	app-arch/zstd
 	dev-python/pybind11[${PYTHON_USEDEP}]
@@ -122,6 +120,8 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-1.10.0-nonull.patch
 )
 
+distutils_enable_tests pytest
+
 src_prepare() {
 	cmake_src_prepare
 	eprefixify torch/__init__.py
@@ -208,11 +208,11 @@ src_prepare() {
 		#Allow escaping sandbox
 		addread /dev/kfd
 		addread /dev/dri
-		addwrite /dev/kfd
-		addwrite /dev/dri
+		addpredict /dev/kfd
+		addpredict /dev/dri
 
 		ebegin "HIPifying cuda sources"
-		tools/amd_build/build_amd.py
+		${EPYTHON} tools/amd_build/build_amd.py || die
 		eend $?
 
 		export PYTORCH_ROCM_ARCH=$(rocminfo | egrep -o "gfx[0-9]+" | uniq | awk -vORS=';' "{print $1}" | sed 's/;$/\n/') || die
@@ -307,21 +307,23 @@ src_install() {
 	rm -rfv "${ED}/usr/include/include"
 	rm -rfv "${ED}/usr/include/var"
 
-	cp -rv "${WORKDIR}/${P}/third_party/pybind11/include/pybind11" "${ED}/usr/include/"
+	cp -rv "${WORKDIR}/${P}/third_party/pybind11/include/pybind11" "${ED}/usr/include/" || die
 
-	rm -fv "${ED}/usr/${LIB}/libtbb.so"
-	rm -rfv "${ED}/usr/${LIB}/cmake"
+	rm -v "${ED}/usr/${LIB}/libtbb.so" || die
+	rm -r "${ED}/usr/${LIB}/cmake" || die
 
 	if use python; then
-		scanelf -r --fix "${BUILD_DIR}/caffe2/python"
+		scanelf -r --fix "${BUILD_DIR}/caffe2/python" || die
 		USE_SYSTEM_LIBS=ON CMAKE_BUILD_DIR=${BUILD_DIR} distutils-r1_src_install
 
 		python_foreach_impl python_optimize
 	fi
 
-	find "${ED}/usr/${LIB}" -name "*.a" -exec rm -fv {} \;
+	find "${ED}/usr/${LIB}" -name "*.a" -exec rm -fv {} \; || die
 
-	use test && rm -rfv "${ED}/usr/test" "${ED}"/usr/bin/test_{api,jit}
+	if use test; then
+		rm -r "${ED}/usr/test" "${ED}"/usr/bin/test_{api,jit} || die
+	fi
 
 	# Remove the empty directories by CMake Python:
 	find "${ED}" -type d -empty -delete || die


             reply	other threads:[~2021-12-22 14:33 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22 14:33 Andrew Ammerlaan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-02-24 21:18 [gentoo-commits] proj/sci:master commit in: sci-libs/pytorch/ Andrew Ammerlaan
2022-01-18 19:50 Horea Christian
2022-01-18 18:58 Horea Christian
2022-01-14 15:21 Andrew Ammerlaan
2022-01-12 11:51 Andrew Ammerlaan
2021-12-26 14:43 Andrew Ammerlaan
2021-12-22 14:33 Andrew Ammerlaan
2021-12-22 14:33 Andrew Ammerlaan
2021-12-22 14:33 Andrew Ammerlaan
2021-12-22 14:33 Andrew Ammerlaan
2021-12-22 14:33 Andrew Ammerlaan
2021-12-22 14:33 Andrew Ammerlaan
2021-07-20  9:54 Andrew Ammerlaan
2021-04-20 15:41 Aisha Tammy
2021-01-24 13:56 Andrew Ammerlaan
2021-01-15 20:09 Andrew Ammerlaan
2021-01-12 10:13 Andrew Ammerlaan
2021-01-12 10:07 Andrew Ammerlaan
2020-12-20 13:02 Benda XU
2020-11-08 15:25 Benda XU
2020-10-26  0:36 Aisha Tammy
2020-09-14  9:12 Benda XU
2020-08-11 13:44 Benda XU
2020-06-14  2:02 Benda XU

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1640176942.4c15677854b501ff60e87f35c1b52c2ac2e2db91.andrewammerlaan@gentoo \
    --to=andrewammerlaan@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox