- Update to 8.27.0

* autocall was beeing call getitem, PR #14486
  * Only copy files in startup dir if we just created it. PR #14497
  * Fix some tests on Python 3.13 RC1 PR #14504
- IPython 8.26
  * PR #14453 bugfix for call to structured_traceback
  * R #14466 fixed honoring custom repr for NamedTuple if assigned
    by partialmethod
  * PR #14451 Convert matplotlib gui name in enable_gui

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-ipython?expand=0&rev=133
This commit is contained in:
Benjamin Greiner 2024-08-30 10:20:32 +00:00 committed by Git OBS Bridge
commit fb40712fa3
8 changed files with 1863 additions and 0 deletions

25
.gitattributes vendored Normal file
View File

@ -0,0 +1,25 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
## Specific LFS patterns
JupyterConsole.svg filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
JupyterConsole.svg Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5c964ec992b736edcebbaac49eb1ce18f474a12689e7a5437f30f54e3f723cec
size 26397

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

3
ipython-8.25.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c6ed726a140b6e725b911528f80439c534fac915246af3efc39440a6b0f9d716
size 5492936

3
ipython-8.27.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0b99a2dc9f15fd68692e898e5568725c6d49c527d36a9fb5960ffbdeaa82ff7e
size 5494984

1576
python-ipython.changes Normal file

File diff suppressed because it is too large Load Diff

249
python-ipython.spec Normal file
View File

