From 1446f53fd96e6fa278f8787e0b3e8b24414ea2c70bb7cb39dbd62deb6e98291c Mon Sep 17 00:00:00 2001 From: Matthias Bach Date: Thu, 5 Jan 2023 15:16:32 +0000 Subject: [PATCH] - Adapt set-proper-pythonpath-for-tutorial-script-tests.patch to also work for Python 3.11. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-typer?expand=0&rev=13 --- python-typer.changes | 6 ++++++ python-typer.spec | 2 +- set-proper-pythonpath-for-tutorial-script-tests.patch | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/python-typer.changes b/python-typer.changes index a28cca5..fb6a2c1 100644 --- a/python-typer.changes +++ b/python-typer.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jan 5 15:07:01 UTC 2023 - Matthias Bach - 0.7.0 + +- Adapt set-proper-pythonpath-for-tutorial-script-tests.patch to + also work for Python 3.11. + ------------------------------------------------------------------- Sun Nov 6 19:35:15 UTC 2022 - Matthias Bach - 0.7.0 diff --git a/python-typer.spec b/python-typer.spec index a7c0285..d4c769d 100644 --- a/python-typer.spec +++ b/python-typer.spec @@ -1,7 +1,7 @@ # # spec file for package python-typer # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2021 Matthias Bach # # All modifications and additions to the file contributed by third parties diff --git a/set-proper-pythonpath-for-tutorial-script-tests.patch b/set-proper-pythonpath-for-tutorial-script-tests.patch index 3605a88..3885102 100644 --- a/set-proper-pythonpath-for-tutorial-script-tests.patch +++ b/set-proper-pythonpath-for-tutorial-script-tests.patch @@ -79,7 +79,7 @@ index c4fca5b..1280e22 100644 from docs_src.subcommands.tutorial001 import items, users + env = os.environ.copy() -+ env["PYTHONPATH"] = ":".join(list(tutorial001.__path__)) ++ env["PYTHONPATH"] = ":".join(list(tutorial001.__path__) + [env["PYTHONPATH"]] if "PYTHONPATH" in env else []) + for module in [mod, items, users]: result = subprocess.run( @@ -104,7 +104,7 @@ index 4db168b..eaf4539 100644 from docs_src.subcommands.tutorial003 import items, lands, reigns, towns, users + env = os.environ.copy() -+ env["PYTHONPATH"] = ":".join(list(tutorial003.__path__)) ++ env["PYTHONPATH"] = ":".join(list(tutorial003.__path__) + [env["PYTHONPATH"]] if "PYTHONPATH" in env else []) + for module in [mod, items, lands, reigns, towns, users]: result = subprocess.run(