mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #4133 from skyl/DIST_MODULE_PATH
DEFAULT_MODULE_PATH in setup.py
This commit is contained in:
commit
20708e31b1
2 changed files with 3 additions and 2 deletions
|
@ -82,6 +82,7 @@ active_user = pwd.getpwuid(os.geteuid())[0]
|
|||
# Needed so the RPM can call setup.py and have modules land in the
|
||||
# correct location. See #1277 for discussion
|
||||
if getattr(sys, "real_prefix", None):
|
||||
# in a virtualenv
|
||||
DIST_MODULE_PATH = os.path.join(sys.prefix, 'share/ansible/')
|
||||
else:
|
||||
DIST_MODULE_PATH = '/usr/share/ansible/'
|
||||
|
|
4
setup.py
4
setup.py
|
@ -9,11 +9,11 @@ from ansible import __version__, __author__
|
|||
from distutils.core import setup
|
||||
|
||||
# find library modules
|
||||
from ansible.constants import DIST_MODULE_PATH
|
||||
from ansible.constants import DEFAULT_MODULE_PATH
|
||||
dirs=os.listdir("./library/")
|
||||
data_files = []
|
||||
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',
|
||||
version=__version__,
|
||||
|
|
Loading…
Reference in a new issue