Gentoo Archives: gentoo-commits

From: Alfredo Tupone <tupone@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/caffe2/
Date: Tue, 03 Jan 2023 06:22:19
Message-Id: 1672726798.4590c8b8fa3b26439ac9336243331863a4ed2c52.tupone@gentoo
1 commit: 4590c8b8fa3b26439ac9336243331863a4ed2c52
2 Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 3 06:16:54 2023 +0000
4 Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 3 06:19:58 2023 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4590c8b8
7
8 sci-libs/caffe2: inherit single and mv api in python dir
9
10 Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
11
12 ...affe2-1.12.0.ebuild => caffe2-1.12.0-r1.ebuild} | 26 +++++++++++-----------
13 1 file changed, 13 insertions(+), 13 deletions(-)
14
15 diff --git a/sci-libs/caffe2/caffe2-1.12.0.ebuild b/sci-libs/caffe2/caffe2-1.12.0-r1.ebuild
16 similarity index 91%
17 rename from sci-libs/caffe2/caffe2-1.12.0.ebuild
18 rename to sci-libs/caffe2/caffe2-1.12.0-r1.ebuild
19 index 035c81fabb3a..8f6e1f87386f 100644
20 --- a/sci-libs/caffe2/caffe2-1.12.0.ebuild
21 +++ b/sci-libs/caffe2/caffe2-1.12.0-r1.ebuild
22 @@ -1,10 +1,10 @@
23 -# Copyright 2022 Gentoo Authors
24 +# Copyright 2022-2023 Gentoo Authors
25 # Distributed under the terms of the GNU General Public License v2
26
27 EAPI=8
28
29 PYTHON_COMPAT=( python3_{8..10} )
30 -inherit python-r1 cmake flag-o-matic
31 +inherit python-single-r1 cmake flag-o-matic
32
33 MYPN=pytorch
34 MYP=${MYPN}-${PV}
35 @@ -43,7 +43,9 @@ RDEPEND="
36 )
37 ffmpeg? ( media-video/ffmpeg:= )
38 nnpack? ( sci-libs/NNPACK )
39 - numpy? ( dev-python/numpy[${PYTHON_USEDEP}] )
40 + numpy? ( $(python_gen_cond_dep '
41 + dev-python/numpy[${PYTHON_USEDEP}]
42 + ') )
43 opencl? ( virtual/opencl )
44 opencv? ( media-libs/opencv:= )
45 qnnpack? ( sci-libs/QNNPACK )
46 @@ -57,8 +59,10 @@ DEPEND="
47 dev-libs/FXdiv
48 dev-libs/pocketfft
49 dev-libs/flatbuffers
50 - dev-python/pyyaml[${PYTHON_USEDEP}]
51 - dev-python/pybind11[${PYTHON_USEDEP}]
52 + $(python_gen_cond_dep '
53 + dev-python/pyyaml[${PYTHON_USEDEP}]
54 + dev-python/pybind11[${PYTHON_USEDEP}]
55 + ')
56 "
57
58 S="${WORKDIR}"/${MYP}
59 @@ -91,7 +95,6 @@ src_configure() {
60 ewarn "or by running /opt/cuda/extras/demo_suite/deviceQuery | grep 'CUDA Capability'"
61 fi
62
63 - python_setup
64 local mycmakeargs=(
65 -DBUILD_CUSTOM_PROTOBUF=OFF
66 -DBUILD_SHARED_LIBS=ON
67 @@ -144,11 +147,6 @@ src_configure() {
68 cmake_src_configure
69 }
70
71 -python_install() {
72 - python_domodule python/caffe2
73 - python_domodule python/torch
74 -}
75 -
76 src_install() {
77 cmake_src_install
78
79 @@ -156,8 +154,10 @@ src_install() {
80 doins "${BUILD_DIR}"/CMakeCache.txt
81
82 rm -rf python
83 - mkdir -p python/torch || die
84 + mkdir -p python/torch/include || die
85 mv "${ED}"/usr/lib/python*/site-packages/caffe2 python/ || die
86 + mv "${ED}"/usr/include/torch python/torch/include || die
87 cp torch/version.py python/torch/ || die
88 - python_foreach_impl python_install
89 + python_domodule python/caffe2
90 + python_domodule python/torch
91 }