summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorThomas Omans <thomas.omans@gmail.com>2014-01-15 00:13:56 +0100
committerThomas Omans <thomas.omans@gmail.com>2014-01-15 00:13:56 +0100
commit4310fc260bc444d4d98642e4da504bb502427e8d (patch)
treeeb386293dd21750cfa2b933ab2336979b437963e /setup.py
parentMerge pull request #5490 from rgbj/devel (diff)
downloadansible-4310fc260bc444d4d98642e4da504bb502427e8d.tar.xz
ansible-4310fc260bc444d4d98642e4da504bb502427e8d.zip
bugfix: support path separators in module path
As described by http://docs.ansible.com/intro_configuration.html#library the library supports multiple paths to load modules from. Currently `setup.py` treats something like `/usr/share/ansible:/my/custom/modules` as a single directory name and results in the installed modules not being on the module path. (instead they are in a directory named `/usr/share/ansible:/my/custom/modules`) This commit simply takes the first listed directory as the install directory for the core modules.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index a1706f12ef..b6fa183b2c 100644
--- a/setup.py
+++ b/setup.py
@@ -10,10 +10,11 @@ from distutils.core import setup
# find library modules
from ansible.constants import DEFAULT_MODULE_PATH
+install_path = DEFAULT_MODULE_PATH.split(os.pathsep)[0]
dirs=os.listdir("./library/")
data_files = []
for i in dirs:
- data_files.append((os.path.join(DEFAULT_MODULE_PATH, i), glob('./library/' + i + '/*')))
+ data_files.append((os.path.join(install_path, i), glob('./library/' + i + '/*')))
setup(name='ansible',
version=__version__,