[arch-commits] Commit in tensorflow/trunk (PKGBUILD)

Sven-Hendrik Haase svenstaro at archlinux.org
Sun Jun 16 02:50:22 UTC 2019


    Date: Sunday, June 16, 2019 @ 02:50:21
  Author: svenstaro
Revision: 481804

upgpkg: tensorflow 1.14.0rc1-1

Modified:
  tensorflow/trunk/PKGBUILD

----------+
 PKGBUILD |  268 +++++++++++++++----------------------------------------------
 1 file changed, 70 insertions(+), 198 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-06-16 02:12:16 UTC (rev 481803)
+++ PKGBUILD	2019-06-16 02:50:21 UTC (rev 481804)
@@ -1,4 +1,4 @@
-# Maintainer: Sven-Hendrik Haase <sh at lutzhaase.com>
+# Maintainer: Sven-Hendrik Haase <svenstaro at gmail.com>
 # Co-Maintainer: Konstantin Gizdov (kgizdov) <arch at kge.pw>
 # Contributor: Adria Arrufat (archdria) <adria.arrufat+AUR at protonmail.ch>
 # Contributor: Thibault Lorrain (fredszaq) <fredszaq at gmail.com>
@@ -5,26 +5,20 @@
 
 pkgbase=tensorflow
 pkgname=(tensorflow tensorflow-opt tensorflow-cuda tensorflow-opt-cuda python-tensorflow python-tensorflow-opt python-tensorflow-cuda python-tensorflow-opt-cuda)
-pkgver=1.13.1
-_pkgver=1.13.1
-pkgrel=5
+pkgver=1.14.0rc1
+_pkgver=1.14.0-rc1
+pkgrel=1
 pkgdesc="Library for computation using data flow graphs for scalable machine learning"
 url="https://www.tensorflow.org/"
 license=('APACHE')
 arch=('x86_64')
 depends=('c-ares')
