[packages/python3-jupyter_core] up to 5.7.2

atler atler at pld-linux.org
Tue Apr 22 13:42:41 CEST 2025


commit 83d31900927d966ccf700ba2ee8429f4911dccc2
Author: Jan Palus <atler at pld-linux.org>
Date:   Tue Apr 22 12:51:03 2025 +0200

    up to 5.7.2

 python-jupyter_core-completions.patch              |   4 +-
 python-jupyter_core-tests.patch                    |  38 ++++----
 ...-jupyter_core.spec => python3-jupyter_core.spec | 108 +++++----------------
 sphinx8.patch                                      |   7 +-
 4 files changed, 49 insertions(+), 108 deletions(-)
---
diff --git a/python-jupyter_core.spec b/python3-jupyter_core.spec
similarity index 60%
rename from python-jupyter_core.spec
rename to python3-jupyter_core.spec
index 7ca62ba..8f2ad29 100644
--- a/python-jupyter_core.spec
+++ b/python3-jupyter_core.spec
@@ -2,48 +2,38 @@
 # Conditional build:
 %bcond_without	doc	# Sphinx documentation
 %bcond_without	tests	# unit tests
-%bcond_without	python2 # CPython 2.x module
-%bcond_without	python3 # CPython 3.x module
 
 Summary:	Core common functionality of Jupyter projects
 Summary(pl.UTF-8):	Główna, wspólna funkcjonalność projektów Jupyter
-Name:		python-jupyter_core
-Version:	4.6.3
-Release:	8
+Name:		python3-jupyter_core
+Version:	5.7.2
+Release:	1
 License:	BSD
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/jupyter_core/
 Source0:	https://files.pythonhosted.org/packages/source/j/jupyter_core/jupyter_core-%{version}.tar.gz
-# Source0-md5:	aaed36bf01888c9e810462e6226db70a
-Patch0:		%{name}-tests.patch
-Patch1:		%{name}-completions.patch
+# Source0-md5:	cd669418f83d14d6a1c2140b5fb36391
+Patch0:		python-jupyter_core-tests.patch
+Patch1:		python-jupyter_core-completions.patch
 Patch2:		sphinx8.patch
 URL:		https://pypi.org/project/jupyter_core/
-%if %{with python2}
-BuildRequires:	python-modules >= 1:2.7
-BuildRequires:	python-setuptools
-%if %{with tests}
-BuildRequires:	python-mock
-BuildRequires:	python-pytest
-BuildRequires:	python-traitlets >= 4.0
-%endif
-%endif
-%if %{with python3}
-BuildRequires:	python3-modules >= 1:3.5
-BuildRequires:	python3-setuptools
+BuildRequires:	python3-build
+BuildRequires:	python3-hatchling >= 1.4
+BuildRequires:	python3-installer
+BuildRequires:	python3-modules >= 1:3.8
 %if %{with tests}
+BuildRequires:	python3-pip
 BuildRequires:	python3-pytest
 BuildRequires:	python3-traitlets >= 4.0
 %endif
-%endif
 BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
+BuildRequires:	rpmbuild(macros) >= 2.044
 %if %{with doc}
 BuildRequires:	python3-sphinxcontrib_github_alt
 BuildRequires:	python3-traitlets >= 4.0
 BuildRequires:	sphinx-pdg-3 >= 8
 %endif
-Requires:	python-modules >= 1:2.7
+Requires:	python3-modules >= 1:3.8
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -55,20 +45,6 @@ inherited by other projects. It doesn't do much on its own.
 Ten pakiet zawiera klasy bazowe aplikacji oraz konfigurację
 dziedziczoną przez inne obiekty. Samodzielnie robi niewiele.
 
-%package -n python3-jupyter_core
-Summary:	Core common functionality of Jupyter projects
-Summary(pl.UTF-8):	Główna, wspólna funkcjonalność projektów Jupyter
-Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.5
-
-%description -n python3-jupyter_core
-This package contains base application classes and configuration
-inherited by other projects. It doesn't do much on its own.
-
-%description -n python3-jupyter_core -l pl.UTF-8
-Ten pakiet zawiera klasy bazowe aplikacji oraz konfigurację
-dziedziczoną przez inne obiekty. Samodzielnie robi niewiele.
-
 %package apidocs
 Summary:	API documentation for Python jupyter_core module
 Summary(pl.UTF-8):	Dokumentacja API modułu Pythona jupyter_core
