use DEFAULT_MODULE_PATH in setup.py so that there is a chance to override with ANSIBLE_LIBRARY env variable

pull/4133/head
Skylar Saveland 11 years ago
parent 8dc31f3093
commit 50bd14faa9

@ -86,8 +86,6 @@ if getattr(sys, "real_prefix", None):
DIST_MODULE_PATH = os.path.join(sys.prefix, 'share/ansible/') DIST_MODULE_PATH = os.path.join(sys.prefix, 'share/ansible/')
else: else:
DIST_MODULE_PATH = '/usr/share/ansible/' DIST_MODULE_PATH = '/usr/share/ansible/'
# custom ansible location without a virtualenv
DIST_MODULE_PATH = os.environ.get("ANSIBLE_DIST_MODULE_PATH", DIST_MODULE_PATH)
# sections in config file # sections in config file
DEFAULTS='defaults' DEFAULTS='defaults'

@ -9,11 +9,11 @@ from ansible import __version__, __author__
from distutils.core import setup from distutils.core import setup
# find library modules # find library modules
from ansible.constants import DIST_MODULE_PATH from ansible.constants import DEFAULT_MODULE_PATH
dirs=os.listdir("./library/") dirs=os.listdir("./library/")
data_files = [] data_files = []
for i in dirs: for i in dirs:
data_files.append((DIST_MODULE_PATH + i, glob('./library/' + i + '/*'))) data_files.append((DEFAULT_MODULE_PATH + i, glob('./library/' + i + '/*')))
setup(name='ansible', setup(name='ansible',
version=__version__, version=__version__,

Loading…
Cancel
Save