diff options
author | Eduardo Sánchez Muñoz | 2016-02-17 15:07:42 +0100 |
---|---|---|
committer | Eduardo Sánchez Muñoz | 2016-02-17 15:07:42 +0100 |
commit | d1c5c8f1681382b3e883ff44af460e24cc3d5bfc (patch) | |
tree | b99fe385eab3d6988437807b0b5dc3a211c37857 | |
parent | 0e35302e3600b6eef001068927b4ca2dfcf2725a (diff) | |
download | aur-d1c5c8f1681382b3e883ff44af460e24cc3d5bfc.tar.gz |
Add Jupyter kernel
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 33 | ||||
-rw-r--r-- | cling-jupyter-path.diff | 14 |
3 files changed, 48 insertions, 13 deletions
@@ -1,8 +1,8 @@ # Generated by mksrcinfo v8 -# Tue Dec 22 19:14:03 UTC 2015 +# Wed Feb 17 14:07:25 UTC 2016 pkgbase = cling-git pkgdesc = Interactive C++ interpreter built on the top of LLVM and Clang libraries. - pkgver = r2795.7644a68 + pkgver = r2850.a754fcc pkgrel = 1 url = https://root.cern.ch/cling arch = i686 @@ -12,13 +12,21 @@ pkgbase = cling-git makedepends = libffi makedepends = git makedepends = python2 - depends = libffi + makedepends = jupyter + makedepends = python-pip source = llvm::git+http://root.cern.ch/git/llvm.git#branch=cling-patches source = clang::git+http://root.cern.ch/git/clang.git#branch=cling-patches source = cling::git+http://root.cern.ch/git/cling.git#branch=master + source = cling-jupyter-path.diff sha256sums = SKIP sha256sums = SKIP sha256sums = SKIP + sha256sums = 2d601fe5c75388a0c9e6cdbef6d15f356ea7b9957c9d56525becf247025a7ed2 pkgname = cling-git + depends = libffi + +pkgname = cling-jupyter-git + depends = cling-git + depends = jupyter @@ -1,21 +1,21 @@ # Maintainer: Eduardo Sánchez Muñoz -pkgname=cling-git -pkgver=r2795.7644a68 +pkgname=(cling-git cling-jupyter-git) +pkgver=r2850.a754fcc pkgrel=1 pkgdesc="Interactive C++ interpreter built on the top of LLVM and Clang libraries." arch=('i686' 'x86_64') url="https://root.cern.ch/cling" license=('custom:Cling Release License') -depends=('libffi') -makedepends=('cmake' 'libffi' 'git' 'python2') -options=() -conflicts=() -provides=() +makedepends=('cmake' 'libffi' 'git' 'python2' 'jupyter' 'python-pip') source=("llvm::git+http://root.cern.ch/git/llvm.git#branch=cling-patches" "clang::git+http://root.cern.ch/git/clang.git#branch=cling-patches" - "cling::git+http://root.cern.ch/git/cling.git#branch=master") -sha256sums=('SKIP' 'SKIP' 'SKIP') + "cling::git+http://root.cern.ch/git/cling.git#branch=master" + "cling-jupyter-path.diff") +sha256sums=('SKIP' + 'SKIP' + 'SKIP' + '2d601fe5c75388a0c9e6cdbef6d15f356ea7b9957c9d56525becf247025a7ed2') pkgver() { cd "$srcdir/cling" @@ -30,6 +30,9 @@ prepare() { if [ ! -h "$srcdir/llvm/tools/cling" ]; then ln -s "$srcdir/cling" "$srcdir/llvm/tools/cling" fi + + cd "$srcdir/cling" + git apply "$srcdir/cling-jupyter-path.diff" } build() { @@ -54,7 +57,9 @@ build() { make -C tools/cling } -package() { +package_cling-git() { + depends=('libffi') + cd "$srcdir/cling-build" make -C tools/clang DESTDIR="$pkgdir" install make -C tools/cling DESTDIR="$pkgdir" install @@ -64,3 +69,11 @@ package() { install -Dm644 "$srcdir/llvm/tools/cling/LICENSE.TXT" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } + +package_cling-jupyter-git() { + depends=('cling-git' 'jupyter') + + cd "$srcdir/cling/tools/Jupyter/kernel" + python3 setup.py install --prefix=/usr --root="$pkgdir" + jupyter-kernelspec install --prefix="$pkgdir/usr" cling +} diff --git a/cling-jupyter-path.diff b/cling-jupyter-path.diff new file mode 100644 index 000000000000..6b0e4f5abdb2 --- /dev/null +++ b/cling-jupyter-path.diff @@ -0,0 +1,14 @@ +diff --git a/tools/Jupyter/kernel/clingkernel.py b/tools/Jupyter/kernel/clingkernel.py +index 9decdda..079b245 100644 +--- a/tools/Jupyter/kernel/clingkernel.py ++++ b/tools/Jupyter/kernel/clingkernel.py +@@ -67,7 +67,8 @@ class ClingKernel(Kernel): + + def __init__(self, **kwargs): + super(ClingKernel, self).__init__(**kwargs) +- whichCling = shutil.which('cling') ++ #whichCling = shutil.which('cling') ++ whichCling = "/opt/cling/bin/cling" + if whichCling: + clingInstDir = os.path.dirname(os.path.dirname(whichCling)) + llvmResourceDir = clingInstDir |