diff --git a/setup.cfg b/setup.cfg index 289bc105..43614ae1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -23,6 +23,10 @@ classifier = packages = rally +data_files = + etc/bash_completion.d = + etc/rally.bash_completion + [entry_points] console_scripts = rally = rally.cli.main:main diff --git a/setup.py b/setup.py index e1e3cef6..f92d7277 100644 --- a/setup.py +++ b/setup.py @@ -25,17 +25,6 @@ try: except ImportError: pass -import os -if os.getuid() == 0: - data_files = [ - ('/etc/bash_completion.d', ['etc/rally.bash_completion']), - ] -else: - data_files = [ - ('etc/bash_completion.d', ['etc/rally.bash_completion']), - ] - setuptools.setup( setup_requires=['pbr'], - data_files=data_files, pbr=True) diff --git a/tests/ci/test_install.sh b/tests/ci/test_install.sh index 1de853b0..434ed8f5 100755 --- a/tests/ci/test_install.sh +++ b/tests/ci/test_install.sh @@ -19,12 +19,14 @@ env sudo ./install_rally.sh --system --yes rally deployment list +[ -d /etc/bash_completion.d ] && cat /etc/bash_completion.d/rally.bash_completion || true sudo ./install_rally.sh --system --yes rally deployment list sudo ./install_rally.sh --yes -d /tmp/rallytest_root/ /tmp/rallytest_root/bin/rally deployment list +cat /tmp/rallytest_root/etc/bash_completion.d/rally.bash_completion sudo rm -fr ~/.rally