[arch-commits] Commit in (5 files)

Konstantin Gizdov kgizdov at archlinux.org
Fri Apr 10 15:14:15 UTC 2020


    Date: Friday, April 10, 2020 @ 15:14:14
  Author: kgizdov
Revision: 613108

initial upload

Added:
  python-tensorboard_plugin_wit/
  python-tensorboard_plugin_wit/repos/
  python-tensorboard_plugin_wit/trunk/
  python-tensorboard_plugin_wit/trunk/PKGBUILD
  python-tensorboard_plugin_wit/trunk/src/

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

Added: python-tensorboard_plugin_wit/trunk/PKGBUILD
===================================================================
--- python-tensorboard_plugin_wit/trunk/PKGBUILD	                        (rev 0)
+++ python-tensorboard_plugin_wit/trunk/PKGBUILD	2020-04-10 15:14:14 UTC (rev 613108)
@@ -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.6.0
+pkgrel=1
+arch=('any')
+source=("${_pkgbase}-${pkgver}::git+https://github.com/PAIR-code/what-if-tool#commit=2cee8a42598cb2342a04577d583ce1985a794edd")
+_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