forked from pool/python-check-manifest
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
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 1 18:58:24 UTC 2023 - Antonio Larrosa <alarrosa@suse.com>
|
||||
|
||||
- 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 <ecsos@opensuse.org>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
13
use-current-interpreter.patch
Normal file
13
use-current-interpreter.patch
Normal file
@@ -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()
|
||||
Reference in New Issue
Block a user