forked from pool/python-jupyter-core
Accepting request 961397 from home:bnavigator:branches:devel:languages:python:jupyter
- Update to 4.9.2 * set proper sys.argv[0] for subcommand by @bnavigator in #248 * Add explicit encoding in open calls by @dlukes in #249 * jupyter_config_dir - reorder home_dir initialization by @dharmaquark in #251 - Drop argv0_subcommand.patch merged upstream OBS-URL: https://build.opensuse.org/request/show/961397 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:jupyter/python-jupyter-core?expand=0&rev=22
This commit is contained in:
parent
6ab56870ec
commit
c9c4bc60a8
@ -1,43 +0,0 @@
|
||||
diff -Naur org/jupyter_core/command.py patch/jupyter_core/command.py
|
||||
--- org/jupyter_core/command.py 2021-11-12 09:01:30.121064192 +0100
|
||||
+++ patch/jupyter_core/command.py 2021-11-12 09:07:57.943564964 +0100
|
||||
@@ -297,7 +297,7 @@
|
||||
sys.exit(e)
|
||||
|
||||
try:
|
||||
- _execvp(command, sys.argv[1:])
|
||||
+ _execvp(command, [command] + sys.argv[2:])
|
||||
except OSError as e:
|
||||
sys.exit("Error executing Jupyter command %r: %s" % (subcommand, e))
|
||||
|
||||
diff -Naur org/jupyter_core/tests/test_command.py patch/jupyter_core/tests/test_command.py
|
||||
--- org/jupyter_core/tests/test_command.py 2021-11-12 09:01:59.721265505 +0100
|
||||
+++ patch/jupyter_core/tests/test_command.py 2021-11-12 09:09:21.832084810 +0100
|
||||
@@ -192,3 +192,27 @@
|
||||
env[str('PATHEXT')] = '.EXE'
|
||||
out = check_output([sys.executable, str(jupyter), 'witness'], env=env)
|
||||
assert b'WITNESS A' in out
|
||||
+
|
||||
+def test_argv0(tmpdir):
|
||||
+ a = tmpdir.mkdir("a")
|
||||
+ jupyter = a.join('jupyter')
|
||||
+ jupyter.write(
|
||||
+ 'from jupyter_core import command; command.main()'
|
||||
+ )
|
||||
+ jupyter.chmod(0o700)
|
||||
+ witness_a = a.join('jupyter-witness')
|
||||
+ witness_a_src = f'''#!{sys.executable}
|
||||
+import sys
|
||||
+print(sys.argv[0])
|
||||
+'''
|
||||
+ write_executable(witness_a, witness_a_src)
|
||||
+
|
||||
+ env = {}
|
||||
+ if 'SYSTEMROOT' in os.environ: # Windows http://bugs.python.org/issue20614
|
||||
+ env[str('SYSTEMROOT')] = os.environ['SYSTEMROOT']
|
||||
+ if sys.platform == 'win32':
|
||||
+ env[str('PATHEXT')] = '.EXE'
|
||||
+ out = check_output([sys.executable, str(jupyter), 'witness'], env=env)
|
||||
+
|
||||
+ # Make sure the first argv is the full path to the executing script
|
||||
+ assert f'{jupyter}-witness'.encode() in out
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dce8a7499da5a53ae3afd5a9f4b02e5df1d57250cf48f3ad79da23b4778cd6fa
|
||||
size 74787
|
3
jupyter_core-4.9.2.tar.gz
Normal file
3
jupyter_core-4.9.2.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d69baeb9ffb128b8cd2657fcf2703f89c769d1673c851812119e3a2a0e93ad9a
|
||||
size 74912
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 13 06:59:34 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to 4.9.2
|
||||
* set proper sys.argv[0] for subcommand by @bnavigator in #248
|
||||
* Add explicit encoding in open calls by @dlukes in #249
|
||||
* jupyter_config_dir - reorder home_dir initialization by
|
||||
@dharmaquark in #251
|
||||
- Drop argv0_subcommand.patch merged upstream
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 12 21:09:24 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -31,10 +31,10 @@
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%{?!python_module:%define python_module() python3-%{**}}
|
||||
%define skip_python2 1
|
||||
Name: python-jupyter-core%{psuffix}
|
||||
Version: 4.9.1
|
||||
Version: 4.9.2
|
||||
Release: 0
|
||||
Summary: Base package on which Jupyter projects rely
|
||||
License: BSD-3-Clause
|
||||
@ -42,8 +42,6 @@ URL: https://github.com/jupyter/jupyter_core
|
||||
Source0: https://files.pythonhosted.org/packages/source/j/jupyter_core/jupyter_core-%{version}.tar.gz
|
||||
# PATCH-FIX-OPENSUSE -- use_rpms_paths.patch -- change paths so they are easy to replace at build time
|
||||
Patch0: use_rpms_paths.patch
|
||||
# PATCH-FIX-UPSTREAM argv0_subcommand.patch -- gh#jupyter/jupyter_core#248, merged after the release of 4.9.1
|
||||
Patch1: argv0_subcommand.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module traitlets}
|
||||
BuildRequires: fdupes
|
||||
|
Loading…
x
Reference in New Issue
Block a user