Skip to content

Commit fa6fd69

Browse files
committed
Merge pull request #222 from arokem/josephcslater-master
Update with nbformat
2 parents 641d5e7 + fca113a commit fa6fd69

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ before_install:
2626
- conda info -a
2727
- travis_retry conda create -n test $CONDA IPython pip nose pyzmq jsonschema
2828
- source activate test
29+
- if [[ $CONDA == python=3.3* ]]; then
30+
pip install nbformat;
31+
else
32+
travis_retry conda install nbformat;
33+
fi
2934
- travis_retry pip install coveralls
3035

3136
install:

pymatbridge/publish.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
import IPython.nbformat.v4 as nbformat
2-
from IPython.nbformat import write as nbwrite
1+
try:
2+
import nbformat.v4 as nbformat
3+
from nbformat import write as nbwrite
4+
except ImportError:
5+
import IPython.nbformat.v4 as nbformat
6+
from IPython.nbformat import write as nbwrite
7+
38
import numpy as np
49

510

0 commit comments

Comments
 (0)