@ -0,0 +1,249 @@
#
# spec file for package python-ipython
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
# extra tests are skipped automatically, don't require these packages for Ring1
%bcond_with localtest
%{?sle15_python_module_pythons}
Name: python-ipython%{psuffix}
Version: 8.27.0
Release: 0
Summary: Rich architecture for interactive computing with Python
License: BSD-3-Clause
URL: https://github.com/ipython/ipython
Source: https://files.pythonhosted.org/packages/source/i/ipython/ipython-%{version}.tar.gz
Source1: https://raw.githubusercontent.com/jupyter/qtconsole/4.0.0/qtconsole/resources/icon/JupyterConsole.svg
BuildRequires: %{python_module base >= 3.10}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 61.2}
BuildRequires: %{python_module wheel}
BuildRequires: %{pythons}
BuildRequires: fdupes
BuildRequires: python-rpm-macros >= 20210929
# requires the full stdlib including sqlite3
Requires: python
Requires: python-decorator
Requires: python-jedi >= 0.16
Requires: python-matplotlib-inline
Requires: python-pexpect >= 4.3
Requires: python-pygments >= 2.4.0
Requires: python-stack-data
Requires: python-traitlets >= 5.13.0
Requires: (python-prompt_toolkit >= 3.0.41 with python-prompt_toolkit < 3.1)
%if %{python_version_nodots} < 311
Requires: python-exceptiongroup
%endif
%if %{python_version_nodots} < 312
Requires: python-typing_extensions >= 4.6
%endif
Recommends: jupyter
Recommends: python-ipykernel
Recommends: python-ipyparallel
Recommends: python-ipywidgets
Provides: IPython3 = %{version}
Obsoletes: IPython3 < %{version}
Provides: python-IPython = %{version}
Obsoletes: python-IPython < %{version}
Provides: python-jupyter_ipython = %{version}
Obsoletes: python-jupyter_ipython < %{version}
Provides: jupyter-ipython = %{version}
Provides: python-ipython-doc = %{version}
Obsoletes: python-ipython-doc < %{version}
Provides: python-jupyter_ipython-doc = %{version}
Obsoletes: python-jupyter_ipython-doc < %{version}
Provides: python-jupyter_ipython-doc-html = %{version}
Obsoletes: python-jupyter_ipython-doc-html < %{version}
Provides: python-jupyter_ipython-doc-pdf = %{version}
Obsoletes: python-jupyter_ipython-doc-pdf < %{version}
BuildArch: noarch
%if %{with test}
BuildRequires: %{python_module ipython = %{version}}
BuildRequires: %{python_module matplotlib}
BuildRequires: %{python_module numpy >= 1.23}
BuildRequires: %{python_module pandas}
BuildRequires: %{python_module pickleshare}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module testpath}
BuildRequires: %{python_module trio}
%endif
%if %{with localtest}
BuildRequires: %{python_module nbformat}
%endif
%if !%{with test}
BuildRequires: desktop-file-utils
BuildRequires: hicolor-icon-theme
BuildRequires: update-desktop-files
%if %{with libalternatives}
BuildRequires: alts
Requires: alts
%else
Requires(post): update-alternatives
Requires(postun): update-alternatives
%endif
%if %{with ico}
BuildRequires: icoutils
%endif
%endif
%python_subpackages
%description
IPython provides a rich toolkit to help you make the
most out of using Python interactively. Its main
components are:
* A powerful interactive Python shell
* A Jupyter kernel to work with Python code in
Jupyter notebooks and other interactive frontends.
The enhanced interactive Python shells have the
following main features:
* Comprehensive object introspection.
* Input history, persistent across sessions.
* Caching of output results during a session with automatically
generated references.
* Extensible tab completion, with support by default for completion
of python variables and keywords, filenames and function keywords.
* Extensible system of magic commands for controlling the
environment and performing many tasks related either to IPython or
the operating system.
* A rich configuration system with easy switching between different
setups (simpler than changing $PYTHONSTARTUP environment variables
every time).
* Session logging and reloading.
* Extensible syntax processing for special purpose situations.
* Access to the system shell with user-extensible alias system.
* Easily embeddable in other Python programs and GUIs.
* Integrated access to the pdb debugger and the Python profiler.
%prep
%autosetup -p1 -n ipython-%{version}
%build
%pyproject_wheel
%if !%{with test}
%if %{with ico}
pushd scripts
icotool -x ipython.ico
icotool -x ipython_nb.ico
popd
%endif
%endif
%install
%if !%{with test}
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/ipython
%python_clone -a %{buildroot}%{_bindir}/ipython3
# must clone after copy
cp %{buildroot}%{_mandir}/man1/ipython{,3}.1
%python_clone -a %{buildroot}%{_mandir}/man1/ipython.1
%python_clone -a %{buildroot}%{_mandir}/man1/ipython3.1
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
%python_expand cp %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/IPython-%{$python_bin_suffix}.svg
%if %{with ico}
# Install the icons
for x in 16 24 32 48 256 ; do
mkdir -p %{buildroot}%{_datadir}/icons/hicolor/${x}x${x}/apps/
ipyf=(scripts/ipython_*_${x}x${x}x32.png)
ipynbf=(scripts/ipython_nb_*_${x}x${x}x32.png)
%python_expand cp ${ipyf[0]} %{buildroot}%{_datadir}/icons/hicolor/${x}x${x}/apps/IPython-%{$python_bin_suffix}.png
%python_expand cp ${ipynbf[0]} %{buildroot}%{_datadir}/icons/hicolor/${x}x${x}/apps/IPythonNotebook-%{$python_bin_suffix}.png
done
%endif
# Modify and install .desktop file
%{python_expand cp examples/IPython\ Kernel/ipython.desktop ipython-%{$python_bin_suffix}.desktop
desktop-file-edit --set-comment="Enhanced interactive Python %{$python_bin_suffix} shell" --set-name="ipython %{$python_bin_suffix}" --set-generic-name="IPython %{$python_bin_suffix}" --set-key="Exec" --set-value="ipython-%{$python_bin_suffix}" --set-icon="IPython-%{$python_bin_suffix}" ipython-%{$python_bin_suffix}.desktop
%suse_update_desktop_file -i -r ipython-%{$python_bin_suffix} "System;TerminalEmulator;"
}
%{python_expand # These can be run stand-alone, so make them executable rather than removing shebang
find %{buildroot}%{$python_sitelib} -type f -name "*.py" -exec sed -i "s|^#!%{_bindir}/env python$|#!%{__$python}|" {} \;
find %{buildroot}%{$python_sitelib} -type f -name "*.py" -exec sed -i "s|^#!%{_bindir}/python$|#!%{__$python}|" {} \;
find %{buildroot}%{$python_sitelib} -type f -name "*.py" -exec grep -q "#!%{__$python}" {} \; -exec chmod a+x {} \;
$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/IPython
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/IPython
%fdupes %{buildroot}%{$python_sitelib}
}
%fdupes %{buildroot}%{_bindir}
%fdupes %{buildroot}%{_mandir}
%endif
%if %{with test}
%check
export PYTHONPATH=$(pwd)
%pytest
%endif
%if !%{with test}
%pre
# If libalternatives is used: Removing old update-alternatives entries.
%python_libalternatives_reset_alternative ipython
%post
%python_install_alternative ipython ipython3 ipython.1.gz ipython3.1.gz
%desktop_database_post
%icon_theme_cache_post
%postun
%python_uninstall_alternative ipython
%desktop_database_postun
%icon_theme_cache_postun
%endif
%if !%{with test}
%files %{python_files}
%license COPYING.rst
%doc README.rst docs/source/about/license_and_copyright.rst
%python_alternative %{_bindir}/ipython
%python_alternative %{_bindir}/ipython3
%python_alternative %{_mandir}/man1/ipython.1.gz
%python_alternative %{_mandir}/man1/ipython3.1.gz
%{python_sitelib}/IPython/
%{python_sitelib}/ipython-%{version}.dist-info
%{_datadir}/applications/ipython-%{python_bin_suffix}.desktop
%{_datadir}/icons/hicolor/scalable/apps/IPython-%{python_bin_suffix}.svg
%if %{with ico}
%{_datadir}/icons/hicolor/*x*/apps/IPython-%{python_bin_suffix}.png
%{_datadir}/icons/hicolor/*x*/apps/IPythonNotebook-%{python_bin_suffix}.png
%endif
%endif
%changelog