|
|
60f9c3d |
%if 0%{?epel}
|
|
|
60f9c3d |
# disable build of docs and tests for epel because of missing dependencies:
|
|
|
60f9c3d |
# - python3-ipykernel
|
|
|
60f9c3d |
# - python3-jupyter-client
|
|
|
60f9c3d |
# - python3-nbformat
|
|
|
60f9c3d |
# - python3-testpath
|
|
|
60f9c3d |
# tests and docs subpackages are also disabled
|
|
|
60f9c3d |
%bcond_with check
|
|
|
60f9c3d |
%bcond_with doc
|
|
|
60f9c3d |
%else
|
|
|
1bbe771 |
%bcond_without check
|
|
|
1bbe771 |
%bcond_without doc
|
|
|
60f9c3d |
%endif
|
|
Thomas Spura |
40fb0db |
|
|
Shahms King |
44d2679 |
Name: ipython
|
|
|
efcf424 |
Version: 8.23.0
|
|
|
a66ce4a |
Release: %autorelease
|
|
Shahms King |
44d2679 |
Summary: An enhanced interactive Python shell
|
|
Shahms King |
44d2679 |
|
|
|
5c33977 |
# SPDX
|
|
|
5c33977 |
# Source code is licensed under BSD-3-Clause except
|
|
|
5c33977 |
# /IPython/testing/plugin/pytest_ipdoctest.py, which is MIT licensed
|
|
|
5c33977 |
# Docs and examples are licensed under CC-BY-4.0
|
|
|
5c33977 |
License: BSD-3-Clause AND MIT AND CC-BY-4.0
|
|
Thomas Spura |
aad6999 |
URL: http://ipython.org/
|
|
|
74bce4d |
Source0: %pypi_source
|
|
|
74bce4d |
|
|
Shahms King |
44d2679 |
BuildArch: noarch
|
|
|
0f97376 |
BuildRequires: make
|
|
Thomas Spura |
5e59364 |
BuildRequires: python3-devel
|
|
|
7f044bb |
BuildRequires: python3-setuptools
|
|
|
f7c85fb |
BuildRequires: python3-stack-data
|
|
Thomas Spura |
aad6999 |
|
|
Thomas Spura |
94e35d0 |
%if %{with doc}
|
|
|
eb72a81 |
BuildRequires: python3-sphinx
|
|
|
bff004b |
BuildRequires: python3-sphinx_rtd_theme
|
|
|
42dcf61 |
BuildRequires: python3-ipykernel
|
|
|
3d1746b |
BuildRequires: python3-matplotlib
|
|
|
3d1746b |
BuildRequires: python3-numpy
|
|
|
94d11e3 |
BuildRequires: python3-typing-extensions
|
|
Thomas Spura |
94e35d0 |
%endif
|
|
Thomas Spura |
aad6999 |
|
|
Thomas Spura |
94e35d0 |
%if %{with check}
|
|
Thomas Spura |
9a7bb2a |
BuildRequires: python3-Cython
|
|
Thomas Spura |
4e20f2d |
BuildRequires: python3-matplotlib
|
|
|
028cff7 |
BuildRequires: python3-matplotlib-inline
|
|
Thomas Spura |
4e20f2d |
BuildRequires: python3-pymongo
|
|
Orion Poplawski |
f404de9 |
BuildRequires: python3-tornado >= 4.0
|
|
Thomas Spura |
5e59364 |
BuildRequires: python3-zmq
|
|
Thomas Spura |
5e59364 |
BuildRequires: python3-zmq-tests
|
|
|
eb72a81 |
BuildRequires: python3-nbformat
|
|
|
eb72a81 |
BuildRequires: python3-pytest
|
|
|
f7c85fb |
BuildRequires: python3-pytest-asyncio
|
|
|
eb72a81 |
BuildRequires: python3-ipykernel
|
|
|
eb72a81 |
BuildRequires: python3-jupyter-client
|
|
|
eb72a81 |
BuildRequires: python3-testpath
|
|
Thomas Spura |
40fb0db |
# for frontend
|
|
Thomas Spura |
4e20f2d |
BuildRequires: python3-pygments
|
|
|
f09ccf6 |
# for latex
|
|
|
f09ccf6 |
BuildRequires: /usr/bin/dvipng
|
|
|
f09ccf6 |
BuildRequires: tex(amsmath.sty)
|
|
|
f09ccf6 |
BuildRequires: tex(amssymb.sty)
|
|
|
f09ccf6 |
BuildRequires: tex(amsthm.sty)
|
|
|
f09ccf6 |
BuildRequires: tex(bm.sty)
|
|
|
0f97376 |
%endif
|
|
Thomas Spura |
40fb0db |
|
|
Thomas Spura |
8f9f3a7 |
%global ipython_desc_base \
|
|
Thomas Spura |
8f9f3a7 |
IPython provides a replacement for the interactive Python interpreter with\
|
|
Thomas Spura |
8f9f3a7 |
extra functionality.\
|
|
Thomas Spura |
8f9f3a7 |
\
|
|
Thomas Spura |
8f9f3a7 |
Main features:\
|
|
Thomas Spura |
8f9f3a7 |
* Comprehensive object introspection.\
|
|
Thomas Spura |
8f9f3a7 |
* Input history, persistent across sessions.\
|
|
Thomas Spura |
8f9f3a7 |
* Caching of output results during a session with automatically generated\
|
|
Thomas Spura |
8f9f3a7 |
references.\
|
|
Thomas Spura |
8f9f3a7 |
* Readline based name completion.\
|
|
Thomas Spura |
8f9f3a7 |
* Extensible system of 'magic' commands for controlling the environment and\
|
|
Thomas Spura |
8f9f3a7 |
performing many tasks related either to IPython or the operating system.\
|
|
Thomas Spura |
8f9f3a7 |
* Configuration system with easy switching between different setups (simpler\
|
|
Thomas Spura |
8f9f3a7 |
than changing $PYTHONSTARTUP environment variables every time).\
|
|
Thomas Spura |
8f9f3a7 |
* Session logging and reloading.\
|
|
Thomas Spura |
8f9f3a7 |
* Extensible syntax processing for special purpose situations.\
|
|
Thomas Spura |
8f9f3a7 |
* Access to the system shell with user-extensible alias system.\
|
|
Thomas Spura |
8f9f3a7 |
* Easily embeddable in other Python programs.\
|
|
Thomas Spura |
8f9f3a7 |
* Integrated access to the pdb debugger and the Python profiler.
|
|
|
c055309 |
|
|
Shahms King |
44d2679 |
%description
|
|
Thomas Spura |
8f9f3a7 |
%{ipython_desc_base}
|
|
Shahms King |
44d2679 |
|
|
Thomas Spura |
8890cd1 |
%package -n python3-ipython
|
|
Thomas Spura |
8890cd1 |
Summary: An enhanced interactive Python shell
|
|
Thomas Spura |
4ff0c9d |
%{?python_provide:%python_provide python3-ipython}
|
|
|
eb72a81 |
%{?python_provide:%python_provide python3-ipython-console}
|
|
|
1c190af |
Provides: ipython3 = %{version}-%{release}
|
|
|
1761e42 |
Provides: ipython = %{version}-%{release}
|
|
|
eb72a81 |
Provides: python3-ipython-console = %{version}-%{release}
|
|
|
eb72a81 |
Obsoletes: python3-ipython-console < 5.3.0-1
|
|
|
1761e42 |
Conflicts: python2-ipython < 7
|
|
Thomas Spura |
1125183 |
|
|
|
b430bdd |
BuildRequires: python3-backcall
|
|
Thomas Spura |
faf26ce |
BuildRequires: python3-decorator
|
|
|
b430bdd |
BuildRequires: python3-jedi >= 0.10
|
|
Thomas Spura |
faf26ce |
BuildRequires: python3-pexpect
|
|
|
b430bdd |
BuildRequires: python3-pickleshare
|
|
|
74bce4d |
BuildRequires: python3-prompt-toolkit >= 2
|
|
|
0385537 |
BuildRequires: python3-traitlets >= 5.13.0
|
|
|
f09ccf6 |
Requires: (tex(amsmath.sty) if /usr/bin/dvipng)
|
|
|
f09ccf6 |
Requires: (tex(amssymb.sty) if /usr/bin/dvipng)
|
|
|
f09ccf6 |
Requires: (tex(amsthm.sty) if /usr/bin/dvipng)
|
|
|
f09ccf6 |
Requires: (tex(bm.sty) if /usr/bin/dvipng)
|
|
Thomas Spura |
eda87c9 |
|
|
|
eb72a81 |
%description -n python3-ipython
|
|
Thomas Spura |
4d3644e |
%{ipython_desc_base}
|
|
Thomas Spura |
4d3644e |
|
|
Thomas Spura |
1125183 |
This package provides IPython for in a terminal.
|
|
Thomas Spura |
1125183 |
|
|
|
c3a41eb |
%{?python_extras_subpkg:%python_extras_subpkg -n python3-ipython -i %{python3_sitelib}/*.egg-info notebook}
|
|
|
c3a41eb |
|
|
Thomas Spura |
feba6ef |
%package -n python3-ipython-sphinx
|
|
Thomas Spura |
feba6ef |
Summary: Sphinx directive to support embedded IPython code
|
|
Thomas Spura |
4ff0c9d |
%{?python_provide:%python_provide python3-ipython-sphinx}
|
|
|
eb72a81 |
Requires: python3-ipython = %{version}-%{release}
|
|
Thomas Spura |
f551050 |
BuildRequires: python3-sphinx
|
|
Thomas Spura |
feba6ef |
Requires: python3-sphinx
|
|
Thomas Spura |
feba6ef |
|
|
Thomas Spura |
feba6ef |
%description -n python3-ipython-sphinx
|
|
Thomas Spura |
feba6ef |
%{ipython_desc_base}
|
|
Thomas Spura |
feba6ef |
|
|
Thomas Spura |
feba6ef |
This package contains the ipython sphinx extension.
|
|
Thomas Spura |
feba6ef |
|
|
|
60f9c3d |
%if %{with check}
|
|
|
c92e697 |
%package -n python3-ipython+test
|
|
Thomas Spura |
8890cd1 |
Summary: Tests for %{name}
|
|
|
c92e697 |
Provides: python3-ipython-tests = %{version}-%{release}
|
|
|
c92e697 |
Obsoletes: python3-ipython-tests < 8.7.0-2
|
|
Thomas Spura |
4ff0c9d |
%{?python_provide:%python_provide python3-ipython-tests}
|
|
|
c92e697 |
%{?python_provide:%python_provide python3-ipython+test}
|
|
|
b430bdd |
Requires: python3-ipykernel
|
|
|
eb72a81 |
Requires: python3-ipython = %{version}-%{release}
|
|
|
b430bdd |
Requires: python3-jupyter-client
|
|
|
eb72a81 |
Requires: python3-nbformat
|
|
|
b430bdd |
Requires: python3-zmq-tests
|
|
|
f09ccf6 |
# For latex
|
|
|
f09ccf6 |
Requires: /usr/bin/dvipng
|
|
|
f09ccf6 |
Requires: tex(amsmath.sty)
|
|
|
f09ccf6 |
Requires: tex(amssymb.sty)
|
|
|
f09ccf6 |
Requires: tex(amsthm.sty)
|
|
|
f09ccf6 |
Requires: tex(bm.sty)
|
|
|
b430bdd |
|
|
|
c92e697 |
%description -n python3-ipython+test
|
|
Thomas Spura |
8890cd1 |
This package contains the tests of %{name}.
|
|
Thomas Spura |
375c18d |
You can check this way, if ipython works on your platform.
|
|
|
60f9c3d |
%endif
|
|
Thomas Spura |
8890cd1 |
|
|
|
eb72a81 |
%if %{with doc}
|
|
Thomas Spura |
e290d79 |
%package -n python3-ipython-doc
|
|
Thomas Spura |
8890cd1 |
Summary: Documentation for %{name}
|
|
Thomas Spura |
4ff0c9d |
%{?python_provide:%python_provide python3-ipython-doc}
|
|
Thomas Spura |
e290d79 |
%description -n python3-ipython-doc
|
|
Thomas Spura |
8890cd1 |
This package contains the documentation of %{name}.
|
|
|
0f97376 |
%endif
|
|
Thomas Spura |
8890cd1 |
|
|
Thomas Spura |
8890cd1 |
|
|
Shahms King |
44d2679 |
%prep
|
|
|
74bce4d |
%autosetup -p1
|
|
|
a0d71d1 |
|
|
|
dfd5875 |
# delete bundling libs
|
|
|
dfd5875 |
pushd IPython/external
|
|
Thomas Spura |
1ac0a7b |
ls -l
|
|
Thomas Spura |
1ac0a7b |
ls -l *
|
|
|
dfd5875 |
|
|
|
dfd5875 |
popd
|
|
Shahms King |
44d2679 |
|
|
|
6cd3346 |
# Remove shebangs
|
|
|
6cd3346 |
sed -i '1d' $(grep -lr '^#!/usr/' IPython)
|
|
|
6cd3346 |
|
|
|
55250a4 |
find . -name '*.py' -print0 | xargs -0 sed -i '1s|^#!python|#!%{__python3}|'
|
|
Thomas Spura |
e290d79 |
|
|
|
710ae98 |
# Drop upper bound on `pytest-asyncio`
|
|
|
710ae98 |
# https://bugzilla.redhat.com/show_bug.cgi?id=2273582
|
|
|
710ae98 |
sed -r -i 's/(pytest-asyncio).*"/\1"/' pyproject.toml
|
|
|
710ae98 |
|
|
|
132ba95 |
# Compatibility with pytest 8
|
|
|
132ba95 |
sed -i "/pytest/s/<8//" pyproject.toml
|
|
|
132ba95 |
sed -i "s/def setup(/def setup_method(/" IPython/core/tests/test_pylabtools.py
|
|
|
132ba95 |
sed -i "s/def teardown(/def teardown_method(/" IPython/core/tests/test_pylabtools.py
|
|
|
132ba95 |
|
|
|
132ba95 |
|
|
Shahms King |
44d2679 |
%build
|
|
|
55250a4 |
%py3_build
|
|
Shahms King |
44d2679 |
|
|
Shahms King |
44d2679 |
|
|
Thomas Spura |
94e35d0 |
%if %{with doc}
|
|
|
eb72a81 |
pushd docs
|
|
|
4ced9fe |
PYTHONPATH=.. make html SPHINXBUILD='sphinx-build-3 -D intersphinx_timeout=1'
|
|
Thomas Spura |
94e35d0 |
mkdir -p build/html/
|
|
|
eb72a81 |
rm -rf build/html/.buildinfo
|
|
|
eb72a81 |
popd
|
|
Thomas Spura |
94e35d0 |
%endif
|
|
Thomas Spura |
94e35d0 |
|
|
Thomas Spura |
94e35d0 |
|
|
Shahms King |
44d2679 |
%install
|
|
|
55250a4 |
%py3_install
|
|
|
efa169a |
|
|
|
1761e42 |
# link the manpage to ipython3
|
|
|
55250a4 |
mv %{buildroot}%{_mandir}/man1/ipython{,3}.1
|
|
|
1761e42 |
ln -s ./ipython3.1 %{buildroot}%{_mandir}/man1/ipython.1
|
|
Orion Poplawski |
b773f86 |
|
|
Thomas Spura |
19eb4e6 |
|
|
Thomas Spura |
94e35d0 |
%if %{with check}
|
|
Thomas Spura |
aad6999 |
%check
|
|
Thomas Spura |
4e20f2d |
# Ensure that the user's .pythonrc.py is not invoked during any tests.
|
|
Thomas Spura |
4e20f2d |
export PYTHONSTARTUP=""
|
|
|
1cc48cf |
# Koji builders can be slow, especially on arms, we scale timeouts 4 times
|
|
|
1cc48cf |
export IPYTHON_TESTING_TIMEOUT_SCALE=4
|
|
|
f7c85fb |
# To prevent _pytest.pathlib.ImportPathMismatchError, we are
|
|
|
f7c85fb |
# testing directly in buildroot
|
|
|
f7c85fb |
pushd %{buildroot}%{python3_sitelib}/IPython
|
|
|
c92b8a8 |
%pytest
|
|
|
f7c85fb |
rm -rf .pytest_cache
|
|
|
f7c85fb |
popd
|
|
|
60f9c3d |
%else
|
|
|
60f9c3d |
rm -r %{buildroot}%{python3_sitelib}/IPython/*/tests
|
|
Thomas Spura |
94e35d0 |
%endif
|
|
|
efa169a |
|
|
Thomas Spura |
e290d79 |
%files -n python3-ipython
|
|
Thomas Spura |
e290d79 |
%{_bindir}/ipython3
|
|
|
1761e42 |
%{_bindir}/ipython
|
|
|
1761e42 |
%{_mandir}/man1/ipython.*
|
|
|
55250a4 |
%{_mandir}/man1/ipython3.*
|
|
Thomas Spura |
8890cd1 |
|
|
Thomas Spura |
8890cd1 |
%dir %{python3_sitelib}/IPython
|
|
Thomas Spura |
8890cd1 |
%{python3_sitelib}/IPython/external
|
|
Thomas Spura |
e290d79 |
%{python3_sitelib}/IPython/__pycache__/
|
|
Thomas Spura |
8890cd1 |
%{python3_sitelib}/IPython/*.py*
|
|
|
7810299 |
%{python3_sitelib}/IPython/py.typed
|
|
Thomas Spura |
8890cd1 |
%dir %{python3_sitelib}/IPython/testing
|
|
Thomas Spura |
e290d79 |
%{python3_sitelib}/IPython/testing/__pycache__/
|
|
Thomas Spura |
8890cd1 |
%{python3_sitelib}/IPython/testing/*.py*
|
|
Thomas Spura |
8890cd1 |
%{python3_sitelib}/IPython/testing/plugin
|
|
|
7f044bb |
%{python3_sitelib}/ipython-%{version}-py%{python3_version}.egg-info/
|
|
Thomas Spura |
8890cd1 |
|
|
Thomas Spura |
8890cd1 |
%{python3_sitelib}/IPython/core/
|
|
Thomas Spura |
8890cd1 |
%{python3_sitelib}/IPython/extensions/
|
|
Thomas Spura |
8890cd1 |
%{python3_sitelib}/IPython/lib/
|
|
Thomas Spura |
feba6ef |
%{python3_sitelib}/IPython/terminal/
|
|
Thomas Spura |
8890cd1 |
%{python3_sitelib}/IPython/utils/
|
|
Thomas Spura |
8890cd1 |
|
|
Thomas Spura |
8890cd1 |
# tests go into subpackage
|
|
Thomas Spura |
8890cd1 |
%exclude %{python3_sitelib}/IPython/*/tests/
|
|
Thomas Spura |
8890cd1 |
|
|
Thomas Spura |
8890cd1 |
|
|
Thomas Spura |
feba6ef |
%files -n python3-ipython-sphinx
|
|
Thomas Spura |
feba6ef |
%{python3_sitelib}/IPython/sphinxext/
|
|
Thomas Spura |
feba6ef |
|
|
|
60f9c3d |
%if %{with check}
|
|
|
c92e697 |
%files -n python3-ipython+test
|
|
|
c92e697 |
%ghost %{python3_sitelib}/ipython-%{version}-py%{python3_version}.egg-info/
|
|
Thomas Spura |
8890cd1 |
%{python3_sitelib}/IPython/*/tests
|
|
|
60f9c3d |
%endif
|
|
Thomas Spura |
8890cd1 |
|
|
Thomas Spura |
94e35d0 |
%if %{with doc}
|
|
|
eb72a81 |
%files -n python3-ipython-doc
|
|
|
eb72a81 |
%doc docs/build/html
|
|
Thomas Spura |
94e35d0 |
%endif
|
|
Thomas Spura |
8890cd1 |
|
|
Thomas Spura |
8890cd1 |
|
|
Shahms King |
44d2679 |
%changelog
|
|
|
a66ce4a |
%autochangelog
|