From 2a788630f3847fd61d855d995dd48ba26326f59d Mon Sep 17 00:00:00 2001 From: Tomas Orsava Date: Fri, 1 Sep 2017 16:28:36 +0200 Subject: [PATCH] Properly conditionalize bashcompdir contents --- python-pip.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-pip.spec b/python-pip.spec index 7662e3d..56edce1 100644 --- a/python-pip.spec +++ b/python-pip.spec @@ -15,6 +15,8 @@ %endif %endif +# Note that with disabled python3, bashcomp2 will be disabled as well because +# bashcompdir will point to a different path than with python3 enabled. %global bashcompdir %(b=$(pkg-config --variable=completionsdir bash-completion 2>/dev/null); echo ${b:-%{_sysconfdir}/bash_completion.d}) %if "%{bashcompdir}" != "%{_sysconfdir}/bash_completion.d" %global bashcomp2 1 @@ -254,6 +256,7 @@ py.test-%{python3_version} -m 'not network' %dir %{bashcompdir} %{bashcompdir}/pip %if 0%{?bashcomp2} +%{bashcompdir}/pip2* %dir %(dirname %{bashcompdir}) %endif %endif # with python2