# Created by pyp2rpm-3.0.1 %global pypi_name jupyter_core %global pypi_name_dash jupyter-core Name: python-%{pypi_name_dash} Version: 4.1.0 Release: 4%{?dist} Summary: The base package for Jupyter projects License: BSD URL: http://jupyter.org Source0: https://pypi.python.org/packages/source/j/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python-setuptools BuildRequires: python2-devel BuildRequires: python-sphinx BuildRequires: python3-setuptools BuildRequires: python3-devel BuildRequires: python3-sphinx %description Core common functionality of Jupyter projects. This package contains base application classes and configuration inherited by other projects. %package -n python2-%{pypi_name_dash} Summary: The base package for Jupyter projects %{?python_provide:%python_provide python2-%{pypi_name_dash}} # Provide / Obsolete existing python-jupyter_core Obsoletes: python2-%{pypi_name} < 4.0.2-3 Provides: python2-%{pypi_name} = %{version}-%{release} %{?python_provide:%python_provide python2-%{pypi_name}} Requires: python-traitlets Requires: python-setuptools %description -n python2-%{pypi_name_dash} Core common functionality of Jupyter projects. This package contains base application classes and configuration inherited by other projects. %package -n python3-%{pypi_name_dash} Summary: The base package for Jupyter projects %{?python_provide:%python_provide python3-%{pypi_name_dash}} Obsoletes: python3-%{pypi_name} < 4.0.2-3 Provides: python3-%{pypi_name} = %{version}-%{release} Requires: python3-traitlets Requires: python3-setuptools %description -n python3-%{pypi_name_dash} Core common functionality of Jupyter projects. This package contains base application classes and configuration inherited by other projects. %package -n python-%{pypi_name_dash}-doc Summary: Documentation of the base package for Jupyter projects %description -n python-%{pypi_name_dash}-doc Core common functionality of Jupyter projects. This package contains documentation for the base application classes and configuration inherited by other jupyter projects. %prep %autosetup -n %{pypi_name}-%{version} %build %py2_build %py3_build # generate html docs PYTHONPATH=build/lib/ sphinx-build docs html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %install find | grep pyc$ | xargs rm -v # Must do the subpackages' install first because the scripts in /usr/bin are # overwritten with every setup.py install. %py3_install mv %{buildroot}/%{_bindir}/jupyter %{buildroot}/%{_bindir}/jupyter-%{python3_version} ln -s jupyter-%{python3_version} %{buildroot}/%{_bindir}/jupyter-3 mv %{buildroot}/%{_bindir}/jupyter-migrate %{buildroot}/%{_bindir}/jupyter-migrate-%{python3_version} ln -s jupyter-migrate-%{python3_version} %{buildroot}/%{_bindir}/jupyter-migrate-3 %py2_install mv %{buildroot}/%{_bindir}/jupyter %{buildroot}/%{_bindir}/jupyter-%{python2_version} ln -s jupyter-%{python2_version} %{buildroot}/%{_bindir}/jupyter-2 mv %{buildroot}/%{_bindir}/jupyter-migrate %{buildroot}/%{_bindir}/jupyter-migrate-%{python2_version} ln -s jupyter-migrate-%{python2_version} %{buildroot}/%{_bindir}/jupyter-migrate-2 ln -s jupyter-2 %{buildroot}/%{_bindir}/jupyter ln -s jupyter-migrate-2 %{buildroot}/%{_bindir}/jupyter-migrate # Remove shebang from troubleshoot.py for lib in %{buildroot}{%{python2_sitelib},%{python3_sitelib}}/jupyter_core/troubleshoot.py; do sed '1{\@^#!/usr/bin/env@d}' $lib > $lib.new && touch -r $lib $lib.new && mv $lib.new $lib done %global _docdir_fmt %{name} %files -n python2-%{pypi_name_dash} %license COPYING.md %doc README.md %{_bindir}/jupyter %{_bindir}/jupyter-2 %{_bindir}/jupyter-%{python2_version} %{_bindir}/jupyter-migrate %{_bindir}/jupyter-migrate-2 %{_bindir}/jupyter-migrate-%{python2_version} %{python2_sitelib}/jupyter.py* %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %{python2_sitelib}/%{pypi_name}/ %files -n python3-%{pypi_name_dash} %license COPYING.md %doc README.md %{_bindir}/jupyter-3 %{_bindir}/jupyter-%{python3_version} %{_bindir}/jupyter-migrate-3 %{_bindir}/jupyter-migrate-%{python3_version} %dir %{python3_sitelib}/__pycache__/ %{python3_sitelib}/__pycache__/* %{python3_sitelib}/jupyter.py %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %{python3_sitelib}/%{pypi_name}/ %files -n python-%{pypi_name_dash}-doc %doc html %changelog * Sat Apr 23 2016 Thomas Spura - 4.1.0-4 - Add obsoletes/provides for jupyter_core - Fix python2 files installed with python3 * Mon Apr 18 2016 Thomas Spura - 4.1.0-3 - Remove references to jupyter-troubleshoot - Improve summary - Remove shebang from troubleshoot.py * Mon Apr 18 2016 Thomas Spura - 4.1.0-2 - Add PYTHONPATH to sphinx-build (Zbigniew, #1327994) - Install script differently (Zbigniew, #1327994) - Rename packages to avoid underscore * Mon Apr 18 2016 Thomas Spura - 4.1.0-1 - Initial package.