mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Don't install futures under Python 3 and above
This commit is contained in:
parent
8d85cb9ea8
commit
cc3219fcde
1 changed files with 7 additions and 0 deletions
7
setup.py
7
setup.py
|
@ -62,6 +62,9 @@ BOOTSTRAP_SCRIPT_DISTRIBUTED_VERSION = os.environ.get(
|
|||
# Store a reference to the executing platform
|
||||
IS_WINDOWS_PLATFORM = sys.platform.startswith('win')
|
||||
|
||||
# Store a reference wether if we're running under Python 3 and above
|
||||
IS_PY3 = sys.version_info > (3,)
|
||||
|
||||
# Use setuptools only if the user opts-in by setting the USE_SETUPTOOLS env var
|
||||
# Or if setuptools was previously imported (which is the case when using
|
||||
# 'distribute')
|
||||
|
@ -137,6 +140,10 @@ def _parse_requirements_file(requirements_file):
|
|||
# In Windows, we're installing M2CryptoWin{32,64} which comes
|
||||
# compiled
|
||||
continue
|
||||
if IS_PY3 and 'futures' in line.lower():
|
||||
# Python 3 already has futures, installing it will only break
|
||||
# the current python installation whenever futures is imported
|
||||
continue
|
||||
parsed_requirements.append(line)
|
||||
return parsed_requirements
|
||||
# <---- Helper Functions ---------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Reference in a new issue