summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Handley2017-11-02 21:32:46 +0000
committerWill Handley2017-11-02 21:32:46 +0000
commit1a2b367ca7eb419ed305752e2863424b2781aa99 (patch)
tree2723fff5d906871a1e01a83ef51804727c8f7080
downloadaur-1a2b367ca7eb419ed305752e2863424b2781aa99.tar.gz
Added a git version
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD49
2 files changed, 66 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..92bdfdafc170
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+# Generated by mksrcinfo v8
+# Thu Nov 2 21:32:32 UTC 2017
+pkgbase = vim-vim-ipython-git
+ pkgdesc = A two-way integration between Vim and IPython 0.11+
+ pkgver = r165.42499f0
+ pkgrel = 1
+ url = https://github.com/ivanov/vim-ipython
+ arch = any
+ makedepends = git
+ depends = python2-ipykernel
+ provides = vim-vim-ipython
+ conflicts = vim-vim-ipython
+ source = vim-vim-ipython::git+https://github.com/ivanov/vim-ipython.git
+ md5sums = SKIP
+
+pkgname = vim-vim-ipython-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6e6c340fd0d7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Will Handley <wh260@cam.ac.uk> (aur.archlinux.org/account/wjhandley)
+_pkgname=vim-ipython
+pkgname=vim-$_pkgname-git
+pkgver=r165.42499f0
+pkgrel=1
+pkgdesc="A two-way integration between Vim and IPython 0.11+"
+arch=('any')
+url="https://github.com/ivanov/vim-ipython"
+license=('')
+groups=()
+depends=('python2-ipykernel')
+makedepends=('git')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+replaces=()
+backup=()
+options=()
+install=
+source=("${pkgname%-git}::git+$url.git")
+noextract=()
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+package() {
+ cd "$srcdir/${pkgname%-git}"
+ installpath="${pkgdir}/usr/share/vim/vimfiles"
+
+ # insert code in pre-python.vim to ipy.vim
+ # this sets the default pyx to be python3, which is necessary for arch
+ cat >pre-python.vim << EOF
+if has('python3')
+ set pyx=3
+elseif has('python')
+ set pyx=2
+endif
+EOF
+
+ cat pre-python.vim ftplugin/python/ipy.vim > temp.vim
+ rm pre-python.vim
+ mv temp.vim ftplugin/python/ipy.vim
+
+ # install
+ install -d $installpath/ftplugin/python
+ install -Dm644 ftplugin/python/* $installpath/ftplugin/python
+}