diff --git a/__init__.py b/__init__.py index 1f295a3..87bdaf6 100644 --- a/__init__.py +++ b/__init__.py @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # + def isnotebook(): try: shell = get_ipython().__class__.__name__ @@ -27,4 +28,4 @@ def isnotebook(): if isnotebook(): from sas_kernel.magics.log_magic import logMagic - get_ipython().register_magics(logMagic) \ No newline at end of file + get_ipython().register_magics(logMagic) diff --git a/binder/postBuild b/binder/postBuild index c4da38a..ba97c81 100644 --- a/binder/postBuild +++ b/binder/postBuild @@ -21,14 +21,14 @@ mkdir -p ~/.config/saspy/ cp ./binder/sascfg_personal.py ~/.config/saspy/ #set -ex -jupyter kernelspec list -jupyter nbextension list +# jupyter kernelspec list +# jupyter nbextension list -jupyter nbextension install --py sas_kernel.showSASLog --user -jupyter nbextension enable sas_kernel.showSASLog --py +# jupyter nbextension install --py sas_kernel.showSASLog --user +# jupyter nbextension enable sas_kernel.showSASLog --py -jupyter nbextension install --py sas_kernel.theme --user -jupyter nbextension enable sas_kernel.theme --py +# jupyter nbextension install --py sas_kernel.theme --user +# jupyter nbextension enable sas_kernel.theme --py -jupyter nbextension list +# jupyter nbextension list diff --git a/sas_kernel/__init__.py b/sas_kernel/__init__.py index d37b2d2..329df45 100644 --- a/sas_kernel/__init__.py +++ b/sas_kernel/__init__.py @@ -15,3 +15,4 @@ """SAS Kernel Juypter Implementation""" +from .version import __version__ diff --git a/sas_kernel/showSASLog/__init__.py b/sas_kernel/showSASLog/__init__.py index f6aceea..e9b392b 100644 --- a/sas_kernel/showSASLog/__init__.py +++ b/sas_kernel/showSASLog/__init__.py @@ -13,8 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -from sas_kernel import __version__ +# from .sas_kernel import __version__ def _jupyter_nbextension_paths(): return [dict(section="notebook", diff --git a/sas_kernel/theme/__init__.py b/sas_kernel/theme/__init__.py index 283351c..5739bc7 100644 --- a/sas_kernel/theme/__init__.py +++ b/sas_kernel/theme/__init__.py @@ -15,7 +15,7 @@ # """SAS Kernel Juypter Implementation""" -from sas_kernel import __version__ +# from .sas_kernel import __version__ def _jupyter_nbextension_paths(): - return [dict(section="notebook", src="", dest="theme", require="theme/theme_selector")] \ No newline at end of file + return [dict(section="notebook", src="", dest="theme", require="theme/theme_selector")] diff --git a/sas_kernel/_version.py b/sas_kernel/version.py similarity index 100% rename from sas_kernel/_version.py rename to sas_kernel/version.py diff --git a/setup.py b/setup.py index 11dc735..010d160 100644 --- a/setup.py +++ b/setup.py @@ -14,15 +14,18 @@ # See the License for the specific language governing permissions and # limitations under the License. # + +exec(open('./sas_kernel/version.py').read()) +print("Installing sas_kernel version:{}".format(__version__)) try: from setuptools import setup, find_packages except ImportError: from distutils.core import setup, find_packages from distutils.command.install import install -import os -import sys -from sas_kernel._version import __version__ +import os, sys + +# from sas_kernel._version import __version__ SVEM_FLAG = '--single-version-externally-managed' if SVEM_FLAG in sys.argv: @@ -58,9 +61,10 @@ def run(self): "jupyter_client>=6", "IPython>=7.12.0"], setup_requires=["jupyter_client>=6", "IPython>=7.12.0"], extras_require={'jlab_ext': ['jupyterlab >=3 ', - 'jlab_create_sas_file', - 'sas2nb', - 'sas_log_viewer_v2']}, + # 'sas2nb', + # 'sas_log_viewer_v2', + 'jlab_create_sas_file' + ]}, classifiers=['Framework :: IPython', 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python :: 3',