]> git.pld-linux.org Git - packages/python-jupyter_client.git/blob - python-jupyter_client.spec
- new
[packages/python-jupyter_client.git] / python-jupyter_client.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests (disable for bootstrap: tests need ipykernel which requires jupyter_client)
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 Summary:        Reference implementation of the Jupyter protocol
9 Summary(pl.UTF-8):      Referencyjna implementacja protokołu Jupyter
10 Name:           python-jupyter_client
11 Version:        5.3.3
12 Release:        1
13 License:        BSD
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/jupyter_client/
16 Source0:        https://files.pythonhosted.org/packages/source/j/jupyter_client/jupyter_client-%{version}.tar.gz
17 # Source0-md5:  dd4f60f3ccf41cd54b0c3719a6610a1a
18 URL:            https://pypi.org/project/jupyter_client/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 BuildRequires:  python-dateutil >= 2.1
24 BuildRequires:  python-ipykernel
25 BuildRequires:  python-ipython
26 BuildRequires:  python-jupyter_core
27 BuildRequires:  python-mock
28 BuildRequires:  python-pytest
29 BuildRequires:  python-traitlets
30 BuildRequires:  python-tornado >= 4.1
31 BuildRequires:  python-zmq >= 2.1
32 %endif
33 %endif
34 %if %{with python3}
35 BuildRequires:  python3-modules >= 1:3.5
36 BuildRequires:  python3-setuptools
37 %if %{with tests}
38 BuildRequires:  python3-dateutil >= 2.1
39 BuildRequires:  python3-ipykernel
40 BuildRequires:  python3-ipython
41 BuildRequires:  python3-jupyter_core
42 BuildRequires:  python3-pytest
43 BuildRequires:  python3-traitlets
44 BuildRequires:  python3-tornado >= 4.1
45 BuildRequires:  python3-zmq >= 2.1
46 %endif
47 %endif
48 BuildRequires:  rpm-pythonprov
49 BuildRequires:  rpmbuild(macros) >= 1.714
50 %if %{with doc}
51 #BuildRequires: python3-ipykernel
52 BuildRequires:  python3-sphinxcontrib_github_alt
53 BuildRequires:  python3-zmq >= 2.1
54 BuildRequires:  sphinx-pdg-3
55 %endif
56 Requires:       python-modules >= 1:2.7
57 BuildArch:      noarch
58 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
59
60 %description
61 jupyter_client contains the reference implementation of the Jupyter
62 protocol. It also provides client and kernel management APIs for
63 working with kernels.
64
65 %description -l pl.UTF-8
66 jupyter_client zawiera referencyjną implementację protokołu Jupyter.
67 Zawiera także API klienckie i zarządzania jądrami.
68
69 %package -n python3-jupyter_client
70 Summary:        Reference implementation of the Jupyter protocol
71 Summary(pl.UTF-8):      Referencyjna implementacja protokołu Jupyter
72 Group:          Libraries/Python
73 Requires:       python3-modules >= 1:3.5
74
75 %description -n python3-jupyter_client
76 jupyter_client contains the reference implementation of the Jupyter
77 protocol. It also provides client and kernel management APIs for
78 working with kernels.
79
80 %description -n python3-jupyter_client -l pl.UTF-8
81 jupyter_client zawiera referencyjną implementację protokołu Jupyter.
82 Zawiera także API klienckie i zarządzania jądrami.
83
84 %package apidocs
85 Summary:        API documentation for Python jupyter_client module
86 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona jupyter_client
87 Group:          Documentation
88
89 %description apidocs
90 API documentation for Python jupyter_client module.
91
92 %description apidocs -l pl.UTF-8
93 Dokumentacja API modułu Pythona jupyter_client.
94
95 %prep
96 %setup -q -n jupyter_client-%{version}
97
98 %build
99 %if %{with python2}
100 %py_build %{?with_tests:test}
101 %endif
102
103 %if %{with python3}
104 %py3_build %{?with_tests:test}
105 %endif
106
107 %if %{with doc}
108 PYTHONPATH=$(pwd) \
109 %{__make} -C docs html \
110         SPHINXBUILD=sphinx-build-3
111 %endif
112
113 %install
114 rm -rf $RPM_BUILD_ROOT
115
116 %if %{with python2}
117 %py_install
118
119 for f in $RPM_BUILD_ROOT%{_bindir}/jupyter-* ; do
120         %{__mv} "$f" "${f}-2"
121 done
122
123 %py_postclean
124 %endif
125
126 %if %{with python3}
127 %py3_install
128
129 for f in $RPM_BUILD_ROOT%{_bindir}/jupyter-*[!2] ; do
130         %{__mv} "$f" "${f}-3"
131 done
132 %endif
133
134 %clean
135 rm -rf $RPM_BUILD_ROOT
136
137 %if %{with python2}
138 %files
139 %defattr(644,root,root,755)
140 %doc COPYING.md README.md
141 %attr(755,root,root) %{_bindir}/jupyter-kernel-2
142 %attr(755,root,root) %{_bindir}/jupyter-kernelspec-2
143 %attr(755,root,root) %{_bindir}/jupyter-run-2
144 %{py_sitescriptdir}/jupyter_client
145 %{py_sitescriptdir}/jupyter_client-%{version}-py*.egg-info
146 %endif
147
148 %if %{with python3}
149 %files -n python3-jupyter_client
150 %defattr(644,root,root,755)
151 %doc COPYING.md README.md
152 %attr(755,root,root) %{_bindir}/jupyter-kernel-3
153 %attr(755,root,root) %{_bindir}/jupyter-kernelspec-3
154 %attr(755,root,root) %{_bindir}/jupyter-run-3
155 %{py3_sitescriptdir}/jupyter_client
156 %{py3_sitescriptdir}/jupyter_client-%{version}-py*.egg-info
157 %endif
158
159 %if %{with doc}
160 %files apidocs
161 %defattr(644,root,root,755)
162 %doc docs/_build/html/{_images,_static,api,*.html,*.js}
163 %endif
This page took 0.061367 seconds and 3 git commands to generate.