- python-ipykernel.spec as python3-ipykernel.spec, updated to 5.1.3 for python 3.4+
[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-ipython >= 5.0.0
21 BuildRequires:  python3-jupyter_client
22 BuildRequires:  python3-nose
23 BuildRequires:  python3-pytest
24 BuildRequires:  python3-pytest-cov
25 BuildRequires:  python3-traitlets >= 4.1.0
26 BuildRequires:  python3-tornado >= 4.2
27 %endif
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  rpmbuild(macros) >= 1.714
30 %if %{with doc}
31 BuildRequires:  python3-sphinxcontrib_github_alt
32 BuildRequires:  sphinx-pdg-3
33 %endif
34 Requires:       python3-modules >= 1:3.4
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 This package provides the IPython kernel for Jupyter.
40
41 %description -l pl.UTF-8
42 Ten pakiet dostarcza jądro IPythona dla Jupytera.
43
44 %package apidocs
45 Summary:        API documentation for Python ipykernel module
46 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona ipykernel
47 Group:          Documentation
48
49 %description apidocs
50 API documentation for Python ipykernel module.
51
52 %description apidocs -l pl.UTF-8
53 Dokumentacja API modułu Pythona ipykernel.
54
55 %prep
56 %setup -q -n ipykernel-%{version}
57
58 %build
59 %py3_build
60
61 %if %{with tests}
62 PYTHONPATH=$(pwd) \
63 %{__python3} -m pytest ipykernel
64 %endif
65
66 %if %{with doc}
67 %{__make} -C docs html \
68         SPHINXBUILD=sphinx-build-3
69 %endif
70
71 %install
72 rm -rf $RPM_BUILD_ROOT
73
74 %py3_install
75
76 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-ipykernel-%{version}
77 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-ipykernel-%{version}
78 find $RPM_BUILD_ROOT%{_examplesdir}/python3-ipykernel-%{version} -name '*.py' \
79         | xargs sed -i '1s|/usr/bin/env python|%{__python3}|'
80
81 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/ipykernel/tests \
82         $RPM_BUILD_ROOT%{py3_sitescriptdir}/ipykernel/inprocess/tests
83
84 %clean
85 rm -rf $RPM_BUILD_ROOT
86
87 %files
88 %defattr(644,root,root,755)
89 %doc COPYING.md README.md
90 %{py3_sitescriptdir}/ipykernel
91 %{py3_sitescriptdir}/ipykernel_launcher.py
92 %{py3_sitescriptdir}/__pycache__/ipykernel_launcher.cpython-*.py[co]
93 %{py3_sitescriptdir}/ipykernel-%{version}-py*.egg-info
94 %dir %{_datadir}/jupyter
95 %dir %{_datadir}/jupyter/kernels
96 %{_datadir}/jupyter/kernels/python3
97 %{_examplesdir}/python3-ipykernel-%{version}
98
99 %if %{with doc}
100 %files apidocs
101 %defattr(644,root,root,755)
102 %doc docs/_build/html/{_static,*.html,*.js}
103 %endif
This page took 0.109106 seconds and 3 git commands to generate.