From 48881fad7bb7a6b0ff7b07dd31461a997aad610aa6f1a8979c7ba94b5d5daa3b Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 29 Oct 2024 17:08:44 +0000 Subject: [PATCH 1/5] - Update to the version 3.5.1: - Restore compatibility with argparse in Python 3.12.7+ - Use project.scripts instead of setuptools scripts - Test infrastructure improvements - Remove upstreamed patches: - argparse-3_12_7.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-argcomplete?expand=0&rev=80 --- argcomplete-3.4.0.tar.gz | 3 - argcomplete-3.5.1.tar.gz | 3 + python-argcomplete.changes | 10 ++ python-argcomplete.spec | 38 ++++-- versioned_register-python-argcomplete.patch | 134 ++++++++++++++++++++ 5 files changed, 176 insertions(+), 12 deletions(-) delete mode 100644 argcomplete-3.4.0.tar.gz create mode 100644 argcomplete-3.5.1.tar.gz create mode 100644 versioned_register-python-argcomplete.patch diff --git a/argcomplete-3.4.0.tar.gz b/argcomplete-3.4.0.tar.gz deleted file mode 100644 index 23bb668..0000000 --- a/argcomplete-3.4.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c2abcdfe1be8ace47ba777d4fce319eb13bf8ad9dace8d085dcad6eded88057f -size 82275 diff --git a/argcomplete-3.5.1.tar.gz b/argcomplete-3.5.1.tar.gz new file mode 100644 index 0000000..208bc17 --- /dev/null +++ b/argcomplete-3.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eb1ee355aa2557bd3d0145de7b06b2a45b0ce461e1e7813f5d066039ab4177b4 +size 82280 diff --git a/python-argcomplete.changes b/python-argcomplete.changes index cc53cf3..06f0644 100644 --- a/python-argcomplete.changes +++ b/python-argcomplete.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Oct 29 17:07:05 UTC 2024 - Matej Cepl + +- Update to the version 3.5.1: + - Restore compatibility with argparse in Python 3.12.7+ + - Use project.scripts instead of setuptools scripts + - Test infrastructure improvements +- Remove upstreamed patches: + - argparse-3_12_7.patch + ------------------------------------------------------------------- Sun Oct 6 21:27:22 UTC 2024 - Matej Cepl diff --git a/python-argcomplete.spec b/python-argcomplete.spec index 68e6bf7..9af4b0a 100644 --- a/python-argcomplete.spec +++ b/python-argcomplete.spec @@ -18,27 +18,36 @@ %{?sle15_python_module_pythons} -Name: python-argcomplete -Version: 3.4.0 +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +Name: python-argcomplete%{psuffix} +Version: 3.5.1 Release: 0 Summary: Bash tab completion for argparse License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/kislyuk/argcomplete Source: https://files.pythonhosted.org/packages/source/a/argcomplete/argcomplete-%{version}.tar.gz -# PATCH-FIX-OPENSUSE argparse-3_12_7.patch gh#kislyuk/argcomplete#507 mcepl@suse.com -# fix the incompatibility with Python 3.12.7+ -Patch0: argparse-3_12_7.patch BuildRequires: %{python_module base >= 3.8} -BuildRequires: %{python_module pexpect} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools >= 67.2} BuildRequires: %{python_module setuptools_scm >= 6.2} BuildRequires: %{python_module wheel} -BuildRequires: ca-certificates-mozilla BuildRequires: fdupes BuildRequires: python-rpm-macros +%if %{with test} +BuildRequires: %{python_module argcomplete == %{version}} +BuildRequires: %{python_module pexpect} +BuildRequires: ca-certificates-mozilla +BuildRequires: fish BuildRequires: zsh +%endif Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch @@ -62,31 +71,40 @@ resources over the network). %autosetup -p1 -n argcomplete-%{version} %build +%if %{without test} %pyproject_wheel +%endif %install +%if %{without test} %pyproject_install +%python_clone -a %{buildroot}%{_bindir}/activate-global-python-argcomplete %python_clone -a %{buildroot}%{_bindir}/register-python-argcomplete %python_clone -a %{buildroot}%{_bindir}/python-argcomplete-check-easy-install-script -rm %{buildroot}%{_bindir}/activate-global-python-argcomplete %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif %check +%if %{with test} export LANG=en_US.UTF-8 export TERM=xterm-mono %{python_expand \ # https://github.com/kislyuk/argcomplete/issues/255 # https://github.com/kislyuk/argcomplete/issues/299 - sed -i -e "1s|#!.*python.*|#!%{__$python}|" test/prog test/*.py scripts/* + sed -i -e "1s|#!.*python.*|#!%{__$python}|" test/prog test/*.py sed -i -e "s|python3 |$python |g" test/test.py PYTHONPATH=%{buildroot}%{$python_sitelib} $python ./test/test.py -v } +%endif +%if %{without test} %post +%python_install_alternative activate-global-python-argcomplete %python_install_alternative register-python-argcomplete %python_install_alternative python-argcomplete-check-easy-install-script %postun +%python_uninstall_alternative activate-global-python-argcomplete %python_uninstall_alternative register-python-argcomplete %python_uninstall_alternative python-argcomplete-check-easy-install-script @@ -95,7 +113,9 @@ export TERM=xterm-mono %license LICENSE.rst %{python_sitelib}/argcomplete-%{version}.dist-info %{python_sitelib}/argcomplete +%python_alternative %{_bindir}/activate-global-python-argcomplete %python_alternative %{_bindir}/python-argcomplete-check-easy-install-script %python_alternative %{_bindir}/register-python-argcomplete +%endif %changelog diff --git a/versioned_register-python-argcomplete.patch b/versioned_register-python-argcomplete.patch new file mode 100644 index 0000000..9fab9c8 --- /dev/null +++ b/versioned_register-python-argcomplete.patch @@ -0,0 +1,134 @@ +--- + test/test.py | 20 +++++++++++--------- + test/test_contrib_shells.py | 13 ++++++------- + 2 files changed, 17 insertions(+), 16 deletions(-) + +--- a/test/test.py ++++ b/test/test.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3.10 + import argparse + import contextlib + import os +@@ -19,6 +19,8 @@ TEST_DIR = os.path.abspath(os.path.dirna + BASE_DIR = os.path.dirname(TEST_DIR) + sys.path.insert(0, BASE_DIR) + ++py_ver = "%s.%s" % sys.version_info[:2] ++ + from argparse import SUPPRESS, ArgumentParser # noqa: E402 + + import argcomplete # noqa: E402 +@@ -1254,7 +1256,7 @@ class TestBashZshBase(TestShellBase): + init_cmd = None + # 'dummy' argument unused; checks multi-command registration works + # by passing 'prog' as the second argument. +- install_cmd = 'eval "$(register-python-argcomplete dummy prog)"' ++ install_cmd = 'eval "$(register-python-argcomplete-{} dummy prog)"'.format(py_ver) + + def setUp(self): + sh = self.repl_provider() +@@ -1271,7 +1273,7 @@ class TestBashZshBase(TestShellBase): + self.assertEqual(output, "") + # Register a dummy completion with an external argcomplete script + # to ensure this doesn't overwrite our previous registration. +- output = sh.run_command('eval "$(register-python-argcomplete dummy --external-argcomplete-script dummy)"') ++ output = sh.run_command('eval "$(register-python-argcomplete dummy-{} --external-argcomplete-script dummy)"'.format(py_ver)) + self.assertEqual(output, "") + self.sh = sh + +@@ -1330,7 +1332,7 @@ class TestZsh(TestBashZshBase, unittest. + + + class TestBashZshGlobalBase(TestBashZshBase): +- install_cmd = 'eval "$(activate-global-python-argcomplete --dest=-)"' ++ install_cmd = 'eval "$(activate-global-python-argcomplete-{} --dest=-)"'.format(py_ver) + + def test_redirection_completion(self): + with TempDir(prefix="test_dir_py", dir="."): +@@ -1343,15 +1345,15 @@ class TestBashZshGlobalBase(TestBashZshB + + def test_python_completion(self): + self.sh.run_command("cd " + TEST_DIR) +- self.assertEqual(self.sh.run_command("python3 ./prog basic f\t"), "foo\r\n") ++ self.assertEqual(self.sh.run_command("python{} ./prog basic f\t".format(py_ver)), "foo\r\n") + + def test_python_filename_completion(self): + self.sh.run_command("cd " + TEST_DIR) +- self.assertEqual(self.sh.run_command("python3 ./pro\tbasic f\t"), "foo\r\n") ++ self.assertEqual(self.sh.run_command("python{} ./pro\tbasic f\t".format(py_ver)), "foo\r\n") + + def test_python_stuck(self): + self.sh.run_command("cd " + TEST_DIR) +- self.sh.run_command("python3 ./stuck no\t-input") ++ self.sh.run_command("python{} ./stuck no\t-input".format(py_ver)) + + def test_python_not_executable(self): + """Test completing a script that cannot be run directly.""" +@@ -1363,7 +1365,7 @@ class TestBashZshGlobalBase(TestBashZshB + # Ensure prog is no longer able to be run as "./prog". + self.assertIn("<<126>>", self.sh.run_command('./prog; echo "<<$?>>"')) + # Ensure completion still functions when run via python. +- self.assertEqual(self.sh.run_command("python3 ./prog basic f\t"), "foo\r\n") ++ self.assertEqual(self.sh.run_command("python{} ./prog basic f\t".format(py_ver)), "foo\r\n") + + def test_python_module(self): + """Test completing a module run with python -m.""" +@@ -1373,7 +1375,7 @@ class TestBashZshGlobalBase(TestBashZshB + open("package/__init__.py", "w").close() + shutil.copy(prog, "package/prog.py") + self.sh.run_command("cd " + os.getcwd()) +- self.assertEqual(self.sh.run_command("python3 -m package.prog basic f\t"), "foo\r\n") ++ self.assertEqual(self.sh.run_command("python{} -m package.prog basic f\t".format(py_ver)), "foo\r\n") + + def _test_console_script(self, package=False, wheel=False): + with TempDir(prefix="test_dir_py", dir="."): +--- a/test/test_contrib_shells.py ++++ b/test/test_contrib_shells.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3.10 + import os + import os.path + import unittest +@@ -6,8 +6,7 @@ import unittest + import pexpect + import pexpect.replwrap + +-from .test import BASE_DIR, TEST_DIR, Shell, TestShellBase +- ++from .test import BASE_DIR, TEST_DIR, Shell, TestShellBase, py_ver + + @unittest.skip("tcsh is not supported. Enable this test manually if needed.") + class TestTcsh(TestShellBase, unittest.TestCase): +@@ -28,12 +27,12 @@ class TestTcsh(TestShellBase, unittest.T + sh.run_command("setenv PYTHONPATH {0}".format(BASE_DIR)) + # 'dummy' argument unused; checks multi-command registration works + # by passing 'prog' as the second argument. +- output = sh.run_command("eval `register-python-argcomplete --shell tcsh dummy prog`") ++ output = sh.run_command("eval `register-python-argcomplete-{} --shell tcsh dummy prog`".format(py_ver)) + self.assertEqual(output, "") + # Register a dummy completion with an external argcomplete script + # to ensure this doesn't overwrite our previous registration. + output = sh.run_command( +- "eval `register-python-argcomplete --shell tcsh dummy --external-argcomplete-script dummy`" ++ "eval `register-python-argcomplete-{} --shell tcsh dummy --external-argcomplete-script dummy`.format(py_ver)" + ) + self.assertEqual(output, "") + self.sh = sh +@@ -62,12 +61,12 @@ class TestFish(TestShellBase, unittest.T + sh.run_command("set -x PYTHONPATH {0}".format(BASE_DIR)) + # 'dummy' argument unused; checks multi-command registration works + # by passing 'prog' as the second argument. +- output = sh.run_command("register-python-argcomplete --shell fish dummy prog | source") ++ output = sh.run_command("register-python-argcomplete-{} --shell fish dummy prog | source".format(py_ver)) + self.assertEqual(output, "") + # Register a dummy completion with an external argcomplete script + # to ensure this doesn't overwrite our previous registration. + output = sh.run_command( +- "register-python-argcomplete --shell fish dummy --external-argcomplete-script dummy | source" ++ "register-python-argcomplete-{} --shell fish dummy --external-argcomplete-script dummy | source".format(py_ver) + ) + self.assertEqual(output, "") + self.sh = sh From 63f52d2c11098718e0357414beb9313b52eb2845a43f5d6277c58ae27cb3bd6d Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 29 Oct 2024 17:09:02 +0000 Subject: [PATCH 2/5] Actually remove the patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-argcomplete?expand=0&rev=81 --- argparse-3_12_7.patch | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 argparse-3_12_7.patch diff --git a/argparse-3_12_7.patch b/argparse-3_12_7.patch deleted file mode 100644 index c5b0775..0000000 --- a/argparse-3_12_7.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 480d112ba488fa6825db877201577270053dacce Mon Sep 17 00:00:00 2001 -From: Eggry Ran -Date: Sun, 6 Oct 2024 16:16:49 +0800 -Subject: [PATCH] Fix issue #507 - ---- - argcomplete/packages/_argparse.py | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/argcomplete/packages/_argparse.py b/argcomplete/packages/_argparse.py -index 2a064f9..d10cf01 100644 ---- a/argcomplete/packages/_argparse.py -+++ b/argcomplete/packages/_argparse.py -@@ -162,6 +162,8 @@ def take_action(action, argument_strings, option_string=None): - def consume_optional(start_index): - # get the optional identified at this index - option_tuple = option_string_indices[start_index] -+ if isinstance(option_tuple, list): # Python 3.12.7+ -+ option_tuple = option_tuple[0] - if len(option_tuple) == 3: - action, option_string, explicit_arg = option_tuple - else: # Python 3.11.9+, 3.12.3+, 3.13+ From 762a870d8fa901779516860bdcf6c4a850ad4512278e6f321c36e99ee2fcbe08 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 29 Oct 2024 17:09:20 +0000 Subject: [PATCH 3/5] Actually remove the patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-argcomplete?expand=0&rev=82 --- versioned_register-python-argcomplete.patch | 134 -------------------- 1 file changed, 134 deletions(-) delete mode 100644 versioned_register-python-argcomplete.patch diff --git a/versioned_register-python-argcomplete.patch b/versioned_register-python-argcomplete.patch deleted file mode 100644 index 9fab9c8..0000000 --- a/versioned_register-python-argcomplete.patch +++ /dev/null @@ -1,134 +0,0 @@ ---- - test/test.py | 20 +++++++++++--------- - test/test_contrib_shells.py | 13 ++++++------- - 2 files changed, 17 insertions(+), 16 deletions(-) - ---- a/test/test.py -+++ b/test/test.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3.10 - import argparse - import contextlib - import os -@@ -19,6 +19,8 @@ TEST_DIR = os.path.abspath(os.path.dirna - BASE_DIR = os.path.dirname(TEST_DIR) - sys.path.insert(0, BASE_DIR) - -+py_ver = "%s.%s" % sys.version_info[:2] -+ - from argparse import SUPPRESS, ArgumentParser # noqa: E402 - - import argcomplete # noqa: E402 -@@ -1254,7 +1256,7 @@ class TestBashZshBase(TestShellBase): - init_cmd = None - # 'dummy' argument unused; checks multi-command registration works - # by passing 'prog' as the second argument. -- install_cmd = 'eval "$(register-python-argcomplete dummy prog)"' -+ install_cmd = 'eval "$(register-python-argcomplete-{} dummy prog)"'.format(py_ver) - - def setUp(self): - sh = self.repl_provider() -@@ -1271,7 +1273,7 @@ class TestBashZshBase(TestShellBase): - self.assertEqual(output, "") - # Register a dummy completion with an external argcomplete script - # to ensure this doesn't overwrite our previous registration. -- output = sh.run_command('eval "$(register-python-argcomplete dummy --external-argcomplete-script dummy)"') -+ output = sh.run_command('eval "$(register-python-argcomplete dummy-{} --external-argcomplete-script dummy)"'.format(py_ver)) - self.assertEqual(output, "") - self.sh = sh - -@@ -1330,7 +1332,7 @@ class TestZsh(TestBashZshBase, unittest. - - - class TestBashZshGlobalBase(TestBashZshBase): -- install_cmd = 'eval "$(activate-global-python-argcomplete --dest=-)"' -+ install_cmd = 'eval "$(activate-global-python-argcomplete-{} --dest=-)"'.format(py_ver) - - def test_redirection_completion(self): - with TempDir(prefix="test_dir_py", dir="."): -@@ -1343,15 +1345,15 @@ class TestBashZshGlobalBase(TestBashZshB - - def test_python_completion(self): - self.sh.run_command("cd " + TEST_DIR) -- self.assertEqual(self.sh.run_command("python3 ./prog basic f\t"), "foo\r\n") -+ self.assertEqual(self.sh.run_command("python{} ./prog basic f\t".format(py_ver)), "foo\r\n") - - def test_python_filename_completion(self): - self.sh.run_command("cd " + TEST_DIR) -- self.assertEqual(self.sh.run_command("python3 ./pro\tbasic f\t"), "foo\r\n") -+ self.assertEqual(self.sh.run_command("python{} ./pro\tbasic f\t".format(py_ver)), "foo\r\n") - - def test_python_stuck(self): - self.sh.run_command("cd " + TEST_DIR) -- self.sh.run_command("python3 ./stuck no\t-input") -+ self.sh.run_command("python{} ./stuck no\t-input".format(py_ver)) - - def test_python_not_executable(self): - """Test completing a script that cannot be run directly.""" -@@ -1363,7 +1365,7 @@ class TestBashZshGlobalBase(TestBashZshB - # Ensure prog is no longer able to be run as "./prog". - self.assertIn("<<126>>", self.sh.run_command('./prog; echo "<<$?>>"')) - # Ensure completion still functions when run via python. -- self.assertEqual(self.sh.run_command("python3 ./prog basic f\t"), "foo\r\n") -+ self.assertEqual(self.sh.run_command("python{} ./prog basic f\t".format(py_ver)), "foo\r\n") - - def test_python_module(self): - """Test completing a module run with python -m.""" -@@ -1373,7 +1375,7 @@ class TestBashZshGlobalBase(TestBashZshB - open("package/__init__.py", "w").close() - shutil.copy(prog, "package/prog.py") - self.sh.run_command("cd " + os.getcwd()) -- self.assertEqual(self.sh.run_command("python3 -m package.prog basic f\t"), "foo\r\n") -+ self.assertEqual(self.sh.run_command("python{} -m package.prog basic f\t".format(py_ver)), "foo\r\n") - - def _test_console_script(self, package=False, wheel=False): - with TempDir(prefix="test_dir_py", dir="."): ---- a/test/test_contrib_shells.py -+++ b/test/test_contrib_shells.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3.10 - import os - import os.path - import unittest -@@ -6,8 +6,7 @@ import unittest - import pexpect - import pexpect.replwrap - --from .test import BASE_DIR, TEST_DIR, Shell, TestShellBase -- -+from .test import BASE_DIR, TEST_DIR, Shell, TestShellBase, py_ver - - @unittest.skip("tcsh is not supported. Enable this test manually if needed.") - class TestTcsh(TestShellBase, unittest.TestCase): -@@ -28,12 +27,12 @@ class TestTcsh(TestShellBase, unittest.T - sh.run_command("setenv PYTHONPATH {0}".format(BASE_DIR)) - # 'dummy' argument unused; checks multi-command registration works - # by passing 'prog' as the second argument. -- output = sh.run_command("eval `register-python-argcomplete --shell tcsh dummy prog`") -+ output = sh.run_command("eval `register-python-argcomplete-{} --shell tcsh dummy prog`".format(py_ver)) - self.assertEqual(output, "") - # Register a dummy completion with an external argcomplete script - # to ensure this doesn't overwrite our previous registration. - output = sh.run_command( -- "eval `register-python-argcomplete --shell tcsh dummy --external-argcomplete-script dummy`" -+ "eval `register-python-argcomplete-{} --shell tcsh dummy --external-argcomplete-script dummy`.format(py_ver)" - ) - self.assertEqual(output, "") - self.sh = sh -@@ -62,12 +61,12 @@ class TestFish(TestShellBase, unittest.T - sh.run_command("set -x PYTHONPATH {0}".format(BASE_DIR)) - # 'dummy' argument unused; checks multi-command registration works - # by passing 'prog' as the second argument. -- output = sh.run_command("register-python-argcomplete --shell fish dummy prog | source") -+ output = sh.run_command("register-python-argcomplete-{} --shell fish dummy prog | source".format(py_ver)) - self.assertEqual(output, "") - # Register a dummy completion with an external argcomplete script - # to ensure this doesn't overwrite our previous registration. - output = sh.run_command( -- "register-python-argcomplete --shell fish dummy --external-argcomplete-script dummy | source" -+ "register-python-argcomplete-{} --shell fish dummy --external-argcomplete-script dummy | source".format(py_ver) - ) - self.assertEqual(output, "") - self.sh = sh From 6ae5bc185b314f8ee2815152c150a70df2b5b56e6070368411526eb108182d0a Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 29 Oct 2024 17:09:52 +0000 Subject: [PATCH 4/5] Add _multibuild file OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-argcomplete?expand=0&rev=83 --- _multibuild | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + From 3da44214917de6ca0f1ed5ce450101c3fb8ddccb33d2434cb8a2a70e424a059c Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 29 Oct 2024 17:11:01 +0000 Subject: [PATCH 5/5] Add _multibuild file OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-argcomplete?expand=0&rev=84 --- python-argcomplete.changes | 1 + python-argcomplete.spec | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/python-argcomplete.changes b/python-argcomplete.changes index 06f0644..4b902a2 100644 --- a/python-argcomplete.changes +++ b/python-argcomplete.changes @@ -7,6 +7,7 @@ Tue Oct 29 17:07:05 UTC 2024 - Matej Cepl - Test infrastructure improvements - Remove upstreamed patches: - argparse-3_12_7.patch +- Add _multibuild (to make testing against fully installed package) ------------------------------------------------------------------- Sun Oct 6 21:27:22 UTC 2024 - Matej Cepl diff --git a/python-argcomplete.spec b/python-argcomplete.spec index 9af4b0a..49153e5 100644 --- a/python-argcomplete.spec +++ b/python-argcomplete.spec @@ -93,7 +93,7 @@ export TERM=xterm-mono # https://github.com/kislyuk/argcomplete/issues/299 sed -i -e "1s|#!.*python.*|#!%{__$python}|" test/prog test/*.py sed -i -e "s|python3 |$python |g" test/test.py - PYTHONPATH=%{buildroot}%{$python_sitelib} $python ./test/test.py -v + $python ./test/test.py -v } %endif