Blob Blame History Raw
# Created by pyp2rpm-3.0.1
%global pypi_name jupyter_core
%global pypi_name_dash jupyter-core

Name:           python-%{pypi_name_dash}
Version:        4.4.0
Release:        8%{?dist}
Summary:        The base package for Jupyter projects

License:        BSD
URL:            http://jupyter.org
Source0:        https://files.pythonhosted.org/packages/source/j/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python%{python3_pkgversion}-setuptools
BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-sphinx
BuildRequires:  python%{python3_pkgversion}-docs
BuildRequires:  python%{python3_pkgversion}-sphinxcontrib-github-alt

%description
Core common functionality of Jupyter projects.

This package contains base application classes and configuration inherited by
other projects.

%package -n     python%{python3_pkgversion}-%{pypi_name_dash}
Summary:        The base package for Jupyter projects
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name_dash}}

Obsoletes:      python%{python3_pkgversion}-%{pypi_name} < 4.0.2-3
Provides:       python%{python3_pkgversion}-%{pypi_name} = %{version}-%{release}

Requires:       python%{python3_pkgversion}-traitlets
Requires:       python%{python3_pkgversion}-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_dash} < 4.3.0-2

%description -n python%{python3_pkgversion}-%{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.

%package -n python-jupyter-filesystem
Summary:        Jupyter filesystem layout
%description -n python-jupyter-filesystem
This package provides directories required by other packages that add
extensions to Jupyter.

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

# Use local objects.inv for intersphinx:
sed -i "s|{'https://docs.python.org/3/': None}|{'https://docs.python.org/3/': '/usr/share/doc/python3-docs/html/objects.inv'}|" docs/conf.py

%build
%py3_build
# generate html docs
PYTHONPATH=build/lib/ sphinx-build-3 docs html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}

%install
find | grep pyc$ | xargs rm -v

%py3_install


# 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

# Create directories for python-jupyter-filesystem package
mkdir -p %{buildroot}%{_datadir}/jupyter
mkdir %{buildroot}%{_datadir}/jupyter/kernels
mkdir %{buildroot}%{_datadir}/jupyter/nbextensions
mkdir -p %{buildroot}%{_sysconfdir}/jupyter
mkdir %{buildroot}%{_sysconfdir}/jupyter/jupyter_notebook_config.d
mkdir %{buildroot}%{_sysconfdir}/jupyter/nbconfig
mkdir %{buildroot}%{_sysconfdir}/jupyter/nbconfig/common.d
mkdir %{buildroot}%{_sysconfdir}/jupyter/nbconfig/edit.d
mkdir %{buildroot}%{_sysconfdir}/jupyter/nbconfig/notebook.d
mkdir %{buildroot}%{_sysconfdir}/jupyter/nbconfig/terminal.d
mkdir %{buildroot}%{_sysconfdir}/jupyter/nbconfig/tree.d

%global _docdir_fmt %{name}

%files -n python%{python3_pkgversion}-%{pypi_name_dash}
%license COPYING.md
%doc README.md
%{_bindir}/jupyter
%{_bindir}/jupyter-migrate

%{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

%files -n python-jupyter-filesystem
%{_datadir}/jupyter
%{_sysconfdir}/jupyter

%changelog
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Thu Feb 14 2019 Miro Hrončok <mhroncok@redhat.com> - 4.4.0-7
- Subpackage python2-jupyter-core has been removed
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal

* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

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

* Sun Jun 10 2018 Mattias Ellert <mattias.ellert@physics.uu.se> - 4.4.0-3
- Add python-jupyter-filesystem package

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

* Tue Jan 09 2018 Miro Hrončok <mhroncok@redhat.com> - 4.4.0-1
- Update to 4.4.0 (#1508192)
- Build docs with Python 3, BR python3-sphinxcontrib-github-alt
- Use local objects.inv for intersphinx, BR python3-docs

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

* Tue Aug 29 2017 Orion Poplawski <orion@cora.nwra.com> - 4.3.0-1
- Update to 4.3.0

* Tue Aug 29 2017 Orion Poplawski <orion@cora.nwra.com> - 4.1.0-10
- Use more python2- names

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

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

* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 4.1.0-7
- Rebuild for Python 3.6

* Wed Nov 16 2016 Orion Poplwski <orion@cora.nwra.com> - 4.1.0-6
- Do not own __pycache__ dir
- Enable EPEL builds

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.1.0-5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Sat Apr 23 2016 Thomas Spura <tomspur@fedoraproject.org> - 4.1.0-4
- Add obsoletes/provides for jupyter_core
- Fix python2 files installed with python3

* Mon Apr 18 2016 Thomas Spura <tomspur@fedoraproject.org> - 4.1.0-3
- Remove references to jupyter-troubleshoot
- Improve summary
- Remove shebang from troubleshoot.py

* Mon Apr 18 2016 Thomas Spura <tomspur@fedoraproject.org> - 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 <tomspur@fedoraproject.org> - 4.1.0-1
- Initial package.