[arch-commits] Commit in python-tensorboard_plugin_wit/repos (2 files)

Evangelos Foutras foutrelis at archlinux.org
Sat Nov 21 00:19:55 UTC 2020


    Date: Saturday, November 21, 2020 @ 00:19:55
  Author: foutrelis
Revision: 758285

archrelease: copy trunk to community-staging-any

Added:
  python-tensorboard_plugin_wit/repos/community-staging-any/
  python-tensorboard_plugin_wit/repos/community-staging-any/PKGBUILD
    (from rev 758284, python-tensorboard_plugin_wit/trunk/PKGBUILD)

----------+
 PKGBUILD |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

Copied: python-tensorboard_plugin_wit/repos/community-staging-any/PKGBUILD (from rev 758284, python-tensorboard_plugin_wit/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2020-11-21 00:19:55 UTC (rev 758285)
@@ -0,0 +1,58 @@
+# Maintainer: Konstantin Gizdov <arch at kge dot pw>
+
+pkgbase=python-tensorboard_plugin_wit
+pkgname=(python-tensorboard_plugin_wit python-witwidget)
+_pkgbase=tensorboard_plugin_wit
+pkgdesc='The What-If Tool (WIT): An easy-to-use interface for expanding understanding of a black-box classification or regression ML model.'
+url='https://pair-code.github.io/what-if-tool'
+license=('Apache')
+pkgver=1.7.0
+pkgrel=2
+arch=('any')
+source=("${_pkgbase}-${pkgver}::git+https://github.com/PAIR-code/what-if-tool#commit=63bc2b9c9528bcca34313c8a0bbaf279b4102f4a")
+_common_depends=('jupyter' 'python-google-api-python-client' 'python-ipywidgets')
+makedepends=('bazel' 'git' 'npm' 'python-virtualenv' 'python-pip' "${_common_depends[@]}")
+depends=('python-werkzeug' 'tensorboard')
+sha256sums=('SKIP')
+
+get_pyver () {
+    python -c 'import sys; print(str(sys.version_info[0]) + "." + str(sys.version_info[1]))'
+}
+
+prepare() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  sed -e 's@/tmp/wit-pip@${BUILD_WORKSPACE_DIRECTORY}/wit-pip at g' -i \
+    tensorboard_plugin_wit/pip_package/build_pip_package.sh \
+    witwidget/pip_package/build_pip_package.sh
+}
+
+build() {
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  bazel --output_user_root "${srcdir}/build-plugin" run tensorboard_plugin_wit/pip_package:build_pip_package
+
+  cd "${srcdir}/${_pkgbase}-${pkgver}"  
+  bazel --output_user_root "${srcdir}/build-witwidget" run witwidget/pip_package:build_pip_package
+}
+
+package_python-tensorboard_plugin_wit() {
+  provides=('tensorboard_plugin_wit')
+  optdepends=('tensorflow-serving-api: TensorFlow Classification, Regression, or Predict APIs')
+  local _pyver="$(get_pyver)"
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps wit-pip/release/dist/tensorboard_plugin_wit-${pkgver}-py3*.whl
+}
+package_python-witwidget() {
+  pkgdesc='What-If Tool Notebook Widget.'
+  provides=('witwidget' 'witwidget-gpu')
+  depends=("${_common_depends[@]}" 'python-tensorboard_plugin_wit')
+  optdepends=(
+    'python-tensorflow-serving-api: browse model thorugh TensorFlow Serving API'
+    'python-tensorflow-estimator: browse model as a TensorFlow Estimator feature spec'
+  )
+  local _pyver="$(get_pyver)"
+  cd "${srcdir}/${_pkgbase}-${pkgver}"
+  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+  PIP_CONFIG_FILE=/dev/null pip install --isolated --root="$pkgdir" --ignore-installed --no-deps wit-pip/release/dist/witwidget-${pkgver}-py3*.whl
+  rm -rf "${pkgdir}/usr/lib/python${_pyver}/site-packages/${_pkgbase}"
+}



More information about the arch-commits mailing list