Skip to content

Commit

Permalink
Separate Splash-Jupyter kernels for Python 2 and Python 3. See GH-371.
Browse files Browse the repository at this point in the history
  • Loading branch information
kmike committed Jan 25, 2016
1 parent 3692711 commit 8c883b5
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ recursive-include splash/lua_modules *.lua *.md *.rst *.txt
recursive-include splash/tests *.txt *.js *.ini *.lua
recursive-include splash/vendor/harviewer/webapp *.js *.html *.css *.gif *.png *.swf *.html
recursive-include splash/kernel/inspections *.json
recursive-include splash/kernel/kernels *.json
recursive-include splash/kernel/kernels *.json *.png
2 changes: 1 addition & 1 deletion dockerfiles/splash-jupyter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN apt-get update -q && \
libzmq3-dev \
libsqlite3-dev && \
pip3 install \
ipython[notebook]==4.0.2 && \
ipython[notebook]==4.0.3 && \
apt-get remove -y --purge \
python3-dev \
build-essential \
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def get_version():
'lua_modules/*.lua',
'lua_modules/vendor/*.lua',
'kernel/inspections/*.json',
'kernel/kernels/splash/*.json',
'kernel/kernels/splash-py2/*.*',
'kernel/kernels/splash-py3/*.*',
]},
'zip_safe': False,
'install_requires': [
Expand Down
3 changes: 2 additions & 1 deletion splash/kernel/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@

def install(user=True):
""" Install IPython kernel specification """
folder = os.path.join(os.path.dirname(__file__), 'kernels', 'splash')
name = 'splash-py2' if six.PY2 else 'splash-py3'
folder = os.path.join(os.path.dirname(__file__), 'kernels', name)
install_kernel_spec(folder, kernel_name="splash", user=user, replace=True)


Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions splash/kernel/kernels/splash-py3/kernel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"argv": ["python3", "-m", "splash.kernel", "-f", "{connection_file}"],
"display_name": "Splash",
"name": "Splash",
"language": "lua"
}
Binary file added splash/kernel/kernels/splash-py3/logo-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added splash/kernel/kernels/splash-py3/logo-64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8c883b5

Please sign in to comment.