]> git.pld-linux.org Git - packages/python-jupyter_client.git/blob - python-jupyter_client.spec
rebuild with python 3.10
[packages/python-jupyter_client.git] / python-jupyter_client.spec
1 # NOTE: for versions >= 6 (for python 3.5+) see python3-jupyter_client.spec
2 #
3 # Conditional build:
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
8
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
13 Version:        5.3.5
14 Release:        3
15 License:        BSD
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/
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.7
23 BuildRequires:  python-setuptools
24 %if %{with tests}
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
35 %endif
36 %endif
37 %if %{with python3}
38 BuildRequires:  python3-modules >= 1:3.5
39 BuildRequires:  python3-setuptools
40 %if %{with tests}
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
50 %endif
51 %endif
52 BuildRequires:  rpm-pythonprov
53 BuildRequires:  rpmbuild(macros) >= 1.714
54 %if %{with doc}
55 #BuildRequires: python3-ipykernel
56 BuildRequires:  python3-sphinxcontrib_github_alt
57 BuildRequires:  python3-zmq >= 2.1
58 BuildRequires:  sphinx-pdg-3
59 %endif
60 Requires:       python-modules >= 1:2.7
61 BuildArch:      noarch
62 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64 %description
65 jupyter_client contains the reference implementation of the Jupyter
66 protocol. It also provides client and kernel management APIs for
67 working with kernels.
68
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.
72
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
78
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
82 working with kernels.
83
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.
87
88 %package apidocs
89 Summary:        API documentation for Python jupyter_client module
90 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona jupyter_client
91 Group:          Documentation
92
93 %description apidocs
94 API documentation for Python jupyter_client module.
95
96 %description apidocs -l pl.UTF-8
97 Dokumentacja API modułu Pythona jupyter_client.
98
99 %prep
100 %setup -q -n jupyter_client-%{version}
101
102 %build
103 %if %{with python2}
104 %py_build %{?with_tests:test}
105 # failing tests:
106 # test_datetimes_msgpack (jupyter_client.tests.test_session.TestSession)
107 # test_tracking (jupyter_client.tests.test_session.TestSession)
108 %endif
109
110 %if %{with python3}
111 %py3_build %{?with_tests:test}
112 %endif
113
114 %if %{with doc}
115 PYTHONPATH=$(pwd) \
116 %{__make} -C docs html \
117         SPHINXBUILD=sphinx-build-3
118 %endif
119
120 %install
121 rm -rf $RPM_BUILD_ROOT
122
123 %if %{with python2}
124 %py_install
125
126 for f in $RPM_BUILD_ROOT%{_bindir}/jupyter-* ; do
127         %{__mv} "$f" "${f}-2"
128 done
129
130 %py_postclean
131 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/jupyter_client/tests
132 %endif
133
134 %if %{with python3}
135 %py3_install
136
137 for f in $RPM_BUILD_ROOT%{_bindir}/jupyter-*[!2] ; do
138         %{__mv} "$f" "${f}-3"
139 done
140
141 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/jupyter_client/tests
142 %endif
143
144 %clean
145 rm -rf $RPM_BUILD_ROOT
146
147 %if %{with python2}
148 %files
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
156 %endif
157
158 %if %{with python3}
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
167 %endif
168
169 %if %{with doc}
170 %files apidocs
171 %defattr(644,root,root,755)
172 %doc docs/_build/html/{_images,_static,api,*.html,*.js}
173 %endif
This page took 0.055793 seconds and 3 git commands to generate.