[arch-commits] Commit in sagemath/trunk (PKGBUILD kernel.json)

Antonio Rojas arojas at archlinux.org
Sun Aug 16 16:23:43 UTC 2015


    Date: Sunday, August 16, 2015 @ 18:23:42
  Author: arojas
Revision: 138419

Fixes for IPython 4, add Jupyter kernel file

Added:
  sagemath/trunk/kernel.json
Modified:
  sagemath/trunk/PKGBUILD

-------------+
 PKGBUILD    |   22 ++++++++++++++++++----
 kernel.json |    1 +
 2 files changed, 19 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-08-16 15:33:52 UTC (rev 138418)
+++ PKGBUILD	2015-08-16 16:23:42 UTC (rev 138419)
@@ -9,7 +9,7 @@
 
 pkgname=sagemath
 pkgver=6.8
-pkgrel=2
+pkgrel=3
 pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
 arch=(i686 x86_64)
 url="http://www.sagemath.org"
@@ -32,11 +32,12 @@
 provides=(sage-mathematics)
 source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz" 
 # "http://www.sagemath.org/packages/upstream/pexpect/pexpect-2.0.tar.bz2" 
-"http://mirrors.mit.edu/sage/spkg/upstream/pexpect/pexpect-2.0.tar.bz2"
+"http://mirrors.mit.edu/sage/spkg/upstream/pexpect/pexpect-2.0.tar.bz2" 'kernel.json'
 'anal.h' 'package.patch' 'env.patch' 'paths.patch' 'clean.patch' 'skip-check.patch' 
-'pexpect-env.patch' 'pexpect-del.patch' 'disable-fes.patch' 'cython-0.23.patch')
+'pexpect-env.patch' 'pexpect-del.patch' 'disable-fes.patch' 'cython-0.23.patch' 'ipython-4.patch')
 md5sums=('943780ef4460e38f28fefe95e3138981'
          'd9a3e113ed147dcee8f89962a8dccd43'
+         '4cee4f96bcd877587e7efc40c20adba7'
          'a906a180d198186a39820b0a2f9a9c63'
          'f72e544032b1a3f952b7ddafc3a49d63'
          '843a6cc3b17a1850604593813321418e'
@@ -46,7 +47,8 @@
          'a83a3b1bc7fcb7cbf752a83a8311fc42'
          'f333939ea6c41377b66407c81016cee4'
          '4eb23a3c7363258bc9ba764d6e5512ba'
-         '1b8dfa047115180aa0afbeaf19d97762')
+         '1b8dfa047115180aa0afbeaf19d97762'
+         'b21a2b0e4cb805bf61a5060c3ed97cb3')
 
 prepare(){
   cd sage-$pkgver
@@ -77,6 +79,8 @@
   sed -e "s|os.path.join(SAGE_ROOT, 'sage')|'/usr/bin/sage'|" -i src/sage/repl/ipython_kernel/install.py
 # find bliss headers
   sed -e 's|graph.hh|bliss/graph.hh|' -i src/sage/graphs/bliss.pyx
+# fix IPython 4 compatibility
+  patch -p0 -i ../ipython-4.patch
 
 # Upstream patches  
 # fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209
@@ -156,4 +160,14 @@
   python2 setup.py install --root="$pkgdir" --optimize=1
   mkdir -p "$pkgdir"/usr/lib/sage/site-packages/
   mv "$pkgdir"/usr/lib/python2.7/site-packages/pexpect* "$pkgdir"/usr/lib/sage/site-packages/
+
+# Install Jupyter kernel
+  install -Dm644 "$srcdir"/kernel.json "$pkgdir"/usr/share/jupyter/kernels/sagemath/kernel.json
+  cd "$pkgdir"/usr/share/jupyter/kernels/sagemath
+  ln -s /usr/share/doc/sage/output/html/en doc
+  ln -s /usr/share/sage/ext/notebook-ipython/logo.svg .
+  ln -s /usr/share/sage/ext/notebook-ipython/logo-64x64.png .
+
+  mkdir "$pkgdir"/usr/share/jupyter/nbextensions
+  ln -s /usr/share/{jsmol,mathjax} "$pkgdir"/usr/share/jupyter/nbextensions
 }

Added: kernel.json
===================================================================
--- kernel.json	                        (rev 0)
+++ kernel.json	2015-08-16 16:23:42 UTC (rev 138419)
@@ -0,0 +1 @@
+{"display_name": "SageMath", "argv": ["/usr/bin/sage", "-python", "-m", "sage.repl.ipython_kernel", "-f", "{connection_file}"]}



More information about the arch-commits mailing list