Don't install futures under Python 3 and above

This commit is contained in:
Pedro Algarvio 2015-10-18 09:44:54 +01:00
parent 8d85cb9ea8
commit cc3219fcde

View file

@ -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 ---------------------------------------------------------------------------------------------