Install autocompletion for python-fuelclient

Autocompletion is generated with errors until cliff error is fixed, we
need to make small adjustment to autocompletion file for it to work.

Change-Id: I44aa9f8a0615743b7eb77bc81723a7ddd110a600
Closes-Bug: #1474645
Related-Bug: #1374579
Related-Bug: #1499690
This commit is contained in:
Maciej Kwiek 2015-09-23 14:46:19 +02:00
parent f033192b84
commit adb9c7d368
1 changed files with 7 additions and 0 deletions

View File

@ -29,6 +29,7 @@ Requires: python-argparse
Conflicts: python-requests == 2.8.0
Requires: perl
Requires: python-cliff >= 1.14.0
Requires: python-pbr >= 1.6
Requires: python-keystoneclient >= 1.6.0
@ -37,6 +38,8 @@ Requires: python-requests >= 2.5.2
Requires: python-six >= 1.9.0
Requires: bash-completion
%description
Summary: Console utility for working with fuel rest api
@ -50,6 +53,10 @@ cd %{_builddir}/%{name}-%{version} && %{__python2} setup.py build
rm -rf $RPM_BUILD_ROOT
cd %{_builddir}/%{name}-%{version} && %{__python2} setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT
%post
# FIXME(mkwiek): fix fuelclient to generate usable autocomplete bash
fuel2 complete | perl -pe "s/-(?=.*=')/_/g" | perl -pe 's;(?<=cmds_\$\{)proposed;proposed//-/_;g' | sed -e "s/local cur prev words/local -a words/g" > %{_datadir}/bash-completion/completions/fuel2
%clean
rm -rf $RPM_BUILD_ROOT