]> git.pld-linux.org Git - packages/python-jupyter_core.git/blob - python-jupyter_core.spec
rebuild with python 3.10
[packages/python-jupyter_core.git] / python-jupyter_core.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 Summary:        Core common functionality of Jupyter projects
9 Summary(pl.UTF-8):      Główna, wspólna funkcjonalność projektów Jupyter
10 Name:           python-jupyter_core
11 Version:        4.6.3
12 Release:        3
13 License:        BSD
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/jupyter_core/
16 Source0:        https://files.pythonhosted.org/packages/source/j/jupyter_core/jupyter_core-%{version}.tar.gz
17 # Source0-md5:  aaed36bf01888c9e810462e6226db70a
18 Patch0:         %{name}-tests.patch
19 Patch1:         %{name}-completions.patch
20 URL:            https://pypi.org/project/jupyter_core/
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.7
23 BuildRequires:  python-setuptools
24 %if %{with tests}
25 BuildRequires:  python-mock
26 BuildRequires:  python-pytest
27 BuildRequires:  python-traitlets >= 4.0
28 %endif
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3-modules >= 1:3.5
32 BuildRequires:  python3-setuptools
33 %if %{with tests}
34 BuildRequires:  python3-pytest
35 BuildRequires:  python3-traitlets >= 4.0
36 %endif
37 %endif
38 BuildRequires:  rpm-pythonprov
39 BuildRequires:  rpmbuild(macros) >= 1.714
40 %if %{with doc}
41 BuildRequires:  python3-sphinxcontrib_github_alt
42 BuildRequires:  python3-traitlets >= 4.0
43 BuildRequires:  sphinx-pdg-3
44 %endif
45 Requires:       python-modules >= 1:2.7
46 BuildArch:      noarch
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %description
50 This package contains base application classes and configuration
51 inherited by other projects. It doesn't do much on its own.
52
53 %description -l pl.UTF-8
54 Ten pakiet zawiera klasy bazowe aplikacji oraz konfigurację
55 dziedziczoną przez inne obiekty. Samodzielnie robi niewiele.
56
57 %package -n python3-jupyter_core
58 Summary:        Core common functionality of Jupyter projects
59 Summary(pl.UTF-8):      Główna, wspólna funkcjonalność projektów Jupyter
60 Group:          Libraries/Python
61 Requires:       python3-modules >= 1:3.5
62
63 %description -n python3-jupyter_core
64 This package contains base application classes and configuration
65 inherited by other projects. It doesn't do much on its own.
66
67 %description -n python3-jupyter_core -l pl.UTF-8
68 Ten pakiet zawiera klasy bazowe aplikacji oraz konfigurację
69 dziedziczoną przez inne obiekty. Samodzielnie robi niewiele.
70
71 %package apidocs
72 Summary:        API documentation for Python jupyter_core module
73 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona jupyter_core
74 Group:          Documentation
75
76 %description apidocs
77 API documentation for Python jupyter_core module.
78
79 %description apidocs -l pl.UTF-8
80 Dokumentacja API modułu Pythona jupyter_core.
81
82 %package -n bash-completion-jupyter
83 Summary:        Bash completion for jupyter commands
84 Summary(pl.UTF-8):      Bashowe dopełnianie parametrów poleceń jupyter
85 Group:          Applications/Shells
86 Requires:       bash-completion >= 2.0
87 #Requires:      python-jupyter_core or python3-jupyter_core
88
89 %description -n bash-completion-jupyter
90 Bash completion for jupyter commands.
91
92 %description -n bash-completion-jupyter -l pl.UTF-8
93 Bashowe dopełnianie parametrów poleceń jupyter.
94
95 %package -n zsh-completion-jupyter
96 Summary:        Zsh completion for jupyter commands
97 Summary(pl.UTF-8):      Dopełnianie parametrów w zsh dla poleceń jupyter
98 Group:          Applications/Shells
99 #Requires:      python-jupyter_core or python3-jupyter_core
100 Requires:       zsh
101
102 %description -n zsh-completion-jupyter
103 Zsh completion for jupyter commands.
104
105 %description -n zsh-completion-jupyter -l pl.UTF-8
106 Dopełnianie parametrów w zsh dla poleceń jupyter.
107
108 %prep
109 %setup -q -n jupyter_core-%{version}
110 %patch0 -p1
111 %patch1 -p1
112
113 %build
114 %if %{with python2}
115 %py_build
116
117 %if %{with tests}
118 LC_ALL=C.UTF-8 \
119 PYTHONPATH=$(pwd) \
120 %{__python} -m pytest jupyter_core/tests
121 %endif
122 %endif
123
124 %if %{with python3}
125 %py3_build
126
127 %if %{with tests}
128 PYTHONPATH=$(pwd) \
129 %{__python3} -m pytest jupyter_core/tests
130 %endif
131 %endif
132
133 %if %{with doc}
134 PYTHONPATH=$(pwd) \
135 %{__make} -C docs html \
136         SPHINXBUILD=sphinx-build-3
137 %endif
138
139 %install
140 rm -rf $RPM_BUILD_ROOT
141
142 %if %{with python2}
143 %py_install
144
145 for f in $RPM_BUILD_ROOT%{_bindir}/jupyter* ; do
146         %{__mv} "$f" "${f}-2"
147 done
148
149 %py_postclean
150 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/jupyter_core/tests
151 %endif
152
153 %if %{with python3}
154 %py3_install
155
156 for f in $RPM_BUILD_ROOT%{_bindir}/jupyte*[!2] ; do
157         %{__mv} "$f" "${f}-3"
158 done
159
160 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/jupyter_core/tests
161 %endif
162
163 install -d $RPM_BUILD_ROOT{%{bash_compdir},%{zsh_compdir}}
164 cp -p examples/completions-zsh $RPM_BUILD_ROOT%{zsh_compdir}/_jupyter
165 cp -p examples/jupyter-completion.bash $RPM_BUILD_ROOT%{bash_compdir}/jupyter
166
167 %clean
168 rm -rf $RPM_BUILD_ROOT
169
170 %if %{with python2}
171 %files
172 %defattr(644,root,root,755)
173 %doc COPYING.md README.md
174 %attr(755,root,root) %{_bindir}/jupyter-2
175 %attr(755,root,root) %{_bindir}/jupyter-migrate-2
176 %attr(755,root,root) %{_bindir}/jupyter-troubleshoot-2
177 %{py_sitescriptdir}/jupyter.py[co]
178 %{py_sitescriptdir}/jupyter_core
179 %{py_sitescriptdir}/jupyter_core-%{version}-py*.egg-info
180 %endif
181
182 %if %{with python3}
183 %files -n python3-jupyter_core
184 %defattr(644,root,root,755)
185 %doc COPYING.md README.md
186 %attr(755,root,root) %{_bindir}/jupyter-3
187 %attr(755,root,root) %{_bindir}/jupyter-migrate-3
188 %attr(755,root,root) %{_bindir}/jupyter-troubleshoot-3
189 %{py3_sitescriptdir}/jupyter.py
190 %{py3_sitescriptdir}/__pycache__/jupyter.cpython-*.py[co]
191 %{py3_sitescriptdir}/jupyter_core
192 %{py3_sitescriptdir}/jupyter_core-%{version}-py*.egg-info
193 %endif
194
195 %if %{with doc}
196 %files apidocs
197 %defattr(644,root,root,755)
198 %doc docs/_build/html/{_static,*.html,*.js}
199 %endif
200
201 %files -n bash-completion-jupyter
202 %defattr(644,root,root,755)
203 %{bash_compdir}/jupyter
204
205 %files -n zsh-completion-jupyter
206 %defattr(644,root,root,755)
207 %{zsh_compdir}/_jupyter
This page took 0.071526 seconds and 3 git commands to generate.