1 # NOTE: for versions >= 6 (for python 3.5+) see python3-jupyter_client.spec
4 %bcond_without doc # Sphinx documentation
5 %bcond_with tests # unit tests (disable for bootstrap: tests need ipykernel which requires jupyter_client; as of 5.3.3 two test_session tests fail)
6 %bcond_without python2 # CPython 2.x module
7 %bcond_without python3 # CPython 3.x module
9 Summary: Reference implementation of the Jupyter protocol
10 Summary(pl.UTF-8): Referencyjna implementacja protokołu Jupyter
11 Name: python-jupyter_client
12 # keep 5.x here for python2 support
16 Group: Libraries/Python
17 #Source0Download: https://pypi.org/simple/jupyter_client/
18 Source0: https://files.pythonhosted.org/packages/source/j/jupyter_client/jupyter_client-%{version}.tar.gz
19 # Source0-md5: d99103c24cae3cf07a25296a2ef12d72
20 URL: https://pypi.org/project/jupyter_client/
22 BuildRequires: python-modules >= 1:2.7
23 BuildRequires: python-setuptools
25 BuildRequires: python-dateutil >= 2.1
26 BuildRequires: python-ipykernel
27 BuildRequires: python-ipython
28 BuildRequires: python-jupyter_core >= 4.6.0
29 BuildRequires: python-mock
30 BuildRequires: python-msgpack
31 BuildRequires: python-pytest
32 BuildRequires: python-traitlets
33 BuildRequires: python-tornado >= 4.1
34 BuildRequires: python-zmq >= 13
38 BuildRequires: python3-modules >= 1:3.5
39 BuildRequires: python3-setuptools
41 BuildRequires: python3-dateutil >= 2.1
42 BuildRequires: python3-ipykernel
43 BuildRequires: python3-ipython
44 BuildRequires: python3-jupyter_core >= 4.6.0
45 BuildRequires: python3-msgpack
46 BuildRequires: python3-pytest
47 BuildRequires: python3-traitlets
48 BuildRequires: python3-tornado >= 4.1
49 BuildRequires: python3-zmq >= 13
52 BuildRequires: rpm-pythonprov
53 BuildRequires: rpmbuild(macros) >= 1.714
55 #BuildRequires: python3-ipykernel
56 BuildRequires: python3-sphinxcontrib_github_alt
57 BuildRequires: python3-zmq >= 2.1
58 BuildRequires: sphinx-pdg-3
60 Requires: python-modules >= 1:2.7
62 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65 jupyter_client contains the reference implementation of the Jupyter
66 protocol. It also provides client and kernel management APIs for
69 %description -l pl.UTF-8
70 jupyter_client zawiera referencyjną implementację protokołu Jupyter.
71 Zawiera także API klienckie i zarządzania jądrami.
73 %package -n python3-jupyter_client
74 Summary: Reference implementation of the Jupyter protocol
75 Summary(pl.UTF-8): Referencyjna implementacja protokołu Jupyter
76 Group: Libraries/Python
77 Requires: python3-modules >= 1:3.5
79 %description -n python3-jupyter_client
80 jupyter_client contains the reference implementation of the Jupyter
81 protocol. It also provides client and kernel management APIs for
84 %description -n python3-jupyter_client -l pl.UTF-8
85 jupyter_client zawiera referencyjną implementację protokołu Jupyter.
86 Zawiera także API klienckie i zarządzania jądrami.
89 Summary: API documentation for Python jupyter_client module
90 Summary(pl.UTF-8): Dokumentacja API modułu Pythona jupyter_client
94 API documentation for Python jupyter_client module.
96 %description apidocs -l pl.UTF-8
97 Dokumentacja API modułu Pythona jupyter_client.
100 %setup -q -n jupyter_client-%{version}
104 %py_build %{?with_tests:test}
106 # test_datetimes_msgpack (jupyter_client.tests.test_session.TestSession)
107 # test_tracking (jupyter_client.tests.test_session.TestSession)
111 %py3_build %{?with_tests:test}
116 %{__make} -C docs html \
117 SPHINXBUILD=sphinx-build-3
121 rm -rf $RPM_BUILD_ROOT
126 for f in $RPM_BUILD_ROOT%{_bindir}/jupyter-* ; do
127 %{__mv} "$f" "${f}-2"
131 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/jupyter_client/tests
137 for f in $RPM_BUILD_ROOT%{_bindir}/jupyter-*[!2] ; do
138 %{__mv} "$f" "${f}-3"
141 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/jupyter_client/tests
145 rm -rf $RPM_BUILD_ROOT
149 %defattr(644,root,root,755)
150 %doc COPYING.md README.md
151 %attr(755,root,root) %{_bindir}/jupyter-kernel-2
152 %attr(755,root,root) %{_bindir}/jupyter-kernelspec-2
153 %attr(755,root,root) %{_bindir}/jupyter-run-2
154 %{py_sitescriptdir}/jupyter_client
155 %{py_sitescriptdir}/jupyter_client-%{version}-py*.egg-info
159 %files -n python3-jupyter_client
160 %defattr(644,root,root,755)
161 %doc COPYING.md README.md
162 %attr(755,root,root) %{_bindir}/jupyter-kernel-3
163 %attr(755,root,root) %{_bindir}/jupyter-kernelspec-3
164 %attr(755,root,root) %{_bindir}/jupyter-run-3
165 %{py3_sitescriptdir}/jupyter_client
166 %{py3_sitescriptdir}/jupyter_client-%{version}-py*.egg-info
171 %defattr(644,root,root,755)
172 %doc docs/_build/html/{_images,_static,api,*.html,*.js}