From 7eef14952c3c69b2cdf5ae209fb90f2f95560c41 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sat, 8 Feb 2020 19:11:21 +0000 Subject: [PATCH 1/2] Also include req_win.txt --- setup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 788664e14e1e..81a17a42d83d 100755 --- a/setup.py +++ b/setup.py @@ -101,6 +101,7 @@ 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_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 SSH Packaging Detection @@ -1026,7 +1027,8 @@ def _property_install_requires(self): install_requires += _parse_requirements_file(SALT_ZEROMQ_REQS) if IS_WINDOWS_PLATFORM: - install_requires = _parse_requirements_file(SALT_WINDOWS_REQS) + install_requires = _parse_requirements_file(SALT_WINDOWS_REQ_WIN) + install_requires += _parse_requirements_file(SALT_WINDOWS_REQS) return install_requires @property From 1e7bc8fc8f9de8266ccb07fc9049c43e3b265e8e Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 10 Mar 2020 16:25:31 +0000 Subject: [PATCH 2/2] Also take into account macOS requirements --- setup.py | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/setup.py b/setup.py index 81a17a42d83d..895b7bd97d25 100755 --- a/setup.py +++ b/setup.py @@ -74,8 +74,9 @@ ) # Store a reference to the executing platform +IS_OSX_PLATFORM = sys.platform.startswith('darwin') IS_WINDOWS_PLATFORM = sys.platform.startswith('win') -if IS_WINDOWS_PLATFORM: +if IS_WINDOWS_PLATFORM or IS_OSX_PLATFORM: IS_SMARTOS_PLATFORM = False else: # os.uname() not available on Windows. @@ -100,9 +101,15 @@ 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_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_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 PACKAGED_FOR_SALT_SSH_FILE = os.path.join(os.path.abspath(SETUP_DIRNAME), '.salt-ssh-package') @@ -1020,15 +1027,24 @@ def _property_data_files(self): @property 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) if self.salt_transport == 'zeromq': install_requires += _parse_requirements_file(SALT_CRYPTO_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 @property