aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Mokrejs <mmokrejs@fold.natur.cuni.cz>2018-04-18 19:15:22 +0200
committerMartin Mokrejs <mmokrejs@fold.natur.cuni.cz>2018-04-18 19:15:22 +0200
commit7a72b8eabc3bb168f4c817c301c61d3b8ebb4197 (patch)
tree81d6874ceb58c58c193f9d4ffd9b447a8507424d
parentsci-libs/tensorflow: more ebuild tweaks (still not working) (diff)
downloadsci-7a72b8eabc3bb168f4c817c301c61d3b8ebb4197.tar.gz
sci-7a72b8eabc3bb168f4c817c301c61d3b8ebb4197.tar.bz2
sci-7a72b8eabc3bb168f4c817c301c61d3b8ebb4197.zip
sci-libs/tensorflow: try to determine site-packages path properly
This could support multiple python installations, improving further changes from https://github.com/gentoo/sci/issues/862 However, still untested by me due to sandbox violations, sorry. Package-Manager: Portage-2.3.28, Repoman-2.3.9
-rw-r--r--sci-libs/tensorflow/tensorflow-1.7.0.ebuild14
1 files changed, 10 insertions, 4 deletions
diff --git a/sci-libs/tensorflow/tensorflow-1.7.0.ebuild b/sci-libs/tensorflow/tensorflow-1.7.0.ebuild
index 75f5d499d..758872b99 100644
--- a/sci-libs/tensorflow/tensorflow-1.7.0.ebuild
+++ b/sci-libs/tensorflow/tensorflow-1.7.0.ebuild
@@ -77,9 +77,9 @@ src_compile() {
# huh, by default tensorflow links static libs? See BUILD file
# set framework_shared_object=true somehow
if use cuda; then
- opt="--config=cuda"
+ local opt="--config=cuda"
else
- opt=""
+ local opt=""
fi
bazel build --config=opt ${opt} /tensorflow/tools/pip_package:build_pip_package || die
bazel-bin/tensorflow/tools/pip_package/build_pip_package tensorflow_pkg || die
@@ -97,8 +97,14 @@ src_test() {
src_install() {
python_install() {
- python_copy_sources tensorflow_pkg/${P}.data/purelib/tensorflow/
- python_copy_sources tensorflow_pkg/${P}.dist-info
+ # steal site-package path determination from sci-mathematics/z3
+ local PYTHON_SITEDIR
+ python_export PYTHON_SITEDIR
+ cp -av tensorflow_pkg/"${P}".data/purelib/tensorflow/ "$PYTHON_SITEDIR" || die
+ cp -av tensorflow_pkg/"${P}".dist-info "$PYTHON_SITEDIR" || die
+ # mkdir -p "${D}/usr/$(get_libdir)/python3.6/site-packages" || die
+ # cp -av tensorflow_pkg/"${P}".data/purelib/tensorflow/ "${ED}/usr/$(get_libdir)/python3.6/site-packages/" || die
+ # cp -av tensorflow_pkg/"${P}".dist-info "${ED}/usr/$(get_libdir)/python3.6/site-packages/" || die
}
python_foreach_impl python_install
einstalldocs