diff --git a/python-argcomplete.changes b/python-argcomplete.changes index c47b31e..43a7dc2 100644 --- a/python-argcomplete.changes +++ b/python-argcomplete.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Apr 30 06:05:59 UTC 2020 - Tomáš Chvátal + +- Fix test execution without /usr/bin/python + ------------------------------------------------------------------- Thu Mar 26 09:44:38 UTC 2020 - Antonio Larrosa diff --git a/python-argcomplete.spec b/python-argcomplete.spec index d063374..92afd16 100644 --- a/python-argcomplete.spec +++ b/python-argcomplete.spec @@ -29,13 +29,14 @@ Source: https://files.pythonhosted.org/packages/source/a/argcomplete/arg Patch0: skip_tcsh_tests.patch Patch1: trim-test-deps.patch Patch2: 0001-Remove-expected-test-failure-for-new-versions-of-fish.patch -BuildRequires: %{python_module importlib-metadata} +BuildRequires: %{python_module importlib-metadata >= 0.23} BuildRequires: %{python_module pexpect} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: fish BuildRequires: python-rpm-macros +Requires: python-importlib-metadata >= 0.23 BuildArch: noarch %python_subpackages @@ -55,9 +56,11 @@ resources over the network). %prep %setup -q -n argcomplete-%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 +%autopatch -p1 +# https://github.com/kislyuk/argcomplete/issues/255 +# https://github.com/kislyuk/argcomplete/issues/256 +sed -i -e "1s|#!.*python.*|#!%{__python3}|" test/prog scripts/* +sed -i -e "s|python |python3 |g" test/test.py %build %python_build