From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1CD3C1382C5 for ; Wed, 18 Apr 2018 17:15:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 214D7E08DA; Wed, 18 Apr 2018 17:15:35 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F18C3E08DA for ; Wed, 18 Apr 2018 17:15:34 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1C7A8335C2C for ; Wed, 18 Apr 2018 17:15:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CEB5C288 for ; Wed, 18 Apr 2018 17:15:31 +0000 (UTC) From: "Martin Mokrejs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Martin Mokrejs" Message-ID: <1524071722.7a72b8eabc3bb168f4c817c301c61d3b8ebb4197.mmokrejs@gentoo> Subject: [gentoo-commits] proj/sci:master commit in: sci-libs/tensorflow/ X-VCS-Repository: proj/sci X-VCS-Files: sci-libs/tensorflow/tensorflow-1.7.0.ebuild X-VCS-Directories: sci-libs/tensorflow/ X-VCS-Committer: mmokrejs X-VCS-Committer-Name: Martin Mokrejs X-VCS-Revision: 7a72b8eabc3bb168f4c817c301c61d3b8ebb4197 X-VCS-Branch: master Date: Wed, 18 Apr 2018 17:15:31 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 38a70242-8724-44d5-9ee0-b031c55be87f X-Archives-Hash: 0a912f64439ae7cf15d3e262f772016e commit: 7a72b8eabc3bb168f4c817c301c61d3b8ebb4197 Author: Martin Mokrejs fold natur cuni cz> AuthorDate: Wed Apr 18 17:15:22 2018 +0000 Commit: Martin Mokrejs fold natur cuni cz> CommitDate: Wed Apr 18 17:15:22 2018 +0000 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=7a72b8ea 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 sci-libs/tensorflow/tensorflow-1.7.0.ebuild | 14 ++++++++++---- 1 file 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