mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
changes for package loading of modules
This commit is contained in:
16
setup.py
16
setup.py
@@ -13,20 +13,6 @@ except ImportError:
|
||||
"Install it using your package manager (usually python-setuptools) or via pip (pip install setuptools)."
|
||||
sys.exit(1)
|
||||
|
||||
# find library modules
|
||||
from ansible.constants import DEFAULT_MODULE_PATH
|
||||
module_paths = DEFAULT_MODULE_PATH.split(os.pathsep)
|
||||
# always install in /usr/share/ansible if specified
|
||||
# otherwise use the first module path listed
|
||||
if '/usr/share/ansible' in module_paths:
|
||||
install_path = '/usr/share/ansible'
|
||||
else:
|
||||
install_path = module_paths[0]
|
||||
dirs=os.listdir("./library/")
|
||||
data_files = []
|
||||
for i in dirs:
|
||||
data_files.append((os.path.join(install_path, i), glob('./library/' + i + '/*')))
|
||||
|
||||
setup(name='ansible',
|
||||
version=__version__,
|
||||
description='Radically simple IT automation',
|
||||
@@ -64,5 +50,5 @@ setup(name='ansible',
|
||||
'bin/ansible-galaxy',
|
||||
'bin/ansible-vault',
|
||||
],
|
||||
data_files=data_files
|
||||
data_files=[],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user