1 |
commit: 3f42049a77ae9c11af52753c2f99ce9391274d4d |
2 |
Author: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 26 14:39:23 2021 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 26 14:39:23 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=3f42049a |
7 |
|
8 |
sci-libs/pytorch: use python-single-r1 |
9 |
|
10 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
11 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org> |
12 |
|
13 |
sci-libs/pytorch/pytorch-1.10.1.ebuild | 11 +++++++++-- |
14 |
1 file changed, 9 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/sci-libs/pytorch/pytorch-1.10.1.ebuild b/sci-libs/pytorch/pytorch-1.10.1.ebuild |
17 |
index 98afa9662..a7bbb62ac 100644 |
18 |
--- a/sci-libs/pytorch/pytorch-1.10.1.ebuild |
19 |
+++ b/sci-libs/pytorch/pytorch-1.10.1.ebuild |
20 |
@@ -4,6 +4,7 @@ |
21 |
EAPI=8 |
22 |
|
23 |
DISTUTILS_USE_SETUPTOOLS=manual |
24 |
+DISTUTILS_SINGLE_IMPL=1 |
25 |
PYTHON_COMPAT=( python3_{8..10} ) |
26 |
|
27 |
inherit cmake cuda distutils-r1 prefix |
28 |
@@ -63,7 +64,9 @@ IUSE="asan blas cuda +fbgemm ffmpeg gflags glog +gloo leveldb lmdb mkldnn mpi na |
29 |
REQUIRED_USE=" ?? ( cuda rocm )" |
30 |
|
31 |
RDEPEND=" |
32 |
+ $(python_gen_cond_dep ' |
33 |
dev-python/pyyaml[${PYTHON_USEDEP}] |
34 |
+ ') |
35 |
blas? ( virtual/blas ) |
36 |
cuda? ( dev-libs/cudnn |
37 |
dev-cpp/eigen[cuda] ) |
38 |
@@ -87,10 +90,12 @@ RDEPEND=" |
39 |
opencl? ( dev-libs/clhpp ) |
40 |
opencv? ( media-libs/opencv ) |
41 |
python? ( ${PYTHON_DEPS} |
42 |
+ $(python_gen_cond_dep ' |
43 |
dev-python/setuptools[${PYTHON_USEDEP}] |
44 |
dev-python/pybind11[${PYTHON_USEDEP}] |
45 |
dev-python/numpy[${PYTHON_USEDEP}] |
46 |
- dev-python/protobuf-python:= |
47 |
+ dev-python/protobuf-python:=[${PYTHON_USEDEP}] |
48 |
+ ') |
49 |
) |
50 |
redis? ( dev-db/redis ) |
51 |
zeromq? ( net-libs/zeromq ) |
52 |
@@ -105,8 +110,10 @@ BDEPEND="dev-python/pyyaml" |
53 |
DEPEND="${RDEPEND} |
54 |
dev-cpp/tbb |
55 |
app-arch/zstd |
56 |
+ $(python_gen_cond_dep ' |
57 |
dev-python/pybind11[${PYTHON_USEDEP}] |
58 |
dev-python/typing-extensions[${PYTHON_USEDEP}] |
59 |
+ ') |
60 |
sys-fabric/libibverbs |
61 |
sys-process/numactl |
62 |
" |
63 |
@@ -316,7 +323,7 @@ src_install() { |
64 |
scanelf -r --fix "${BUILD_DIR}/caffe2/python" || die |
65 |
USE_SYSTEM_LIBS=ON CMAKE_BUILD_DIR=${BUILD_DIR} distutils-r1_src_install |
66 |
|
67 |
- python_foreach_impl python_optimize |
68 |
+ python_optimize |
69 |
fi |
70 |
|
71 |
find "${ED}/usr/${LIB}" -name "*.a" -exec rm -fv {} \; || die |