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