# # spec file for package python-jupyter_console # # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: python-jupyter_console Version: 4.1.0 Release: 0 Summary: Jupyter terminal console License: BSD-3-Clause Group: Development/Languages/Python Url: http://jupyter.org Source: https://pypi.python.org/packages/source/j/jupyter_console/jupyter_console-%{version}.tar.gz BuildRequires: python-devel BuildRequires: python-jupyter_client BuildRequires: python-jupyter_ipykernel BuildRequires: python-jupyter_ipython BuildRequires: python-setuptools # Test requirements BuildRequires: python-nose # Python 2.x test requirements BuildRequires: python-mock Requires: python-jupyter_client Requires: python-jupyter_ipykernel Requires: python-jupyter_ipython Requires(post): update-alternatives Requires(postun): update-alternatives BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %else BuildArch: noarch %endif %description A terminal-based console frontend for Jupter kernels. This code is based on the single-process IPython terminal. %prep %setup -q -n jupyter_console-%{version} %build python setup.py build %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} mv %{buildroot}%{_bindir}/jupyter-console %{buildroot}%{_bindir}/jupyter2-console ln -s %{_bindir}/jupyter2-console %{buildroot}%{_bindir}/jupyter-console-%{py_ver} # Prepare for update-alternatives usage mkdir -p %{buildroot}%{_sysconfdir}/alternatives ln -s -f %{_sysconfdir}/alternatives/jupyter-console %{buildroot}%{_bindir}/jupyter-console # create a dummy target for /etc/alternatives/jupyter-console touch %{buildroot}%{_sysconfdir}/alternatives/jupyter-console %post %_sbindir/update-alternatives \ --install %{_bindir}/jupyter-console jupyter-console %{_bindir}/jupyter-console-%{py_ver} 30 %postun if [ $1 -eq 0 ] ; then %_sbindir/update-alternatives --remove jupyter-console %{_bindir}/jupyter-console-%{py_ver} fi %check nosetests jupyter_console %files %defattr(-,root,root,-) %doc CONTRIBUTING.md COPYING.md README.md %{_bindir}/jupyter-console %{_bindir}/jupyter2-console %{_bindir}/jupyter-console-%{py_ver} %ghost %{_sysconfdir}/alternatives/jupyter-console %{python_sitelib}/* %changelog