From b9ffd1428eb504c59f51abb8657a3ebab18af2c2 Mon Sep 17 00:00:00 2001 From: Min RK Date: Sat, 11 Jul 2015 16:35:39 -0500 Subject: [PATCH] include version in --version output --- notebook/nbextensions.py | 5 +++-- notebook/notebookapp.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/notebook/nbextensions.py b/notebook/nbextensions.py index 68ad02e33..86650e64a 100644 --- a/notebook/nbextensions.py +++ b/notebook/nbextensions.py @@ -24,6 +24,7 @@ from jupyter_core.paths import jupyter_data_dir, jupyter_path, SYSTEM_JUPYTER_PA from ipython_genutils.path import ensure_dir_exists from ipython_genutils.py3compat import string_types, cast_unicode_py2 from ipython_genutils.tempdir import TemporaryDirectory +from ._version import __version__ class ArgumentConflict(ValueError): pass @@ -258,7 +259,7 @@ aliases = { class InstallNBExtensionApp(JupyterApp): """Entry point for installing notebook extensions""" - + version = __version__ description = """Install Jupyter notebook extensions Usage @@ -317,7 +318,7 @@ class InstallNBExtensionApp(JupyterApp): class NBExtensionApp(JupyterApp): name = "jupyter nbextension" - + version = __version__ description = "Work with Jupyter notebook extensions" subcommands = dict( diff --git a/notebook/notebookapp.py b/notebook/notebookapp.py index 0287b0d97..726d71894 100644 --- a/notebook/notebookapp.py +++ b/notebook/notebookapp.py @@ -52,6 +52,7 @@ from tornado.log import LogFormatter, app_log, access_log, gen_log from notebook import ( DEFAULT_STATIC_FILES_PATH, DEFAULT_TEMPLATE_PATH_LIST, + __version__, ) from .base.handlers import Template404 from .log import log_request @@ -269,7 +270,7 @@ class NotebookWebApplication(web.Application): class NbserverListApp(JupyterApp): - + version = __version__ description="List currently running notebook servers in this profile." flags = dict( @@ -341,7 +342,7 @@ aliases.update({ class NotebookApp(JupyterApp): name = 'jupyter-notebook' - + version = __version__ description = """ The Jupyter HTML Notebook.