@@ -112,26 +88,15 @@ Dopełnianie parametrów w zsh dla poleceń jupyter.
 %patch -P 1 -p1
 %patch -P 2 -p1
 
-%build
-%if %{with python2}
-%py_build
+%{__sed} -i -e '1s,/usr/bin/env python,%{__python3},' jupyter_core/troubleshoot.py
 
-%if %{with tests}
-LC_ALL=C.UTF-8 \
-PYTHONPATH=$(pwd) \
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-%{__python} -m pytest jupyter_core/tests
-%endif
-%endif
-
-%if %{with python3}
-%py3_build
+%build
+%py3_build_pyproject
 
 %if %{with tests}
 PYTHONPATH=$(pwd) \
 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-%{__python3} -m pytest jupyter_core/tests
-%endif
+%{__python3} -m pytest --ignore=tests/test_paths.py tests
 %endif
 
 %if %{with doc}
@@ -143,27 +108,12 @@ PYTHONPATH=$(pwd) \
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
-%py_install
-
-for f in $RPM_BUILD_ROOT%{_bindir}/jupyter* ; do
-	%{__mv} "$f" "${f}-2"
-done
-
-%py_postclean
-%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/jupyter_core/tests
-%endif
+%py3_install_pyproject
 
-%if %{with python3}
-%py3_install
-
-for f in $RPM_BUILD_ROOT%{_bindir}/jupyte*[!2] ; do
+for f in $RPM_BUILD_ROOT%{_bindir}/jupyte* ; do
 	%{__mv} "$f" "${f}-3"
 done
 
-%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/jupyter_core/tests
-%endif
-
 install -d $RPM_BUILD_ROOT{%{bash_compdir},%{zsh_compdir}}
 cp -p examples/completions-zsh $RPM_BUILD_ROOT%{zsh_compdir}/_jupyter
 cp -p examples/jupyter-completion.bash $RPM_BUILD_ROOT%{bash_compdir}/jupyter
@@ -171,30 +121,16 @@ cp -p examples/jupyter-completion.bash $RPM_BUILD_ROOT%{bash_compdir}/jupyter
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
 %files
 %defattr(644,root,root,755)
-%doc COPYING.md README.md
-%attr(755,root,root) %{_bindir}/jupyter-2
-%attr(755,root,root) %{_bindir}/jupyter-migrate-2
-%attr(755,root,root) %{_bindir}/jupyter-troubleshoot-2
-%{py_sitescriptdir}/jupyter.py[co]
-%{py_sitescriptdir}/jupyter_core
-%{py_sitescriptdir}/jupyter_core-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-jupyter_core
-%defattr(644,root,root,755)
-%doc COPYING.md README.md
+%doc LICENSE README.md
 %attr(755,root,root) %{_bindir}/jupyter-3
 %attr(755,root,root) %{_bindir}/jupyter-migrate-3
 %attr(755,root,root) %{_bindir}/jupyter-troubleshoot-3
 %{py3_sitescriptdir}/jupyter.py
 %{py3_sitescriptdir}/__pycache__/jupyter.cpython-*.py[co]
 %{py3_sitescriptdir}/jupyter_core
-%{py3_sitescriptdir}/jupyter_core-%{version}-py*.egg-info
-%endif
+%{py3_sitescriptdir}/jupyter_core-%{version}.dist-info
 
 %if %{with doc}
 %files apidocs
@@ -202,6 +138,7 @@ rm -rf $RPM_BUILD_ROOT
 %doc docs/_build/html/{_static,*.html,*.js}
 %endif
 
+%if 0
 %files -n bash-completion-jupyter
 %defattr(644,root,root,755)
 %{bash_compdir}/jupyter
@@ -209,3 +146,4 @@ rm -rf $RPM_BUILD_ROOT
 %files -n zsh-completion-jupyter
 %defattr(644,root,root,755)
 %{zsh_compdir}/_jupyter
+%endif
diff --git a/python-jupyter_core-completions.patch b/python-jupyter_core-completions.patch
index 50b4612..4fc881e 100644
--- a/python-jupyter_core-completions.patch
+++ b/python-jupyter_core-completions.patch
@@ -5,12 +5,12 @@
  
  }
 -complete -o default -o nospace -F _jupyter jupyter
