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