- tests BR: python3-flaky
[packages/python3-ipykernel.git] / python3-ipykernel.spec
CommitLineData
0eac7f55
JB
1#
2# Conditional build:
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # unit tests
0eac7f55
JB
5
6Summary: IPython kernel for Jupyter
7Summary(pl.UTF-8): Jądro IPythona dla Jupytera
3181adb6
JB
8Name: python3-ipykernel
9Version: 5.1.3
10Release: 1
0eac7f55
JB
11License: BSD
12Group: Libraries/Python
13#Source0Download: https://pypi.org/simple/ipykernel/
14Source0: https://files.pythonhosted.org/packages/source/i/ipykernel/ipykernel-%{version}.tar.gz
3181adb6 15# Source0-md5: c1d0ff3d8f7e8517a44fef33516929ec
0eac7f55 16URL: https://pypi.org/project/ipykernel/
0eac7f55
JB
17BuildRequires: python3-modules >= 1:3.4
18BuildRequires: python3-setuptools
19%if %{with tests}
caa82e95 20BuildRequires: python3-flaky
3181adb6 21BuildRequires: python3-ipython >= 5.0.0
0eac7f55
JB
22BuildRequires: python3-jupyter_client
23BuildRequires: python3-nose
24BuildRequires: python3-pytest
25BuildRequires: python3-pytest-cov
26BuildRequires: python3-traitlets >= 4.1.0
3181adb6 27BuildRequires: python3-tornado >= 4.2
0eac7f55
JB
28%endif
29BuildRequires: rpm-pythonprov
30BuildRequires: rpmbuild(macros) >= 1.714
0eac7f55
JB
31%if %{with doc}
32BuildRequires: python3-sphinxcontrib_github_alt
33BuildRequires: sphinx-pdg-3
34%endif
3181adb6 35Requires: python3-modules >= 1:3.4
0eac7f55
JB
36BuildArch: noarch
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%description
40This package provides the IPython kernel for Jupyter.
41
42%description -l pl.UTF-8
43Ten pakiet dostarcza jądro IPythona dla Jupytera.
44
0eac7f55
JB
45%package apidocs
46Summary: API documentation for Python ipykernel module
47Summary(pl.UTF-8): Dokumentacja API modułu Pythona ipykernel
48Group: Documentation
49
50%description apidocs
51API documentation for Python ipykernel module.
52
53%description apidocs -l pl.UTF-8
54Dokumentacja API modułu Pythona ipykernel.
55
56%prep
57%setup -q -n ipykernel-%{version}
58
59%build
0eac7f55
JB
60%py3_build
61
62%if %{with tests}
63PYTHONPATH=$(pwd) \
64%{__python3} -m pytest ipykernel
65%endif
0eac7f55
JB
66
67%if %{with doc}
68%{__make} -C docs html \
69 SPHINXBUILD=sphinx-build-3
70%endif
71
72%install
73rm -rf $RPM_BUILD_ROOT
74
0eac7f55
JB
75%py3_install
76
77install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-ipykernel-%{version}
78cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-ipykernel-%{version}
79find $RPM_BUILD_ROOT%{_examplesdir}/python3-ipykernel-%{version} -name '*.py' \
80 | xargs sed -i '1s|/usr/bin/env python|%{__python3}|'
81
82%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/ipykernel/tests \
83 $RPM_BUILD_ROOT%{py3_sitescriptdir}/ipykernel/inprocess/tests
0eac7f55
JB
84
85%clean
86rm -rf $RPM_BUILD_ROOT
87
0eac7f55
JB
88%files
89%defattr(644,root,root,755)
90%doc COPYING.md README.md
0eac7f55
JB
91%{py3_sitescriptdir}/ipykernel
92%{py3_sitescriptdir}/ipykernel_launcher.py
93%{py3_sitescriptdir}/__pycache__/ipykernel_launcher.cpython-*.py[co]
94%{py3_sitescriptdir}/ipykernel-%{version}-py*.egg-info
95%dir %{_datadir}/jupyter
96%dir %{_datadir}/jupyter/kernels
97%{_datadir}/jupyter/kernels/python3
98%{_examplesdir}/python3-ipykernel-%{version}
0eac7f55
JB
99
100%if %{with doc}
101%files apidocs
102%defattr(644,root,root,755)
103%doc docs/_build/html/{_static,*.html,*.js}
104%endif
This page took 0.213572 seconds and 4 git commands to generate.