mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Also take into account macOS requirements
This commit is contained in:
parent
7eef14952c
commit
1e7bc8fc8f
1 changed files with 23 additions and 7 deletions
30
setup.py
30
setup.py
|
@ -74,8 +74,9 @@ BOOTSTRAP_SCRIPT_DISTRIBUTED_VERSION = os.environ.get(
|
||||||
)
|
)
|
||||||
|
|
||||||
# Store a reference to the executing platform
|
# Store a reference to the executing platform
|
||||||
|
IS_OSX_PLATFORM = sys.platform.startswith('darwin')
|
||||||
IS_WINDOWS_PLATFORM = sys.platform.startswith('win')
|
IS_WINDOWS_PLATFORM = sys.platform.startswith('win')
|
||||||
if IS_WINDOWS_PLATFORM:
|
if IS_WINDOWS_PLATFORM or IS_OSX_PLATFORM:
|
||||||
IS_SMARTOS_PLATFORM = False
|
IS_SMARTOS_PLATFORM = False
|
||||||
else:
|
else:
|
||||||
# os.uname() not available on Windows.
|
# os.uname() not available on Windows.
|
||||||
|
@ -100,9 +101,15 @@ SALT_SYSPATHS_HARDCODED = os.path.join(os.path.abspath(SETUP_DIRNAME), 'salt', '
|
||||||
SALT_REQS = os.path.join(os.path.abspath(SETUP_DIRNAME), 'requirements', 'base.txt')
|
SALT_REQS = os.path.join(os.path.abspath(SETUP_DIRNAME), 'requirements', 'base.txt')
|
||||||
SALT_CRYPTO_REQS = os.path.join(os.path.abspath(SETUP_DIRNAME), 'requirements', 'crypto.txt')
|
SALT_CRYPTO_REQS = os.path.join(os.path.abspath(SETUP_DIRNAME), 'requirements', 'crypto.txt')
|
||||||
SALT_ZEROMQ_REQS = os.path.join(os.path.abspath(SETUP_DIRNAME), 'requirements', 'zeromq.txt')
|
SALT_ZEROMQ_REQS = os.path.join(os.path.abspath(SETUP_DIRNAME), 'requirements', 'zeromq.txt')
|
||||||
SALT_WINDOWS_REQS = os.path.join(os.path.abspath(SETUP_DIRNAME), 'pkg', 'windows', 'req.txt')
|
|
||||||
SALT_WINDOWS_REQ_WIN = os.path.join(os.path.abspath(SETUP_DIRNAME), 'pkg', 'windows', 'req_win.txt')
|
|
||||||
SALT_LONG_DESCRIPTION_FILE = os.path.join(os.path.abspath(SETUP_DIRNAME), 'README.rst')
|
SALT_LONG_DESCRIPTION_FILE = os.path.join(os.path.abspath(SETUP_DIRNAME), 'README.rst')
|
||||||
|
SALT_OSX_REQS = [
|
||||||
|
os.path.join(os.path.abspath(SETUP_DIRNAME), 'pkg', 'osx', 'req.txt'),
|
||||||
|
os.path.join(os.path.abspath(SETUP_DIRNAME), 'pkg', 'osx', 'req_ext.txt')
|
||||||
|
]
|
||||||
|
SALT_WINDOWS_REQS = [
|
||||||
|
os.path.join(os.path.abspath(SETUP_DIRNAME), 'pkg', 'windows', 'req.txt'),
|
||||||
|
os.path.join(os.path.abspath(SETUP_DIRNAME), 'pkg', 'windows', 'req_win.txt')
|
||||||
|
]
|
||||||
|
|
||||||
# Salt SSH Packaging Detection
|
# Salt SSH Packaging Detection
|
||||||
PACKAGED_FOR_SALT_SSH_FILE = os.path.join(os.path.abspath(SETUP_DIRNAME), '.salt-ssh-package')
|
PACKAGED_FOR_SALT_SSH_FILE = os.path.join(os.path.abspath(SETUP_DIRNAME), '.salt-ssh-package')
|
||||||
|
@ -1020,15 +1027,24 @@ class SaltDistribution(distutils.dist.Distribution):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _property_install_requires(self):
|
def _property_install_requires(self):
|
||||||
|
|
||||||
|
if IS_OSX_PLATFORM:
|
||||||
|
install_requires = []
|
||||||
|
for reqfile in SALT_OSX_REQS:
|
||||||
|
install_requires += _parse_requirements_file(reqfile)
|
||||||
|
return install_requires
|
||||||
|
|
||||||
|
if IS_WINDOWS_PLATFORM:
|
||||||
|
install_requires = []
|
||||||
|
for reqfile in SALT_WINDOWS_REQS:
|
||||||
|
install_requires += _parse_requirements_file(reqfile)
|
||||||
|
return install_requires
|
||||||
|
|
||||||
install_requires = _parse_requirements_file(SALT_REQS)
|
install_requires = _parse_requirements_file(SALT_REQS)
|
||||||
|
|
||||||
if self.salt_transport == 'zeromq':
|
if self.salt_transport == 'zeromq':
|
||||||
install_requires += _parse_requirements_file(SALT_CRYPTO_REQS)
|
install_requires += _parse_requirements_file(SALT_CRYPTO_REQS)
|
||||||
install_requires += _parse_requirements_file(SALT_ZEROMQ_REQS)
|
install_requires += _parse_requirements_file(SALT_ZEROMQ_REQS)
|
||||||
|
|
||||||
if IS_WINDOWS_PLATFORM:
|
|
||||||
install_requires = _parse_requirements_file(SALT_WINDOWS_REQ_WIN)
|
|
||||||
install_requires += _parse_requirements_file(SALT_WINDOWS_REQS)
|
|
||||||
return install_requires
|
return install_requires
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Add table
Reference in a new issue