14
0
forked from pool/python-typer

Accepting request 1056775 from devel:languages:python

- Adapt set-proper-pythonpath-for-tutorial-script-tests.patch to
  also work for Python 3.11.

OBS-URL: https://build.opensuse.org/request/show/1056775
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-typer?expand=0&rev=7
This commit is contained in:
2023-01-07 16:20:00 +00:00
committed by Git OBS Bridge
3 changed files with 9 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jan 5 15:07:01 UTC 2023 - Matthias Bach <marix@marix.org> - 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 <marix@marix.org> - 0.7.0

View File

@@ -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 <marix@marix.org>
#
# All modifications and additions to the file contributed by third parties

View File

@@ -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(