-makedepends=('bazel=0.22.0' 'python-numpy' 'cuda' 'nvidia-utils' 'nccl' 'git' 'gcc'
+makedepends=('bazel' 'python-numpy' 'cuda' 'nvidia-utils' 'nccl' 'git' 'gcc'
              'cudnn' 'python-pip' 'python-wheel' 'python-setuptools' 'python-h5py'
              'python-keras-applications' 'python-keras-preprocessing')
 optdepends=('tensorboard: Tensorflow visualization toolkit')
-source=("https://github.com/tensorflow/tensorflow/archive/v${_pkgver}.tar.gz"
-        'protobuf_temp_fix_cuda10.1_apply.patch'
-        'protobuf_temp_fix_cuda10.1.patch'
-        'cuda_config.patch')
-sha512sums=('1e5c020a82b0b502c9c6fc9439905e19e8f1fb07e32740a5e2c70f4a3565c8c87053ccdcad360e95550dad648154e399ca8e352fb97a1788acfec3b87bf323bb'
-            '770afd62612abac4fcef6919f75d1ac3519030d917ce8b277de4f88b76f5449c2ad7af81fbbcd17f5e799d637f188de200f078211f13809373d8f0378bb01754'
-            '5900002170aab40144453d3d0d1b097475d0cbc48c5901147214e38ed7d8634ea9207fc187b44129c878b0355676a531cb4807d4f2124f6110a20cbb61172c18'
-            'a4cf1779b41fdb49a09889f190db99bbd2c903f5addde0e9bfad4c2c0e02e599d9742e64172bae322f3a3e12aba79f2c92437492355124b3687e11a69c363faa')
+source=("https://github.com/tensorflow/tensorflow/archive/v${_pkgver}.tar.gz")
+sha512sums=('c2d24332b05719bae4ca35f52ccbcc973a899e7abd7ebe8372a6c352bc254d05a489bd92b3d80c7c4a0ea640bd5295a3ec084cf85de431ab4e655c2d916ae10f')
 
 get_pyver () {
     python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
@@ -31,16 +25,10 @@
 }
 
 prepare() {
-  # https://github.com/tensorflow/tensorflow/issues/26155
-  patch -d tensorflow-${_pkgver} -Np1 -i "${srcdir}/protobuf_temp_fix_cuda10.1_apply.patch"
-  cp "${srcdir}/protobuf_temp_fix_cuda10.1.patch" "${srcdir}/tensorflow-${_pkgver}/third_party"/
-
-  # do not strictly check sonames on CUDA libs, needed for CUDA 10.1 broken sonames
-  patch -d tensorflow-${_pkgver} -Np1 -i "${srcdir}/cuda_config.patch"
-
   cp -r tensorflow-${_pkgver} tensorflow-${_pkgver}-opt
   cp -r tensorflow-${_pkgver} tensorflow-${_pkgver}-cuda
   cp -r tensorflow-${_pkgver} tensorflow-${_pkgver}-opt-cuda
+
   # These environment variables influence the behavior of the configure call below.
   export PYTHON_BIN_PATH=/usr/bin/python
   export USE_DEFAULT_PYTHON_LIB_PATH=1
@@ -63,11 +51,20 @@
   export TF_SET_ANDROID_WORKSPACE=0
   export TF_DOWNLOAD_CLANG=0
   export TF_NCCL_VERSION=2.4
+  export TF_IGNORE_MAX_BAZEL_VERSION=1
   export NCCL_INSTALL_PATH=/usr
-  export TF_IGNORE_MAX_BAZEL_VERSION=1
+  export GCC_HOST_COMPILER_PATH=/usr/bin/gcc
+  export HOST_CXX_COMPILER_PATH=/usr/bin/gcc
+  export TF_CUDA_CLANG=0  # Clang currently disabled because it's not compatible at the moment.
+  export CLANG_CUDA_COMPILER_PATH=/usr/bin/clang
+  export TF_CUDA_PATHS=/opt/cuda,/usr/lib,/usr
+  export TF_CUDA_VERSION=$(/opt/cuda/bin/nvcc --version | sed -n 's/^.*release \(.*\),.*/\1/p')
+  export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' /usr/include/cudnn.h)
+  export TF_CUDA_COMPUTE_CAPABILITIES=3.5,3.7,5.0,5.2,5.3,6.0,6.1,6.2,7.0,7.2,7.5
 }
 
 build() {
+  echo "Building without cuda and without non-x86-64 optimizations"
   cd "${srcdir}"/tensorflow-${_pkgver}
   export CC_OPT_FLAGS="-march=x86-64"
   export TF_NEED_CUDA=0
@@ -80,18 +77,11 @@
       //tensorflow/tools/pip_package:build_pip_package
   bazel-bin/tensorflow/tools/pip_package/build_pip_package "${srcdir}"/tmp
 
-  cd "${srcdir}"/tensorflow-${_pkgver}-cuda
-  export CC_OPT_FLAGS="-march=x86-64"
-  export TF_NEED_CUDA=1
-  export GCC_HOST_COMPILER_PATH=/usr/bin/gcc
-  export HOST_CXX_COMPILER_PATH=/usr/bin/gcc
-  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=/usr/lib
-  export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' /usr/include/cudnn.h)
-  export TF_CUDA_COMPUTE_CAPABILITIES=3.5,3.7,5.0,5.2,5.3,6.0,6.1,6.2,7.0,7.2,7.5
+
+  echo "Building without cuda and with non-x86-64 optimizations"
+  cd "${srcdir}"/tensorflow-${_pkgver}-opt
+  export CC_OPT_FLAGS="-march=haswell"
+  export TF_NEED_CUDA=0
   ./configure
   bazel \
     build --config=opt \
@@ -99,11 +89,13 @@
       //tensorflow:libtensorflow_cc.so \
       //tensorflow:install_headers \
       //tensorflow/tools/pip_package:build_pip_package
-  bazel-bin/tensorflow/tools/pip_package/build_pip_package "${srcdir}"/tmpcuda
+  bazel-bin/tensorflow/tools/pip_package/build_pip_package "${srcdir}"/tmpopt
 
-  cd "${srcdir}"/tensorflow-${_pkgver}-opt
-  export CC_OPT_FLAGS="-march=haswell"
-  export TF_NEED_CUDA=0
+
+  echo "Building with cuda and without non-x86-64 optimizations"
+  cd "${srcdir}"/tensorflow-${_pkgver}-cuda
+  export CC_OPT_FLAGS="-march=x86-64"
+  export TF_NEED_CUDA=1
   ./configure
   bazel \
     build --config=opt \
@@ -111,20 +103,14 @@
       //tensorflow:libtensorflow_cc.so \
       //tensorflow:install_headers \
       //tensorflow/tools/pip_package:build_pip_package
-  bazel-bin/tensorflow/tools/pip_package/build_pip_package "${srcdir}"/tmpopt
+  bazel-bin/tensorflow/tools/pip_package/build_pip_package "${srcdir}"/tmpcuda
 
+
+  echo "Building with cuda and without non-x86-64 optimizations"
   cd "${srcdir}"/tensorflow-${_pkgver}-opt-cuda
   export CC_OPT_FLAGS="-march=haswell"
   export TF_NEED_CUDA=1
-  export GCC_HOST_COMPILER_PATH=/usr/bin/gcc
-  export HOST_CXX_COMPILER_PATH=/usr/bin/gcc
   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=/usr/lib
-  export TF_CUDNN_VERSION=$(sed -n 's/^#define CUDNN_MAJOR\s*\(.*\).*/\1/p' /usr/include/cudnn.h)
-  export TF_CUDA_COMPUTE_CAPABILITIES=3.5,3.7,5.0,5.2,5.3,6.0,6.1,6.2,7.0,7.2,7.5
   ./configure
   bazel \
     build --config=opt \
@@ -135,9 +121,7 @@
   bazel-bin/tensorflow/tools/pip_package/build_pip_package "${srcdir}"/tmpcudaopt
 }
 
-package_tensorflow() {
-  cd "${srcdir}"/tensorflow-${_pkgver}
-
+_package() {
   # install headers first
   install -d "${pkgdir}"/usr/include/tensorflow
   cp -r bazel-genfiles/tensorflow/include/* "${pkgdir}"/usr/include/tensorflow/
@@ -164,105 +148,57 @@
   install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
 }
 
+_python_package() {
+  WHEEL_PACKAGE=$(find "${srcdir}"/tmp -name "tensor*.whl")
+  pip install --ignore-installed --upgrade --root "${pkgdir}"/ $WHEEL_PACKAGE --no-dependencies
+
+  # create symlinks to headers
+  find "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include/ -maxdepth 1 -mindepth 1 -type d -print0 | while read -rd $'\0' _folder; do
+    rm -rf "${_folder}"
+    _smlink="$(basename "${_folder}")"
+    ln -s /usr/include/tensorflow/"${_smlink}" "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include/
+  done
+
+  # tensorboard has been separated from upstream but they still install it with
+  # tensorflow. I don't know what kind of sense that makes but we have to clean
+  # it out from this pacakge.
+  rm -rf "${pkgdir}"/usr/bin/tensorboard
+
+  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}
+
+package_tensorflow() {
+  cd "${srcdir}"/tensorflow-${_pkgver}
+  _package
+}
+
 package_tensorflow-opt() {
+  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CPU optimizations)"
   conflicts=(tensorflow)
   provides=(tensorflow)
-  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CPU optimizations)"
 
   cd "${srcdir}"/tensorflow-${_pkgver}-opt
-
-  # install headers first
-  install -d "${pkgdir}"/usr/include/tensorflow
-  cp -r bazel-genfiles/tensorflow/include/* "${pkgdir}"/usr/include/tensorflow/
-  # install python-version to get all extra headers
-  WHEEL_PACKAGE=$(find "${srcdir}"/tmpopt -name "tensor*.whl")
-  pip install --ignore-installed --upgrade --root "${pkgdir}"/ $WHEEL_PACKAGE --no-dependencies
-  # move extra headers to correct location
-  find "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include -maxdepth 1 -mindepth 1 -type d -print0 | while read -rd $'\0' _folder; do
-    cp -nr "${_folder}" "${pkgdir}"/usr/include/tensorflow/
-  done
-  # clean up unneeded files
-  rm -rf "${pkgdir}"/usr/bin
-  rm -rf "${pkgdir}"/usr/lib
-  rm -rf "${pkgdir}"/usr/share
-
-  # install the rest of tensorflow
-  tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
-  sed -e 's/\/include/\/include\/tensorflow/' -i tensorflow.pc
-  install -Dm644 tensorflow.pc "${pkgdir}"/usr/lib/pkgconfig/tensorflow.pc
-  install -Dm755 bazel-bin/tensorflow/libtensorflow.so "${pkgdir}"/usr/lib/libtensorflow.so
-  install -Dm755 bazel-bin/tensorflow/libtensorflow_cc.so "${pkgdir}"/usr/lib/libtensorflow_cc.so
-  install -Dm755 bazel-bin/tensorflow/libtensorflow_framework.so "${pkgdir}"/usr/lib/libtensorflow_framework.so
-  install -Dm644 tensorflow/c/c_api.h "${pkgdir}"/usr/include/tensorflow/tensorflow/c/c_api.h
-  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+  _package
 }
 
 package_tensorflow-cuda() {
+  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA)"
   depends+=(cuda cudnn nccl)
   conflicts=(tensorflow)
   provides=(tensorflow)
-  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA)"
 
   cd "${srcdir}"/tensorflow-${_pkgver}-cuda
-
-  # install headers first
-  install -d "${pkgdir}"/usr/include/tensorflow
-  cp -r bazel-genfiles/tensorflow/include/* "${pkgdir}"/usr/include/tensorflow/
-  # install python-version to get all extra headers
-  WHEEL_PACKAGE=$(find "${srcdir}"/tmpcuda -name "tensor*.whl")
-  pip install --ignore-installed --upgrade --root "${pkgdir}"/ $WHEEL_PACKAGE --no-dependencies
-  # move extra headers to correct location
-  find "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include -maxdepth 1 -mindepth 1 -type d -print0 | while read -rd $'\0' _folder; do
-    cp -nr "${_folder}" "${pkgdir}"/usr/include/tensorflow/
-  done
-  # clean up unneeded files
-  rm -rf "${pkgdir}"/usr/bin
-  rm -rf "${pkgdir}"/usr/lib
-  rm -rf "${pkgdir}"/usr/share
-
-  # install the rest of tensorflow
-  tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
-  sed -e 's/\/include/\/include\/tensorflow/' -i tensorflow.pc
-  install -Dm644 tensorflow.pc "${pkgdir}"/usr/lib/pkgconfig/tensorflow.pc
-  install -Dm755 bazel-bin/tensorflow/libtensorflow.so "${pkgdir}"/usr/lib/libtensorflow.so
-  install -Dm755 bazel-bin/tensorflow/libtensorflow_cc.so "${pkgdir}"/usr/lib/libtensorflow_cc.so
-  install -Dm755 bazel-bin/tensorflow/libtensorflow_framework.so "${pkgdir}"/usr/lib/libtensorflow_framework.so
-  install -Dm644 tensorflow/c/c_api.h "${pkgdir}"/usr/include/tensorflow/tensorflow/c/c_api.h
-  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+  _package
 }
 
 package_tensorflow-opt-cuda() {
+  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and CPU optimizations)"
   depends+=(cuda cudnn nccl)
   conflicts=(tensorflow)
   provides=(tensorflow tensorflow-cuda)
-  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and CPU optimizations)"
 
   cd "${srcdir}"/tensorflow-${_pkgver}-opt-cuda
-
-  # install headers first
-  install -d "${pkgdir}"/usr/include/tensorflow
-  cp -r bazel-genfiles/tensorflow/include/* "${pkgdir}"/usr/include/tensorflow/
-  # install python-version to get all extra headers
-  WHEEL_PACKAGE=$(find "${srcdir}"/tmpcudaopt -name "tensor*.whl")
-  pip install --ignore-installed --upgrade --root "${pkgdir}"/ $WHEEL_PACKAGE --no-dependencies
-  # move extra headers to correct location
-  find "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include -maxdepth 1 -mindepth 1 -type d -print0 | while read -rd $'\0' _folder; do
-    cp -nr "${_folder}" "${pkgdir}"/usr/include/tensorflow/
-  done
-  # clean up unneeded files
-  rm -rf "${pkgdir}"/usr/bin
-  rm -rf "${pkgdir}"/usr/lib
-  rm -rf "${pkgdir}"/usr/share
-
-  # install the rest of tensorflow
-  tensorflow/c/generate-pc.sh --prefix=/usr --version=${pkgver}
-  sed -e 's/\/include/\/include\/tensorflow/' -i tensorflow.pc
-  install -Dm644 tensorflow.pc "${pkgdir}"/usr/lib/pkgconfig/tensorflow.pc
-  install -Dm755 bazel-bin/tensorflow/libtensorflow.so "${pkgdir}"/usr/lib/libtensorflow.so
-  install -Dm755 bazel-bin/tensorflow/libtensorflow_cc.so "${pkgdir}"/usr/lib/libtensorflow_cc.so
-  install -Dm755 bazel-bin/tensorflow/libtensorflow_framework.so "${pkgdir}"/usr/lib/libtensorflow_framework.so
-  install -Dm644 tensorflow/c/c_api.h "${pkgdir}"/usr/include/tensorflow/tensorflow/c/c_api.h
-  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+  _package
 }
 
 package_python-tensorflow() {
@@ -269,101 +205,37 @@
   depends+=(tensorflow python-termcolor python-astor python-gast python-numpy python-protobuf absl-py python-h5py python-keras-applications python-keras-preprocessing python-tensorflow-estimator)
 
   cd "${srcdir}"/tensorflow-${_pkgver}
-
-  WHEEL_PACKAGE=$(find "${srcdir}"/tmp -name "tensor*.whl")
-  pip install --ignore-installed --upgrade --root "${pkgdir}"/ $WHEEL_PACKAGE --no-dependencies
-
-  # create symlinks to headers
-  find "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include/ -maxdepth 1 -mindepth 1 -type d -print0 | while read -rd $'\0' _folder; do
-    rm -rf "${_folder}"
-    _smlink="$(basename "${_folder}")"
-    ln -s /usr/include/tensorflow/"${_smlink}" "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include/
-  done
-
-  # tensorboard has been separated from upstream but they still install it with
-  # tensorflow. I don't know what kind of sense that makes but we have to clean
-  # it out from this pacakge.
-  rm -rf "${pkgdir}"/usr/bin/tensorboard
-
-  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+  _python_package
 }
 
 package_python-tensorflow-opt() {
+  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CPU optimizations)"
   depends+=(tensorflow-opt python-termcolor python-astor python-gast python-numpy python-protobuf absl-py python-h5py python-keras-applications python-keras-preprocessing python-tensorflow-estimator)
   conflicts=(python-tensorflow)
   provides=(python-tensorflow)
-  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CPU optimizations)"
 
   cd "${srcdir}"/tensorflow-${_pkgver}-opt
-
-  WHEEL_PACKAGE=$(find "${srcdir}"/tmpopt -name "tensor*.whl")
-  pip install --ignore-installed --upgrade --root "${pkgdir}"/ $WHEEL_PACKAGE --no-dependencies
-
-  # create symlinks to headers
-  find "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include/ -maxdepth 1 -mindepth 1 -type d -print0 | while read -rd $'\0' _folder; do
-    rm -rf "${_folder}"
-    _smlink="$(basename "${_folder}")"
-    ln -s /usr/include/tensorflow/"${_smlink}" "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include/
-  done
-
-  # tensorboard has been separated from upstream but they still install it with
-  # tensorflow. I don't know what kind of sense that makes but we have to clean
-  # it out from this pacakge.
-  rm -rf "${pkgdir}"/usr/bin/tensorboard
-
-  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+  _python_package
 }
 
 package_python-tensorflow-cuda() {
+  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA)"
   depends+=(tensorflow-cuda python-termcolor python-astor python-gast python-numpy cuda cudnn python-pycuda python-protobuf absl-py nccl python-h5py python-keras-applications python-keras-preprocessing python-tensorflow-estimator)
   conflicts=(python-tensorflow)
   provides=(python-tensorflow)
-  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA)"
 
   cd "${srcdir}"/tensorflow-${_pkgver}-cuda
-
-  WHEEL_PACKAGE=$(find "${srcdir}"/tmpcuda -name "tensor*.whl")
-  pip install --ignore-installed --upgrade --root "${pkgdir}"/ $WHEEL_PACKAGE --no-dependencies
-
-  # create symlinks to headers
-  find "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include/ -maxdepth 1 -mindepth 1 -type d -print0 | while read -rd $'\0' _folder; do
-    rm -rf "${_folder}"
-    _smlink="$(basename "${_folder}")"
-    ln -s /usr/include/tensorflow/"${_smlink}" "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include/
-  done
-
-  # tensorboard has been separated from upstream but they still install it with
-  # tensorflow. I don't know what kind of sense that makes but we have to clean
-  # it out from this pacakge.
-  rm -rf "${pkgdir}"/usr/bin/tensorboard
-
-  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+  _python_package
 }
 
 package_python-tensorflow-opt-cuda() {
+  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and CPU optimizations)"
   depends+=(tensorflow-opt-cuda python-termcolor python-astor python-gast python-numpy cuda cudnn python-pycuda python-protobuf absl-py nccl python-h5py python-keras-applications python-keras-preprocessing python-tensorflow-estimator)
   conflicts=(python-tensorflow)
   provides=(python-tensorflow python-tensorflow-cuda)
-  pkgdesc="Library for computation using data flow graphs for scalable machine learning (with CUDA and CPU optimizations)"
 
   cd "${srcdir}"/tensorflow-${_pkgver}-opt-cuda
-
-  WHEEL_PACKAGE=$(find "${srcdir}"/tmpcudaopt -name "tensor*.whl")
-  pip install --ignore-installed --upgrade --root "${pkgdir}"/ $WHEEL_PACKAGE --no-dependencies
-
-  # create symlinks to headers
-  find "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include/ -maxdepth 1 -mindepth 1 -type d -print0 | while read -rd $'\0' _folder; do
-    rm -rf "${_folder}"
-    _smlink="$(basename "${_folder}")"
-    ln -s /usr/include/tensorflow/"${_smlink}" "${pkgdir}/usr/lib/python$(get_pyver)"/site-packages/tensorflow/include/
-  done
-
-  # tensorboard has been separated from upstream but they still install it with
-  # tensorflow. I don't know what kind of sense that makes but we have to clean
-  # it out from this pacakge.
-  rm -rf "${pkgdir}"/usr/bin/tensorboard
-
-  install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+  _python_package
 }
 
 # vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list