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:
parent
7280c06c23
commit
cbe242bdfc
@ -23,6 +23,10 @@ classifier =
|
|||||||
packages =
|
packages =
|
||||||
rally
|
rally
|
||||||
|
|
||||||
|
data_files =
|
||||||
|
etc/bash_completion.d =
|
||||||
|
etc/rally.bash_completion
|
||||||
|
|
||||||
[entry_points]
|
[entry_points]
|
||||||
console_scripts =
|
console_scripts =
|
||||||
rally = rally.cli.main:main
|
rally = rally.cli.main:main
|
||||||
|
11
setup.py
11
setup.py
@ -25,17 +25,6 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
pass
|
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(
|
setuptools.setup(
|
||||||
setup_requires=['pbr'],
|
setup_requires=['pbr'],
|
||||||
data_files=data_files,
|
|
||||||
pbr=True)
|
pbr=True)
|
||||||
|
@ -19,12 +19,14 @@ env
|
|||||||
|
|
||||||
sudo ./install_rally.sh --system --yes
|
sudo ./install_rally.sh --system --yes
|
||||||
rally deployment list
|
rally deployment list
|
||||||
|
[ -d /etc/bash_completion.d ] && cat /etc/bash_completion.d/rally.bash_completion || true
|
||||||
|
|
||||||
sudo ./install_rally.sh --system --yes
|
sudo ./install_rally.sh --system --yes
|
||||||
rally deployment list
|
rally deployment list
|
||||||
|
|
||||||
sudo ./install_rally.sh --yes -d /tmp/rallytest_root/
|
sudo ./install_rally.sh --yes -d /tmp/rallytest_root/
|
||||||
/tmp/rallytest_root/bin/rally deployment list
|
/tmp/rallytest_root/bin/rally deployment list
|
||||||
|
cat /tmp/rallytest_root/etc/bash_completion.d/rally.bash_completion
|
||||||
|
|
||||||
sudo rm -fr ~/.rally
|
sudo rm -fr ~/.rally
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user