# Created by pyp2rpm-3.0.1 %global pypi_name notebook %global _docdir_fmt %{name} Name: python-%{pypi_name} Version: 4.4.1 Release: 2%{?dist} Summary: A web-based notebook environment for interactive computing License: BSD URL: http://jupyter.org Source0: https://files.pythonhosted.org/packages/source/n/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-setuptools BuildRequires: python2-devel BuildRequires: python3-setuptools BuildRequires: python3-devel # Tests: BuildRequires: pandoc BuildRequires: python3-ipykernel BuildRequires: python3-ipython_genutils BuildRequires: python3-jupyter-client BuildRequires: python3-jupyter-core BuildRequires: python3-nbconvert BuildRequires: python3-nbformat BuildRequires: python3-nose BuildRequires: python3-terminado BuildRequires: python3-tornado BuildRequires: python3-traitlets BuildRequires: python2-configparser BuildRequires: python2-ipykernel BuildRequires: python2-ipython_genutils BuildRequires: python2-jupyter-client BuildRequires: python2-jupyter-core BuildRequires: python2-mock BuildRequires: python2-nbconvert BuildRequires: python2-nbformat BuildRequires: python2-nose BuildRequires: python2-requests BuildRequires: python2-terminado BuildRequires: python2-tornado BuildRequires: python2-traitlets # this should be in ipython BuildRequires: python2-pickleshare BuildRequires: python2-prompt_toolkit BuildRequires: python3-pickleshare BuildRequires: python3-prompt_toolkit # Docs: BuildRequires: python3-sphinx BuildRequires: python3-sphinx_rtd_theme BuildRequires: python3-ipython-sphinx %global _description \ The Jupyter Notebook is a web application that allows you to create and \ share documents that contain live code, equations, visualizations, and \ explanatory text. The Notebook has support for multiple programming \ languages, sharing, and interactive widgets. %description %_description %package -n python2-%{pypi_name} Summary: A web-based notebook environment for interactive computing %{?python_provide:%python_provide python2-%{pypi_name}} Requires: python2-jinja2 Requires: python2-tornado >= 4 Requires: python2-ipython_genutils Requires: python2-traitlets Requires: python2-jupyter-core Requires: python2-jupyter-client Requires: python2-nbformat Requires: python2-nbconvert Requires: python2-ipykernel Requires: python2-setuptools Requires: fontawesome-fonts Requires: fontawesome-fonts-web Requires: mathjax >= 2.4 Requires: js-backbone >= 1.2 Requires: js-marked >= 0.3 Requires: js-moment >= 2.8 Requires: js-underscore >= 1.5 # Versions from bower.json Provides: bundled(bootstrap) = 3.3 Provides: bundled(bootstrap-tour) = 0.9.0 Provides: bundled(codemirror) = 5.22.2 Provides: bundled(es6-promise) = 1.0 Provides: bundled(google-caja) = 5669 Provides: bundled(jquery) = 2.0 Provides: bundled(jquery-typeahead) = 2.0.0 Provides: bundled(jquery-ui) = 1.10 Provides: bundled(requirejs) = 2.1 Provides: bundled(text-encoding) = 0.1 Provides: bundled(xterm.js) = 2.1.0 %description -n python2-%{pypi_name} %_description %package -n python3-%{pypi_name} Summary: A web-based notebook environment for interactive computing %{?python_provide:%python_provide python3-%{pypi_name}} Requires: python3-jinja2 Requires: python3-tornado >= 4 Requires: python3-ipython_genutils Requires: python3-traitlets Requires: python3-jupyter-core Requires: python3-jupyter-client Requires: python3-nbformat Requires: python3-nbconvert Requires: python3-ipykernel Requires: python3-setuptools Requires: fontawesome-fonts Requires: fontawesome-fonts-web Requires: mathjax >= 2.4 Requires: js-backbone >= 1.2 Requires: js-marked >= 0.3 Requires: js-moment >= 2.8 Requires: js-underscore >= 1.5 # Versions from bower.json Provides: bundled(bootstrap) = 3.3 Provides: bundled(bootstrap-tour) = 0.9.0 Provides: bundled(codemirror) = 5.22.2 Provides: bundled(es6-promise) = 1.0 Provides: bundled(google-caja) = 5669 Provides: bundled(jquery) = 2.0 Provides: bundled(jquery-typeahead) = 2.0.0 Provides: bundled(jquery-ui) = 1.10 Provides: bundled(requirejs) = 2.1 Provides: bundled(text-encoding) = 0.1 Provides: bundled(xterm.js) = 2.1.0 %description -n python3-%{pypi_name} The Jupyter Notebook is a web application that allows you to create and share documents that contain live code, equations, visualizations, and explanatory text. The Notebook has support for multiple programming languages, sharing, and interactive widgets. %package -n python-%{pypi_name}-doc Summary: notebook documentation %description -n python-%{pypi_name}-doc Documentation for notebook %prep %autosetup -n %{pypi_name}-%{version} %build %py2_build %py3_build # generate html docs # TODO fix import warnings? sphinx-build-3 docs/source html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %install # We do Python 2 installation first and we remove all the executables # This way it's safe to assume all the executables will be Python 3 %py2_install rm -f %{buildroot}%{_bindir}/* %py3_install # unbundle stuff for SITELIB in %{python2_sitelib} %{python3_sitelib}; do pushd %{buildroot}${SITELIB}/%{pypi_name}/static/components rm -r font-awesome/fonts ln -vfs %{_datadir}/fonts/fontawesome font-awesome/fonts rm -r MathJax ln -vfs %{_datadir}/javascript/mathjax MathJax rm -r backbone ln -vfs %{_datadir}/javascript/backbone backbone rm -r marked/lib ln -vfs %{_datadir}/javascript/marked marked/lib rm -r moment ln -vfs %{_datadir}/javascript/moment moment rm -r underscore ln -vfs %{_datadir}/javascript/underscore underscore popd done %check LANG=C.utf-8 nosetests-3 -v LANG=C.utf-8 nosetests-2 -v %files -n python2-%{pypi_name} %doc README.md %license COPYING.md %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %{python2_sitelib}/%{pypi_name}/ %files -n python3-%{pypi_name} %doc README.md %license COPYING.md %{_bindir}/jupyter-nbextension %{_bindir}/jupyter-serverextension %{_bindir}/jupyter-notebook %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %{python3_sitelib}/%{pypi_name}/ %files -n python-%{pypi_name}-doc %doc html %changelog * Tue Feb 21 2017 Miro HronĨok - 4.4.1-2 - Make sure the Python 3 executables are really Python 3 - Build the docs - Run the tests - Use python2- where possible - Unbundle some things, declare the rest * Thu Feb 09 2017 Thomas Spura - 4.4.1-1 - rename to python-notebook - only ship python3 executables - update to 4.4.1 * Mon Apr 18 2016 Thomas Spura - 4.2.0-1 - Initial package.