%global pypi_name qtconsole Name: python-%{pypi_name} Version: 4.2.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: python-setuptools BuildRequires: python2-devel BuildRequires: python-sphinx BuildRequires: python-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}} Requires: python-traitlets Requires: python-jupyter_core Requires: python-jupyter-client >= 4.1 Requires: python-pygments Requires: python-ipykernel >= 4.1 Requires: python-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}} Requires: python3-traitlets Requires: python3-jupyter_core Requires: python3-jupyter-client >= 4.1 Requires: python3-pygments Requires: python3-ipykernel >= 4.1 Requires: python3-setuptools %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} # prepare desktop files pushd examples sed 's/jupyter qtconsole/jupyter-qtconsole-2/' jupyter-qtconsole.desktop > jupyter-qtconsole-2.desktop sed 's/jupyter qtconsole/jupyter-qtconsole-3/' jupyter-qtconsole.desktop > jupyter-qtconsole-3.desktop popd %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 # Must do the subpackages' install first because the scripts in /usr/bin are # overwritten with every setup.py install. %py3_install cp %{buildroot}/%{_bindir}/jupyter-qtconsole %{buildroot}/%{_bindir}/jupyter-qtconsole-3 ln -sf %{_bindir}/jupyter-qtconsole-3 %{buildroot}/%{_bindir}/jupyter-qtconsole-%{python3_version} desktop-file-install --dir=%{buildroot}%{_datadir}/applications examples/jupyter-qtconsole-3.desktop %py2_install cp %{buildroot}/%{_bindir}/jupyter-qtconsole %{buildroot}/%{_bindir}/jupyter-qtconsole-2 ln -sf %{_bindir}/jupyter-qtconsole-2 %{buildroot}/%{_bindir}/jupyter-qtconsole-%{python2_version} desktop-file-install --dir=%{buildroot}%{_datadir}/applications examples/jupyter-qtconsole-2.desktop %files -n python2-%{pypi_name} %license COPYING.md %doc README.md %{_bindir}/jupyter-qtconsole %{_bindir}/jupyter-qtconsole-2 %{_bindir}/jupyter-qtconsole-%{python2_version} %{_datadir}/applications/jupyter-qtconsole-2.desktop %{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-3 %{_bindir}/jupyter-qtconsole-%{python3_version} %{_datadir}/applications/jupyter-qtconsole-3.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 * Sat Sep 24 2016 Mukundan Ragavan - 4.2.1-4 - Removed scripts; F25+ only * Sat Sep 24 2016 Mukundan Ragavan - 4.2.1-3 - Added scripts for desktop database (fixes embarassing oversight!) * Sat Sep 24 2016 Mukundan Ragavan - 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 - 4.2.1-1 - Initial package.