Install data files in proper path

Bash completion script is installed in /usr/local/etc, so
install_rally.sh should make a symlink in /etc/bash_completion.d/

Also move `data_files` section from setup.py to setup.cfg

Closes-Bug: 1463038
Change-Id: Ifd5f69e41aa8121129d6314130385f48e1690843
This commit is contained in:
Sergey Skripnick 2015-05-14 00:20:14 +03:00
parent 7280c06c23
commit cbe242bdfc
3 changed files with 6 additions and 11 deletions

View File

@ -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

View File

@ -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)

View File

@ -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