Blob Blame History Raw
%global pypi_name qtconsole

Name:		python-%{pypi_name}
Version:	4.3.1
Release:	4%{?dist}
Summary:	Jupyter Qt console

#license clarification issue opened with upstream
# https://github.com/jupyter/qtconsole/issues/142
License:	BSD

URL:		http://jupyter.org
Source0:	https://files.pythonhosted.org/packages/source/q/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:	noarch
 
BuildRequires:	python2-setuptools
BuildRequires:	python2-devel
BuildRequires:	python2-sphinx
BuildRequires:	python2-ipython-sphinx
 
BuildRequires:	python3-setuptools
BuildRequires:	python3-devel
BuildRequires:	python3-ipython-sphinx

BuildRequires:	desktop-file-utils

%description
Qt-based console for Jupyter with support for rich media output

%package -n     python2-%{pypi_name}
Summary:	Jupyter Qt console
%{?python_provide:%python_provide python2-%{pypi_name}}

%if 0%{?fedora} > 25
Provides:	python2-ipython-gui = %{version}-%{release}
%{?python_provide:%python_provide python2-ipython-gui}
Obsoletes:	python2-ipython-gui < 4
%endif
 
Requires:	python2-qt5
Requires:	python2-traitlets
Requires:	python2-jupyter-core
Requires:	python2-jupyter-client >= 4.1
Requires:	python2-pygments
Requires:	python2-ipykernel >= 4.1
Requires:	python2-setuptools


%description -n python2-%{pypi_name}
Qt-based console for Jupyter with support for rich media output

%package -n     python3-%{pypi_name}
Summary:	Jupyter Qt console
%{?python_provide:%python_provide python3-%{pypi_name}}

%if 0%{?fedora} > 25
Provides:	python3-ipython-gui = %{version}-%{release}
%{?python_provide:%python_provide python3-ipython-gui}
Obsoletes:	python3-ipython-gui < 4
%endif
 
Requires:	python3-qt5
Requires:	python3-traitlets
Requires:	python3-jupyter_core
Requires:	python3-jupyter-client >= 4.1
Requires:	python3-pygments
Requires:	python3-ipykernel >= 4.1
Requires:	python3-setuptools

# executables moved from py2 to py3
# https://bugzilla.redhat.com/show_bug.cgi?id=1410332
# Can be removed in Fedora 30
Conflicts:      python2-%{pypi_name} < 4.3.0-2

%description -n python3-%{pypi_name}
Qt-based console for Jupyter with support for rich media output

%package -n python-%{pypi_name}-doc
Summary:	Documentation subpackage for qtconsole

%description -n python-%{pypi_name}-doc
Documentation for qtconsole

%prep
%autosetup -n %{pypi_name}-%{version}

%build
%py2_build
%py3_build

# generate html docs 
sphinx-build docs/source html

# fix file encoding and utf-8
sed -i 's/\r$//' html/objects.inv


# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}

%install
%py2_install
rm %{buildroot}%{_bindir}/*

%py3_install
desktop-file-install --dir=%{buildroot}%{_datadir}/applications examples/jupyter-qtconsole.desktop


%files -n python2-%{pypi_name} 
%license COPYING.md
%doc README.md
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%{python2_sitelib}/%{pypi_name}/*
%dir %{python2_sitelib}/%{pypi_name}/

%files -n python3-%{pypi_name} 
%license COPYING.md
%doc README.md
%{_bindir}/jupyter-qtconsole
%{_datadir}/applications/jupyter-qtconsole.desktop
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%{python3_sitelib}/%{pypi_name}/*
%dir %{python3_sitelib}/%{pypi_name}/

%files -n python-%{pypi_name}-doc
%doc html 

%changelog
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 4.3.1-4
- Rebuilt for Python 3.7

* Fri Mar 23 2018 Iryna Shcherbina <ishcherb@redhat.com> - 4.3.1-3
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Sun Sep 10 2017 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 4.3.1-1
- Update to 4.3.1

* Fri Sep 01 2017 Miro Hrončok <mhroncok@redhat.com> - 4.3.0-2
- Move executables from py2 to py3 (#1410332)

* Wed Aug 16 2017 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 4.3.0-1
- Update to 4.3.0
- Added python{,3}-qt5 as requires (fixes #1482258 & #1478629)

* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

* Wed Mar 15 2017 Miro Hrončok <mhroncok@redhat.com> - 4.2.1-7
- Provide/Obsolete pythonX-ipython-gui

* Wed Feb 22 2017 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 4.2.1-6
- Fix python dependencies (py2 sub-package does not req py3)

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Sat Sep 24 2016 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 4.2.1-4
- Removed scripts; F25+ only

* Sat Sep 24 2016 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 4.2.1-3
- Added scripts for desktop database (fixes embarassing oversight!)

* Sat Sep 24 2016 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 4.2.1-2
- Fix typos in description
- Fix typos in summary
- Add BR: desktop-file-utils
- Add desktop files

* Fri Aug 12 2016 Mukundan Ragavan <nonamedotc@gmail.com> - 4.2.1-1
- Initial package.