diff options
author | Alfredo Tupone <tupone@gentoo.org> | 2023-01-03 07:16:54 +0100 |
---|---|---|
committer | Alfredo Tupone <tupone@gentoo.org> | 2023-01-03 07:19:58 +0100 |
commit | 4590c8b8fa3b26439ac9336243331863a4ed2c52 (patch) | |
tree | cf5004b5f97baa5ac76900ab13466eaaa5672de7 /sci-libs/caffe2 | |
parent | app-portage/tatt: add gentoo upstream metadata (diff) | |
download | gentoo-4590c8b8fa3b26439ac9336243331863a4ed2c52.tar.gz gentoo-4590c8b8fa3b26439ac9336243331863a4ed2c52.tar.bz2 gentoo-4590c8b8fa3b26439ac9336243331863a4ed2c52.zip |
sci-libs/caffe2: inherit single and mv api in python dir
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'sci-libs/caffe2')
-rw-r--r-- | sci-libs/caffe2/caffe2-1.12.0-r1.ebuild (renamed from sci-libs/caffe2/caffe2-1.12.0.ebuild) | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sci-libs/caffe2/caffe2-1.12.0.ebuild b/sci-libs/caffe2/caffe2-1.12.0-r1.ebuild index 035c81fabb3a..8f6e1f87386f 100644 --- a/sci-libs/caffe2/caffe2-1.12.0.ebuild +++ b/sci-libs/caffe2/caffe2-1.12.0-r1.ebuild @@ -1,10 +1,10 @@ -# Copyright 2022 Gentoo Authors +# Copyright 2022-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 PYTHON_COMPAT=( python3_{8..10} ) -inherit python-r1 cmake flag-o-matic +inherit python-single-r1 cmake flag-o-matic MYPN=pytorch MYP=${MYPN}-${PV} @@ -43,7 +43,9 @@ RDEPEND=" ) ffmpeg? ( media-video/ffmpeg:= ) nnpack? ( sci-libs/NNPACK ) - numpy? ( dev-python/numpy[${PYTHON_USEDEP}] ) + numpy? ( $(python_gen_cond_dep ' + dev-python/numpy[${PYTHON_USEDEP}] + ') ) opencl? ( virtual/opencl ) opencv? ( media-libs/opencv:= ) qnnpack? ( sci-libs/QNNPACK ) @@ -57,8 +59,10 @@ DEPEND=" dev-libs/FXdiv dev-libs/pocketfft dev-libs/flatbuffers - dev-python/pyyaml[${PYTHON_USEDEP}] - dev-python/pybind11[${PYTHON_USEDEP}] + $(python_gen_cond_dep ' + dev-python/pyyaml[${PYTHON_USEDEP}] + dev-python/pybind11[${PYTHON_USEDEP}] + ') " S="${WORKDIR}"/${MYP} @@ -91,7 +95,6 @@ src_configure() { ewarn "or by running /opt/cuda/extras/demo_suite/deviceQuery | grep 'CUDA Capability'" fi - python_setup local mycmakeargs=( -DBUILD_CUSTOM_PROTOBUF=OFF -DBUILD_SHARED_LIBS=ON @@ -144,11 +147,6 @@ src_configure() { cmake_src_configure } -python_install() { - python_domodule python/caffe2 - python_domodule python/torch -} - src_install() { cmake_src_install @@ -156,8 +154,10 @@ src_install() { doins "${BUILD_DIR}"/CMakeCache.txt rm -rf python - mkdir -p python/torch || die + mkdir -p python/torch/include || die mv "${ED}"/usr/lib/python*/site-packages/caffe2 python/ || die + mv "${ED}"/usr/include/torch python/torch/include || die cp torch/version.py python/torch/ || die - python_foreach_impl python_install + python_domodule python/caffe2 + python_domodule python/torch } |