a6c7d91
# Unset -s on python shebang - ensure that extensions installed with pip
a6c7d91
# to user locations are seen and properly loaded
61512cd
%global py3_shebang_flags %(echo %py3_shebang_flags | sed s/s//)
a6c7d91
5aff8a5
%global pypi_name qtconsole
5aff8a5
5aff8a5
Name:		python-%{pypi_name}
37d1a35
Version:	5.3.2
fb4c1b6
Release:	%autorelease
5aff8a5
Summary:	Jupyter Qt console
5aff8a5
5aff8a5
#license clarification issue opened with upstream
5aff8a5
# https://github.com/jupyter/qtconsole/issues/142
5aff8a5
License:	BSD
5aff8a5
5aff8a5
URL:		http://jupyter.org
5aff8a5
Source0:	https://files.pythonhosted.org/packages/source/q/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
5aff8a5
BuildArch:	noarch
985f58e
5aff8a5
BuildRequires:	python3-setuptools
5aff8a5
BuildRequires:	python3-devel
5aff8a5
BuildRequires:	python3-ipython-sphinx
c414a51
BuildRequires:	python3-sphinx_rtd_theme
5aff8a5
5aff8a5
BuildRequires:	desktop-file-utils
5aff8a5
5aff8a5
%description
5aff8a5
Qt-based console for Jupyter with support for rich media output
5aff8a5
5aff8a5
%package -n     python3-%{pypi_name}
5aff8a5
Summary:	Jupyter Qt console
5aff8a5
%{?python_provide:%python_provide python3-%{pypi_name}}
735e9a9
735e9a9
Provides:	python3-ipython-gui = %{version}-%{release}
735e9a9
%{?python_provide:%python_provide python3-ipython-gui}
735e9a9
Obsoletes:	python3-ipython-gui < 4
5aff8a5
 
d5275b4
Requires:	python3-qt5
5aff8a5
Requires:	python3-traitlets
c4ceb31
Requires:	python3-jupyter-core
5aff8a5
Requires:	python3-jupyter-client >= 4.1
5aff8a5
Requires:	python3-pygments
5aff8a5
Requires:	python3-ipykernel >= 4.1
5aff8a5
Requires:	python3-setuptools
5aff8a5
5aff8a5
%description -n python3-%{pypi_name}
5aff8a5
Qt-based console for Jupyter with support for rich media output
5aff8a5
5aff8a5
%package -n python-%{pypi_name}-doc
5aff8a5
Summary:	Documentation subpackage for qtconsole
5aff8a5
5aff8a5
%description -n python-%{pypi_name}-doc
5aff8a5
Documentation for qtconsole
5aff8a5
5aff8a5
%prep
5aff8a5
%autosetup -n %{pypi_name}-%{version}
5aff8a5
5aff8a5
%build
5aff8a5
%py3_build
5aff8a5
5aff8a5
# generate html docs 
5aff8a5
sphinx-build docs/source html
5aff8a5
5aff8a5
# fix file encoding and utf-8
5aff8a5
sed -i 's/\r$//' html/objects.inv
5aff8a5
5aff8a5
5aff8a5
# remove the sphinx-build leftovers
5aff8a5
rm -rf html/.{doctrees,buildinfo}
5aff8a5
5aff8a5
%install
5aff8a5
%py3_install
5988e24
desktop-file-install --dir=%{buildroot}%{_datadir}/applications examples/jupyter-qtconsole.desktop
5aff8a5
5aff8a5
%files -n python3-%{pypi_name} 
c414a51
%license LICENSE
5aff8a5
%doc README.md
5988e24
%{_bindir}/jupyter-qtconsole
5988e24
%{_datadir}/applications/jupyter-qtconsole.desktop
526977e
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info
5aff8a5
%{python3_sitelib}/%{pypi_name}/*
5aff8a5
%dir %{python3_sitelib}/%{pypi_name}/
5aff8a5
5aff8a5
%files -n python-%{pypi_name}-doc
5aff8a5
%doc html 
5aff8a5
5aff8a5
%changelog
fb4c1b6
%autochangelog