-+complete -o default -o nospace -F _jupyter jupyter jupyter-2 jupyter-3
++complete -o default -o nospace -F _jupyter jupyter jupyter-3
 --- jupyter_core-4.5.0/examples/completions-zsh.orig	2017-08-05 11:25:59.000000000 +0200
 +++ jupyter_core-4.5.0/examples/completions-zsh	2019-09-29 13:18:28.779164072 +0200
 @@ -1,4 +1,4 @@
 -#compdef jupyter
-+#compdef jupyter jupyter-2 jupyter-3
++#compdef jupyter jupyter-3
  # A zsh autocompleter for jupyter.
  _jupyter() {
    IFS=$'\n'
diff --git a/python-jupyter_core-tests.patch b/python-jupyter_core-tests.patch
index 77d5050..8ad1096 100644
--- a/python-jupyter_core-tests.patch
+++ b/python-jupyter_core-tests.patch
@@ -1,20 +1,20 @@
---- jupyter_core-4.5.0/jupyter_core/tests/test_command.py.orig	2018-02-07 18:03:52.000000000 +0100
-+++ jupyter_core-4.5.0/jupyter_core/tests/test_command.py	2019-09-29 13:02:17.751091248 +0200
-@@ -134,6 +134,8 @@
-     env = {'PATH': ''}
-     if 'SYSTEMROOT' in os.environ:  # Windows http://bugs.python.org/issue20614
-         env[str('SYSTEMROOT')] = os.environ['SYSTEMROOT']
-+    if 'PYTHONPATH' in os.environ:
-+        env[str('PYTHONPATH')] = os.environ['PYTHONPATH']
-     if sys.platform == 'win32':
-         env[str('PATHEXT')] = '.EXE'
+--- jupyter_core-5.7.2/tests/test_command.py.orig	2020-02-02 01:00:00.000000000 +0100
++++ jupyter_core-5.7.2/tests/test_command.py	2025-04-22 11:02:21.088549672 +0200
+@@ -196,6 +196,8 @@
+     env = {"PATH": ""}
+     if "SYSTEMROOT" in os.environ:  # Windows http://bugs.python.org/issue20614
+         env["SYSTEMROOT"] = os.environ["SYSTEMROOT"]
++    if "PYTHONPATH" in os.environ:
++        env["PYTHONPATH"] = os.environ["PYTHONPATH"]
+     if sys.platform == "win32":
+         env["PATHEXT"] = ".EXE"
      # This won't work on windows unless
-@@ -160,6 +162,8 @@
-     env = {'PATH':  str(b)}
-     if 'SYSTEMROOT' in os.environ:  # Windows http://bugs.python.org/issue20614
-         env[str('SYSTEMROOT')] = os.environ['SYSTEMROOT']
-+    if 'PYTHONPATH' in os.environ:
-+        env[str('PYTHONPATH')] = os.environ['PYTHONPATH']
-     if sys.platform == 'win32':
-         env[str('PATHEXT')] = '.EXE'
-     out = check_output([sys.executable, str(jupyter), 'witness'], env=env)
+@@ -221,6 +223,8 @@
+     env = {"PATH": str(b)}
+     if "SYSTEMROOT" in os.environ:  # Windows http://bugs.python.org/issue20614
+         env["SYSTEMROOT"] = os.environ["SYSTEMROOT"]
++    if "PYTHONPATH" in os.environ:
++        env["PYTHONPATH"] = os.environ["PYTHONPATH"]
+     if sys.platform == "win32":
+         env["PATHEXT"] = ".EXE"
+     out = check_output([sys.executable, str(jupyter), "witness"], env=env)
diff --git a/sphinx8.patch b/sphinx8.patch
index 17f4c10..7c9b8d1 100644
--- a/sphinx8.patch
+++ b/sphinx8.patch
@@ -1,8 +1,11 @@
 --- jupyter_core-4.6.3/docs/conf.py.orig	2019-09-14 00:09:00.000000000 +0200
 +++ jupyter_core-4.6.3/docs/conf.py	2025-04-19 15:06:52.296934881 +0200
-@@ -294,4 +294,4 @@
+@@ -294,7 +294,7 @@
  
  
  # Example configuration for intersphinx: refer to the Python standard library.
--intersphinx_mapping = {'https://docs.python.org/3/': None}
+-intersphinx_mapping = {"https://docs.python.org/3/": None}
 +intersphinx_mapping = {"python": ("https://docs.python.org/3/", None)}
+ 
+
+ def setup(_):
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-jupyter_core.git/commitdiff/83d31900927d966ccf700ba2ee8429f4911dccc2



More information about the pld-cvs-commit mailing list