From bc8d3b4bd10d4124db7c45b4ee4d67a7aa4aeb20ae2309a7287abf9502f53bb4 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 2 Dec 2023 08:41:24 +0000 Subject: [PATCH] Accepting request 1130350 from home:alarrosa:branches:devel:languages:python - Add patch to use the current interpreter by default in the TestCheckManifest::test_python_from_path test in SLE. Otherwise the test runs the python3.6 interpreter which doesn't work: * use-current-interpreter.patch OBS-URL: https://build.opensuse.org/request/show/1130350 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-check-manifest?expand=0&rev=37 --- python-check-manifest.changes | 8 ++++++++ python-check-manifest.spec | 5 ++++- use-current-interpreter.patch | 13 +++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 use-current-interpreter.patch diff --git a/python-check-manifest.changes b/python-check-manifest.changes index 9e8746d..76fcf74 100644 --- a/python-check-manifest.changes +++ b/python-check-manifest.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Dec 1 18:58:24 UTC 2023 - Antonio Larrosa + +- Add patch to use the current interpreter by default in the + TestCheckManifest::test_python_from_path test in SLE. Otherwise + the test runs the python3.6 interpreter which doesn't work: + * use-current-interpreter.patch + ------------------------------------------------------------------- Sun Jun 11 08:30:38 UTC 2023 - ecsos diff --git a/python-check-manifest.spec b/python-check-manifest.spec index f2d4763..6a9722d 100644 --- a/python-check-manifest.spec +++ b/python-check-manifest.spec @@ -33,6 +33,7 @@ License: MIT Group: Development/Languages/Python URL: https://github.com/mgedmin/check-manifest Source: https://files.pythonhosted.org/packages/source/c/check-manifest/check-manifest-%{version}.tar.gz +Patch0: use-current-interpreter.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} @@ -70,7 +71,9 @@ and missing files in MANIFEST. %prep %setup -q -n check-manifest-%{version} -%autopatch -p1 +%if 0%{?suse_version} == 1500 +%patch0 -p1 +%endif sed -i '1{\,^#!%{_bindir}/env python,d}' check_manifest.py chmod -x check_manifest.py diff --git a/use-current-interpreter.patch b/use-current-interpreter.patch new file mode 100644 index 0000000..c5c7b02 --- /dev/null +++ b/use-current-interpreter.patch @@ -0,0 +1,13 @@ +Index: check-manifest-0.49/tests.py +=================================================================== +--- check-manifest-0.49.orig/tests.py ++++ check-manifest-0.49/tests.py +@@ -1666,7 +1666,7 @@ class TestCheckManifest(unittest.TestCas + # We need a Python interpeter to be in PATH. + python = 'python' + if hasattr(shutil, 'which'): +- for python in 'python', 'python3', os.path.basename(sys.executable): ++ for python in os.path.basename(sys.executable), 'python', 'python3': + if shutil.which(python): + break + subdir = self._create_repo_with_code_in_subdir()