649deb6a1f2a9029bf3cb1d37718a6084efaf65e
[packages/python3-ipykernel.git] / python3-ipykernel.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5
6 Summary:        IPython kernel for Jupyter
7 Summary(pl.UTF-8):      Jądro IPythona dla Jupytera
8 Name:           python3-ipykernel
9 Version:        5.1.3
10 Release:        1
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
15 # Source0-md5:  c1d0ff3d8f7e8517a44fef33516929ec
16 URL:            https://pypi.org/project/ipykernel/
17 BuildRequires:  python3-modules >= 1:3.4
18 BuildRequires:  python3-setuptools
19 %if %{with tests}
20 BuildRequires:  python3-flaky
21 BuildRequires:  python3-ipython >= 5.0.0
22 BuildRequires:  python3-jupyter_client
23 BuildRequires:  python3-nose
24 BuildRequires:  python3-pytest
25 BuildRequires:  python3-pytest-cov
26 BuildRequires:  python3-traitlets >= 4.1.0
27 BuildRequires:  python3-tornado >= 4.2
28 %endif
29 BuildRequires:  rpm-pythonprov
30 BuildRequires:  rpmbuild(macros) >= 1.714
31 %if %{with doc}
32 BuildRequires:  python3-sphinxcontrib_github_alt
33 BuildRequires:  sphinx-pdg-3
34 %endif
35 Requires:       python3-modules >= 1:3.4
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 This package provides the IPython kernel for Jupyter.
41
42 %description -l pl.UTF-8
43 Ten pakiet dostarcza jądro IPythona dla Jupytera.
44
45 %package apidocs
46 Summary:        API documentation for Python ipykernel module
47 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona ipykernel
48 Group:          Documentation
49
50 %description apidocs
51 API documentation for Python ipykernel module.
52
53 %description apidocs -l pl.UTF-8
54 Dokumentacja API modułu Pythona ipykernel.
55
56 %prep
57 %setup -q -n ipykernel-%{version}
58
59 %build
60 %py3_build
61
62 %if %{with tests}
63 PYTHONPATH=$(pwd) \
64 %{__python3} -m pytest ipykernel
65 %endif
66
67 %if %{with doc}
68 %{__make} -C docs html \
69         SPHINXBUILD=sphinx-build-3
70 %endif
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74
75 %py3_install
76
77 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-ipykernel-%{version}
78 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-ipykernel-%{version}
79 find $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
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %files
89 %defattr(644,root,root,755)
90 %doc COPYING.md README.md
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}
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.10627 seconds and 2 git commands to generate.