File python-jupyter_octave_kernel.spec of Package python-jupyter_octave_kernel
#
# spec file for package python-jupyter_octave_kernel
#
# Copyright (c) 2018 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/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_with test
Name: python-jupyter_octave_kernel
Version: 0.28.3
Release: 0
Summary: Jupyter kernel for Octave
License: BSD-3-Clause
Group: Development/Languages/Python
Url: http://github.com/Calysto/octave_kernel
Source: https://files.pythonhosted.org/packages/py2.py3/o/octave_kernel/octave_kernel-%{version}-py2.py3-none-any.whl
Source10: https://raw.githubusercontent.com/Calysto/octave_kernel/v%{version}/LICENSE.txt
Source11: https://raw.githubusercontent.com/Calysto/octave_kernel/v%{version}/README.rst
BuildRequires: %{python_module devel}
BuildRequires: %{python_module certifi}
BuildRequires: %{python_module jupyter_client >= 4.3.0}
BuildRequires: %{python_module jupyter_ipykernel}
BuildRequires: %{python_module jupyter_metakernel >= 0.18.0}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with test}
BuildRequires: octave
BuildRequires: python3-jupyter_kernel_test
%endif
Requires: octave
Requires: python-certifi
Requires: python-jupyter_client >= 4.3.0
Requires: python-jupyter_ipykernel
Requires: python-jupyter_metakernel >= 0.18.0
BuildArch: noarch
%python_subpackages
%description
An Octave kernel for Jupyter.
%prep
%setup -c -T
cp %{SOURCE10} .
cp %{SOURCE11} .
%build
# note needed
%install
%python_expand pip%{$python_bin_suffix} install --root=%{buildroot} %{SOURCE0}
sed -i "s|\"python\"|\"%{__python3}\"|" %{buildroot}%{_datadir}/jupyter/kernels/octave/kernel.json
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%{fdupes %{buildroot}%{_datadir}/jupyter/ %{buildroot}%{python3_sitelib}}
%if %{with test}
%check
export PYTHONPATH=%{buildroot}%{python3_sitelib}
python3 test_octave_kernel.py
%endif
%files %{python_files}
%doc README.rst
%license LICENSE.txt
%{python_sitelib}/*
%python3_only %{_datadir}/jupyter/kernels/octave/
%changelog