summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtakar Jašek2019-01-22 13:46:34 +0100
committerOtakar Jašek2019-01-22 13:46:34 +0100
commit4299bd514720ff9808e6957c88561f50cac87a80 (patch)
tree294157e745adc38126facc2da8fdf3bf0d9d2dce
downloadaur-4299bd514720ff9808e6957c88561f50cac87a80.tar.gz
Initial commit
-rw-r--r--.SRCINFO36
-rw-r--r--PKGBUILD46
-rw-r--r--visdom.install11
-rw-r--r--visdom2.install11
4 files changed, 104 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..cfea01b9232
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,36 @@
+pkgbase = python-visdom-git
+ pkgver = r209.2ef12d4
+ pkgrel = 1
+ url = https://github.com/facebookresearch/visdom
+ arch = any
+ license = CCPL:by-nc
+ makedepends = python-setuptools
+ makedepends = python2-setuptools
+ options = !emptydirs
+ source = git+https://github.com/facebookresearch/visdom.git
+ sha256sums = SKIP
+
+pkgname = python-visdom-git
+ install = visdom.install
+ depends = python-websocket-client
+ depends = python-numpy
+ depends = python-scipy
+ depends = python-requests
+ depends = python-tornado
+ depends = python-pyzmq
+ depends = python-six
+ depends = python-torchfile
+ provides = python-visdom
+
+pkgname = python2-visdom-git
+ install = visdom2.install
+ depends = python2-websocket-client
+ depends = python2-numpy
+ depends = python2-scipy
+ depends = python2-requests
+ depends = python2-tornado
+ depends = python2-pyzmq
+ depends = python2-six
+ depends = python2-torchfile
+ provides = python2-visdom
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..09591440016
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: otaj
+#
+# Thanks to Jeremy "Ichimonji10" Audet <ichimonji10 at gmail dot com> for
+# his PKGBUILD that served as a base for this one
+
+pkgbase=python-visdom-git
+_pkgbase="visdom"
+pkgname=(python-visdom-git python2-visdom-git)
+pkgver=r209.2ef12d4
+pkgrel=1
+arch=(any)
+url='https://github.com/facebookresearch/visdom'
+license=(CCPL:by-nc)
+makedepends=(
+ 'python-setuptools'
+ 'python2-setuptools'
+)
+options=(!emptydirs)
+source=("git+https://github.com/facebookresearch/visdom.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "visdom"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+package_python-visdom-git() {
+depends=('python-websocket-client' 'python-numpy' 'python-scipy' 'python-requests' 'python-tornado' 'python-pyzmq' 'python-six' 'python-torchfile')
+provides=('python-visdom')
+install='visdom.install'
+ cd "${srcdir}/visdom"
+ python setup.py install --root="${pkgdir}/" --optimize=1
+ install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ chmod -R 775 $pkgdir/usr/lib/python3.7/site-packages/visdom
+}
+
+package_python2-visdom-git() {
+depends=('python2-websocket-client' 'python2-numpy' 'python2-scipy' 'python2-requests' 'python2-tornado' 'python2-pyzmq' 'python2-six' 'python2-torchfile')
+provides=('python2-visdom')
+install='visdom2.install'
+ cd "${srcdir}/visdom"
+ python2 setup.py install --root="${pkgdir}/" --optimize=1
+ mv $pkgdir/usr/bin/visdom $pkgdir/usr/bin/visdom2
+ install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ chmod -R 775 $pkgdir/usr/lib/python2.7/site-packages/visdom
+}
diff --git a/visdom.install b/visdom.install
new file mode 100644
index 00000000000..fd0830b8f8d
--- /dev/null
+++ b/visdom.install
@@ -0,0 +1,11 @@
+post_install(){
+ groupadd -f visdom
+ chown -R :visdom /usr/lib/python3.7/site-packages/visdom
+ chmod -R g+w /usr/lib/python3.7/site-packages/visdom
+ echo "\n\nAdd yourself into visdom group\n\n"
+}
+
+post_remove(){
+ if ! [ -d /usr/lib/python2.7/site-packages/visdom ] ; then groupdel visdom ; fi
+}
+
diff --git a/visdom2.install b/visdom2.install
new file mode 100644
index 00000000000..fa217f3db3f
--- /dev/null
+++ b/visdom2.install
@@ -0,0 +1,11 @@
+post_install(){
+ groupadd -f visdom
+ chown -R :visdom /usr/lib/python2.7/site-packages/visdom
+ chmod -R g+w /usr/lib/python2.7/site-packages/visdom
+ echo "Add yourself into visdom group"
+}
+
+post_remove(){
+ if ! [ -d /usr/lib/python3.7/site-packages/visdom ] ; then groupdel visdom ; fi
+}
+