[arch-commits] Commit in tensorflow/repos/community-x86_64 (4 files)

Sven-Hendrik Haase svenstaro at archlinux.org
Fri Jun 30 11:54:28 UTC 2017


    Date: Friday, June 30, 2017 @ 11:54:27
  Author: svenstaro
Revision: 241673

archrelease: copy trunk to community-x86_64

Added:
  tensorflow/repos/community-x86_64/10868.patch
    (from rev 241672, tensorflow/trunk/10868.patch)
  tensorflow/repos/community-x86_64/PKGBUILD
    (from rev 241672, tensorflow/trunk/PKGBUILD)
Deleted:
  tensorflow/repos/community-x86_64/10868.patch
  tensorflow/repos/community-x86_64/PKGBUILD

-------------+
 10868.patch |  178 ++++++++++++++++++++---------------------
 PKGBUILD    |  246 +++++++++++++++++++++++++++++-----------------------------
 2 files changed, 212 insertions(+), 212 deletions(-)

Deleted: 10868.patch
===================================================================
--- 10868.patch	2017-06-30 11:54:17 UTC (rev 241672)
+++ 10868.patch	2017-06-30 11:54:27 UTC (rev 241673)
@@ -1,89 +0,0 @@
-From eb197c45eda55b1047b00f1136a4fec2b8adb2d5 Mon Sep 17 00:00:00 2001
-From: Todd Wang <toddwang at gmail.com>
-Date: Tue, 20 Jun 2017 14:16:26 -0700
-Subject: [PATCH 1/3] [XLA] Explicitly instantiate Permute template func
-
-This is an attempted fix for older compilers that can't deduce the template args.
----
- tensorflow/compiler/xla/service/llvm_ir/ir_array.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc b/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc
-index e401305ae73..b14104be6ad 100644
---- a/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc
-+++ b/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc
-@@ -158,7 +158,7 @@ IrArray::Index IrArray::Index::SourceIndexOfTranspose(
-     tensorflow::gtl::ArraySlice<int64> dimension_mapping,
-     llvm::IRBuilder<>* builder) const {
-   std::vector<llvm::Value*> operand_multidim_index =
--      Permute(dimension_mapping, multidim());
-+      Permute<std::vector, llvm::Value*>(dimension_mapping, multidim());
-   if (linear() != nullptr &&
-       ShapeUtil::TransposeIsBitcast(operand_shape, shape, dimension_mapping)) {
-     return Index(operand_multidim_index, linear(), operand_shape);
-
-From 2df6cd3acd71a6dcf459e92c26ac426c90a57be4 Mon Sep 17 00:00:00 2001
-From: Todd Wang <toddwang at gmail.com>
-Date: Wed, 21 Jun 2017 17:51:55 -0700
-Subject: [PATCH 2/3] Another try
-
----
- tensorflow/compiler/xla/util.h | 17 ++++++++++++-----
- 1 file changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/tensorflow/compiler/xla/util.h b/tensorflow/compiler/xla/util.h
-index 42d5c1d1550..32aa81d1f42 100644
---- a/tensorflow/compiler/xla/util.h
-+++ b/tensorflow/compiler/xla/util.h
-@@ -195,16 +195,23 @@ bool IsPermutation(tensorflow::gtl::ArraySlice<int64> permutation, int64 rank);
- // 2. permutation.size() == input.size().
- template <template <typename...> class C, typename T>
- std::vector<T> Permute(tensorflow::gtl::ArraySlice<int64> permutation,
--                       C<T> input_) {
--  tensorflow::gtl::ArraySlice<T> input(input_);
--  CHECK(IsPermutation(permutation, input.size()));
--  std::vector<T> output(input.size());
-+                       C<T> input) {
-+  tensorflow::gtl::ArraySlice<T> data(input);
-+  CHECK(IsPermutation(permutation, data.size()));
-+  std::vector<T> output(data.size());
-   for (size_t i = 0; i < permutation.size(); ++i) {
--    output[permutation[i]] = input[i];
-+    output[permutation[i]] = data[i];
-   }
-   return output;
- }
- 
-+// Override of the above that works around compile failures with vectors.
-+template <typename T>
-+std::vector<T> Permute(tensorflow::gtl::ArraySlice<int64> permutation,
-+                       const std::vector<T>& input) {
-+  return Permute<std::vector, T>(permutation, input);
-+}
-+
- // Inverts a permutation, i.e., output_permutation[input_permutation[i]] = i.
- std::vector<int64> InversePermutation(
-     tensorflow::gtl::ArraySlice<int64> input_permutation);
-
-From 03da6113468d6b256a755d0521b9b239eaf8b6a9 Mon Sep 17 00:00:00 2001
-From: Todd Wang <toddwang at gmail.com>
-Date: Wed, 21 Jun 2017 17:54:15 -0700
-Subject: [PATCH 3/3] Update ir_array.cc
-
----
- tensorflow/compiler/xla/service/llvm_ir/ir_array.cc | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc b/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc
-index b14104be6ad..e401305ae73 100644
---- a/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc
-+++ b/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc
-@@ -158,7 +158,7 @@ IrArray::Index IrArray::Index::SourceIndexOfTranspose(
-     tensorflow::gtl::ArraySlice<int64> dimension_mapping,
-     llvm::IRBuilder<>* builder) const {
-   std::vector<llvm::Value*> operand_multidim_index =
--      Permute<std::vector, llvm::Value*>(dimension_mapping, multidim());
-+      Permute(dimension_mapping, multidim());
-   if (linear() != nullptr &&
-       ShapeUtil::TransposeIsBitcast(operand_shape, shape, dimension_mapping)) {
-     return Index(operand_multidim_index, linear(), operand_shape);

Copied: tensorflow/repos/community-x86_64/10868.patch (from rev 241672, tensorflow/trunk/10868.patch)
===================================================================
--- 10868.patch	                        (rev 0)
+++ 10868.patch	2017-06-30 11:54:27 UTC (rev 241673)
@@ -0,0 +1,89 @@
+From eb197c45eda55b1047b00f1136a4fec2b8adb2d5 Mon Sep 17 00:00:00 2001
+From: Todd Wang <toddwang at gmail.com>
+Date: Tue, 20 Jun 2017 14:16:26 -0700
+Subject: [PATCH 1/3] [XLA] Explicitly instantiate Permute template func
+
+This is an attempted fix for older compilers that can't deduce the template args.
+---
+ tensorflow/compiler/xla/service/llvm_ir/ir_array.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc b/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc
+index e401305ae73..b14104be6ad 100644
+--- a/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc
++++ b/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc
+@@ -158,7 +158,7 @@ IrArray::Index IrArray::Index::SourceIndexOfTranspose(
+     tensorflow::gtl::ArraySlice<int64> dimension_mapping,
+     llvm::IRBuilder<>* builder) const {
+   std::vector<llvm::Value*> operand_multidim_index =
+-      Permute(dimension_mapping, multidim());
++      Permute<std::vector, llvm::Value*>(dimension_mapping, multidim());
+   if (linear() != nullptr &&
+       ShapeUtil::TransposeIsBitcast(operand_shape, shape, dimension_mapping)) {
+     return Index(operand_multidim_index, linear(), operand_shape);
+
+From 2df6cd3acd71a6dcf459e92c26ac426c90a57be4 Mon Sep 17 00:00:00 2001
+From: Todd Wang <toddwang at gmail.com>
+Date: Wed, 21 Jun 2017 17:51:55 -0700
+Subject: [PATCH 2/3] Another try
+
+---
+ tensorflow/compiler/xla/util.h | 17 ++++++++++++-----
+ 1 file changed, 12 insertions(+), 5 deletions(-)
+
+diff --git a/tensorflow/compiler/xla/util.h b/tensorflow/compiler/xla/util.h
+index 42d5c1d1550..32aa81d1f42 100644
+--- a/tensorflow/compiler/xla/util.h
++++ b/tensorflow/compiler/xla/util.h
+@@ -195,16 +195,23 @@ bool IsPermutation(tensorflow::gtl::ArraySlice<int64> permutation, int64 rank);
+ // 2. permutation.size() == input.size().
+ template <template <typename...> class C, typename T>
+ std::vector<T> Permute(tensorflow::gtl::ArraySlice<int64> permutation,
+-                       C<T> input_) {
+-  tensorflow::gtl::ArraySlice<T> input(input_);
+-  CHECK(IsPermutation(permutation, input.size()));
+-  std::vector<T> output(input.size());
++                       C<T> input) {
++  tensorflow::gtl::ArraySlice<T> data(input);
++  CHECK(IsPermutation(permutation, data.size()));
++  std::vector<T> output(data.size());
+   for (size_t i = 0; i < permutation.size(); ++i) {
+-    output[permutation[i]] = input[i];
++    output[permutation[i]] = data[i];
+   }
+   return output;
+ }
+ 
++// Override of the above that works around compile failures with vectors.
++template <typename T>
++std::vector<T> Permute(tensorflow::gtl::ArraySlice<int64> permutation,
++                       const std::vector<T>& input) {
++  return Permute<std::vector, T>(permutation, input);
++}
++
+ // Inverts a permutation, i.e., output_permutation[input_permutation[i]] = i.
+ std::vector<int64> InversePermutation(
+     tensorflow::gtl::ArraySlice<int64> input_permutation);
+
+From 03da6113468d6b256a755d0521b9b239eaf8b6a9 Mon Sep 17 00:00:00 2001
+From: Todd Wang <toddwang at gmail.com>
+Date: Wed, 21 Jun 2017 17:54:15 -0700
+Subject: [PATCH 3/3] Update ir_array.cc
+
+---
+ tensorflow/compiler/xla/service/llvm_ir/ir_array.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc b/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc
+index b14104be6ad..e401305ae73 100644
+--- a/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc
++++ b/tensorflow/compiler/xla/service/llvm_ir/ir_array.cc
+@@ -158,7 +158,7 @@ IrArray::Index IrArray::Index::SourceIndexOfTranspose(
+     tensorflow::gtl::ArraySlice<int64> dimension_mapping,
+     llvm::IRBuilder<>* builder) const {
+   std::vector<llvm::Value*> operand_multidim_index =
+-      Permute<std::vector, llvm::Value*>(dimension_mapping, multidim());
++      Permute(dimension_mapping, multidim());
+   if (linear() != nullptr &&
+       ShapeUtil::TransposeIsBitcast(operand_shape, shape, dimension_mapping)) {
+     return Index(operand_multidim_index, linear(), operand_shape);

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2017-06-30 11:54:17 UTC (rev 241672)
+++ PKGBUILD	2017-06-30 11:54:27 UTC (rev 241673)
@@ -1,123 +0,0 @@
-# Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
-# Contributor: Adria Arrufat (archdria) <adria.arrufat+AUR at protonmail.ch>
-# Contributor: Thibault Lorrain (fredszaq) <fredszaq at gmail.com>
-
-pkgbase=tensorflow
-pkgname=(tensorflow tensorflow-cuda python-tensorflow python-tensorflow-cuda)
-pkgver=1.2.0
-pkgrel=3
-pkgdesc="Library for computation using data flow graphs for scalable machine learning"
-url="https://www.tensorflow.org/"
-license=('Apache2')
-arch=('x86_64')
-makedepends=('git' 'bazel' 'python-numpy' 'gcc5' 'cuda' 'cudnn' 'python-pip' 'python-wheel' 'python-setuptools')
-source=("https://github.com/tensorflow/tensorflow/archive/v${pkgver}.tar.gz"
-        10868.patch
-        https://raw.githubusercontent.com/tensorflow/tensorflow/847484e39485dc727dd72a0970d5bfb5c2d5e538/tensorflow/c/generate-pc.sh)
-sha512sums=('7f51060e35bdf313f043fdf99c174ec7a734463c5ea7436380428fd3900421c656b61d00fb9c7492b97172a0bd963502dc0ff4cabd31d91297ed99065842647d'
-            '90940827ea6cbc6694b14ea276a37c5f8af027317873d67a8b40802d8d75a81984c283335bf62cc5b5fa63023c9cc9b414a145d3019124127c5f15472bfdfcec'
-            '9a1d82df83881c662d088ccd5b21abcb8b46726f2090f64d968d270d99e3b7bbd6b3c9dae6e83479ff724a47238384df95ed67d0d096d97231c793e7f63a1034')
-
-prepare() {
-  patch -Np1 -d tensorflow-${pkgver} < ${srcdir}/10868.patch
-  # We'll not need this in >1.2.0
-  cp ${srcdir}/generate-pc.sh tensorflow-${pkgver}/tensorflow/c/generate-pc.sh
-
-  cp -r tensorflow-${pkgver} tensorflow-${pkgver}-cuda
-  # These environment variables influence the behavior of the configure call below.
-  export TF_NEED_MKL=0
-  export PYTHON_BIN_PATH=/usr/bin/python
-  export USE_DEFAULT_PYTHON_LIB_PATH=1
-  export CC_OPT_FLAGS="-march=x86-64"
-  export TF_NEED_JEMALLOC=1
-  export TF_NEED_GCP=0
-  export TF_NEED_HDFS=0
-  export TF_ENABLE_XLA=1
-  export TF_NEED_VERBS=0
-  export TF_NEED_OPENCL=0
-}
-
-build() {
-  cd ${srcdir}/tensorflow-${pkgver}
-
-  export TF_NEED_CUDA=0
-
-  ./configure
-  bazel build --config=opt //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package
-  bazel-bin/tensorflow/tools/pip_package/build_pip_package ${srcdir}/tmp
-
-  cd ${srcdir}/tensorflow-${pkgver}-cuda
-
-  export TF_NEED_CUDA=1
-  export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-5
-  # For next version instead of the gcc-5 stuff:
-  export TF_CUDA_CLANG=0
-  # export CLANG_CUDA_COMPILER_PATH=/usr/bin/clang
-  export CUDA_TOOLKIT_PATH=/opt/cuda
-  export TF_CUDA_VERSION=$($CUDA_TOOLKIT_PATH/bin/nvcc --version | sed -n 's/^.*release \(.*\),.*/\1/p')
-  export CUDNN_INSTALL_PATH=/opt/cuda
-  export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' $CUDNN_INSTALL_PATH/include/cudnn.h)
-  export TF_CUDA_COMPUTE_CAPABILITIES=3.0,3.5,5.2,6.1
-
-  ./configure
-  bazel build --config=opt --config=cuda //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package
-  bazel-bin/tensorflow/tools/pip_package/build_pip_package ${srcdir}/tmpcuda
-}
-
-package_tensorflow() {
-  cd ${srcdir}/tensorflow-${pkgver}
-
-  tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
-  install -Dm644 tensorflow.pc ${pkgdir}/usr/lib/pkgconfig/tensorflow.pc
-  install -Dm755 bazel-bin/tensorflow/libtensorflow.so ${pkgdir}/usr/lib/lib${pkgname}.so
-  install -Dm644 tensorflow/c/c_api.h ${pkgdir}/usr/include/${pkgname}/c/c_api.h
-  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
-}
-
-package_tensorflow-cuda() {
-  depends=(cuda cudnn)
-  conflicts=(tensorflow)
-  provides=(tensorflow)
-
-  cd ${srcdir}/tensorflow-${pkgver}-cuda
-
-  tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
-  install -Dm644 tensorflow.pc ${pkgdir}/usr/lib/pkgconfig/tensorflow.pc
-  install -Dm755 bazel-bin/tensorflow/libtensorflow.so ${pkgdir}/usr/lib/lib${pkgname}.so
-  install -Dm644 tensorflow/c/c_api.h ${pkgdir}/usr/include/${pkgname}/c/c_api.h
-  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
-}
-
-package_python-tensorflow() {
-  depends=(python python-protobuf)
-  optdepends=('python-werkzeug: for using tensorboard'
-              'python-bleach: for using tensorboard'
-              'python-markdown: for using tensorboard')
-
-  cd ${srcdir}/tensorflow-${pkgver}
-
-  WHEEL_PACKAGE=$(find ${srcdir}/tmp -name "tensor*.whl")
-  pip install --ignore-installed --upgrade --root $pkgdir/ $WHEEL_PACKAGE --no-dependencies
-  find ${pkgdir} -name __pycache__ -exec rm -r {} +
-
-  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
-}
-
-package_python-tensorflow-cuda() {
-  depends=(python cuda cudnn python-pycuda python-protobuf)
-  conflicts=(python-tensorflow)
-  provides=(python-tensorflow)
-  optdepends=('python-werkzeug: for using tensorboard'
-              'python-bleach: for using tensorboard'
-              'python-markdown: for using tensorboard')
-
-  cd ${srcdir}/tensorflow-${pkgver}-cuda
-
-  WHEEL_PACKAGE=$(find ${srcdir}/tmpcuda -name "tensor*.whl")
-  pip install --ignore-installed --upgrade --root $pkgdir/ $WHEEL_PACKAGE --no-dependencies
-  find ${pkgdir} -name __pycache__ -exec rm -r {} +
-
-  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
-}
-
-# vim:set ts=2 sw=2 et:

Copied: tensorflow/repos/community-x86_64/PKGBUILD (from rev 241672, tensorflow/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2017-06-30 11:54:27 UTC (rev 241673)
@@ -0,0 +1,123 @@
+# Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
+# Contributor: Adria Arrufat (archdria) <adria.arrufat+AUR at protonmail.ch>
+# Contributor: Thibault Lorrain (fredszaq) <fredszaq at gmail.com>
+
+pkgbase=tensorflow
+pkgname=(tensorflow tensorflow-cuda python-tensorflow python-tensorflow-cuda)
+pkgver=1.2.1
+pkgrel=1
+pkgdesc="Library for computation using data flow graphs for scalable machine learning"
+url="https://www.tensorflow.org/"
+license=('Apache2')
+arch=('x86_64')
+makedepends=('git' 'bazel' 'python-numpy' 'gcc5' 'cuda' 'cudnn' 'python-pip' 'python-wheel' 'python-setuptools')
+source=("https://github.com/tensorflow/tensorflow/archive/v${pkgver}.tar.gz"
+        10868.patch
+        https://raw.githubusercontent.com/tensorflow/tensorflow/847484e39485dc727dd72a0970d5bfb5c2d5e538/tensorflow/c/generate-pc.sh)
+sha512sums=('bed3d2173db41d5d6882dbe2bafac3b6cd541acc2e6bb73c838fbf34160a3fe4cff83e0ee0cf79a8081928701cc9752dc5bea7bf733ffadb7745a974e0467b0f'
+            '90940827ea6cbc6694b14ea276a37c5f8af027317873d67a8b40802d8d75a81984c283335bf62cc5b5fa63023c9cc9b414a145d3019124127c5f15472bfdfcec'
+            '9a1d82df83881c662d088ccd5b21abcb8b46726f2090f64d968d270d99e3b7bbd6b3c9dae6e83479ff724a47238384df95ed67d0d096d97231c793e7f63a1034')
+
+prepare() {
+  patch -Np1 -d tensorflow-${pkgver} < ${srcdir}/10868.patch
+  # We'll not need this in >1.2
+  cp ${srcdir}/generate-pc.sh tensorflow-${pkgver}/tensorflow/c/generate-pc.sh
+
+  cp -r tensorflow-${pkgver} tensorflow-${pkgver}-cuda
+  # These environment variables influence the behavior of the configure call below.
+  export TF_NEED_MKL=0
+  export PYTHON_BIN_PATH=/usr/bin/python
+  export USE_DEFAULT_PYTHON_LIB_PATH=1
+  export CC_OPT_FLAGS="-march=x86-64"
+  export TF_NEED_JEMALLOC=1
+  export TF_NEED_GCP=0
+  export TF_NEED_HDFS=0
+  export TF_ENABLE_XLA=1
+  export TF_NEED_VERBS=0
+  export TF_NEED_OPENCL=0
+}
+
+build() {
+  cd ${srcdir}/tensorflow-${pkgver}
+
+  export TF_NEED_CUDA=0
+
+  ./configure
+  bazel build --config=opt //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package
+  bazel-bin/tensorflow/tools/pip_package/build_pip_package ${srcdir}/tmp
+
+  cd ${srcdir}/tensorflow-${pkgver}-cuda
+
+  export TF_NEED_CUDA=1
+  export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-5
+  # For next version instead of the gcc-5 stuff:
+  export TF_CUDA_CLANG=0
+  # export CLANG_CUDA_COMPILER_PATH=/usr/bin/clang
+  export CUDA_TOOLKIT_PATH=/opt/cuda
+  export TF_CUDA_VERSION=$($CUDA_TOOLKIT_PATH/bin/nvcc --version | sed -n 's/^.*release \(.*\),.*/\1/p')
+  export CUDNN_INSTALL_PATH=/opt/cuda
+  export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' $CUDNN_INSTALL_PATH/include/cudnn.h)
+  export TF_CUDA_COMPUTE_CAPABILITIES=3.0,3.5,5.2,6.1
+
+  ./configure
+  bazel build --config=opt --config=cuda //tensorflow:libtensorflow.so //tensorflow/tools/pip_package:build_pip_package
+  bazel-bin/tensorflow/tools/pip_package/build_pip_package ${srcdir}/tmpcuda
+}
+
+package_tensorflow() {
+  cd ${srcdir}/tensorflow-${pkgver}
+
+  tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
+  install -Dm644 tensorflow.pc ${pkgdir}/usr/lib/pkgconfig/tensorflow.pc
+  install -Dm755 bazel-bin/tensorflow/libtensorflow.so ${pkgdir}/usr/lib/lib${pkgname}.so
+  install -Dm644 tensorflow/c/c_api.h ${pkgdir}/usr/include/${pkgname}/c/c_api.h
+  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+}
+
+package_tensorflow-cuda() {
+  depends=(cuda cudnn)
+  conflicts=(tensorflow)
+  provides=(tensorflow)
+
+  cd ${srcdir}/tensorflow-${pkgver}-cuda
+
+  tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
+  install -Dm644 tensorflow.pc ${pkgdir}/usr/lib/pkgconfig/tensorflow.pc
+  install -Dm755 bazel-bin/tensorflow/libtensorflow.so ${pkgdir}/usr/lib/lib${pkgname}.so
+  install -Dm644 tensorflow/c/c_api.h ${pkgdir}/usr/include/${pkgname}/c/c_api.h
+  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+}
+
+package_python-tensorflow() {
+  depends=(python python-protobuf)
+  optdepends=('python-werkzeug: for using tensorboard'
+              'python-bleach: for using tensorboard'
+              'python-markdown: for using tensorboard')
+
+  cd ${srcdir}/tensorflow-${pkgver}
+
+  WHEEL_PACKAGE=$(find ${srcdir}/tmp -name "tensor*.whl")
+  pip install --ignore-installed --upgrade --root $pkgdir/ $WHEEL_PACKAGE --no-dependencies
+  find ${pkgdir} -name __pycache__ -exec rm -r {} +
+
+  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+}
+
+package_python-tensorflow-cuda() {
+  depends=(python cuda cudnn python-pycuda python-protobuf)
+  conflicts=(python-tensorflow)
+  provides=(python-tensorflow)
+  optdepends=('python-werkzeug: for using tensorboard'
+              'python-bleach: for using tensorboard'
+              'python-markdown: for using tensorboard')
+
+  cd ${srcdir}/tensorflow-${pkgver}-cuda
+
+  WHEEL_PACKAGE=$(find ${srcdir}/tmpcuda -name "tensor*.whl")
+  pip install --ignore-installed --upgrade --root $pkgdir/ $WHEEL_PACKAGE --no-dependencies
+  find ${pkgdir} -name __pycache__ -exec rm -r {} +
+
+  install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list