diff --git a/setup.py b/setup.py index a5a62b9ab2..b203c316b3 100644 --- a/setup.py +++ b/setup.py @@ -14,18 +14,18 @@ from setuptools import find_packages, setup import sys import os -import copy + # setting the 'CPPFLAGS' flag specifies the necessary cython dependency for "http-parser", for more info: # toil issue: https://github.com/DataBiosphere/toil/issues/2924 # very similar to this issue: https://github.com/mcfletch/pyopengl/issues/11 # the "right way" is waiting for a fix from "http-parser", but this fixes things in the meantime since that might take a while -cppflags = os.environ.get('CPPFLAGS') -if cppflags: - # note, duplicate options don't affect things here so we don't check - Mark D - os.environ['CPPFLAGS'] = ' '.join([cppflags, '-DPYPY_VERSION']) -else: - os.environ['CPPFLAGS'] = '-DPYPY_VERSION' +cppflags_args = [i.strip() for i in os.environ.get('CPPFLAGS', '').split(' ') if i.strip()] +python_version = float('{}.{}'.format(str(sys.version_info.major), str(sys.version_info.minor))) +if python_version >= 3.7 and '-DPYPY_VERSION' not in cppflags_args: + raise RuntimeError('Toil requires the environment variable "CPPFLAGS" to contain "-DPYPY_VERSION" when installed ' + 'on python3.7 or higher. This can be set with:\n\n' + ' export CPPFLAGS=$CPPFLAGS" -DPYPY_VERSION"\n\n') def runSetup(): @@ -59,6 +59,11 @@ def runSetup(): addict = 'addict<=2.2.0' sphinx = 'sphinx==1.7.5' pathlib2 = 'pathlib2==2.3.2' + # We need this specific http-parser that still claims to be version 0.8.3 + # but which builds on Python 3.7+, to satisfy pymesos + http_parser = 'http-parser' + \ + '@https://github.com/adamnovak/http-parser/archive/190a17839ba229c635b59d960579451a81fe73f3.zip' + \ + '#sha256=3d30c84a426627e468657c44de199daee9d3210a48e392d4ad2e7497c5010949' core_reqs = [ dill, @@ -93,6 +98,7 @@ def runSetup(): kubernetes_reqs = [ kubernetes] mesos_reqs = [ + http_parser, pymesos, psutil] wdl_reqs = [] diff --git a/version_template.py b/version_template.py index 194cc8f0d0..68b71c4588 100644 --- a/version_template.py +++ b/version_template.py @@ -26,7 +26,7 @@ # - only import from the Python standard run-time library (you can't have any dependencies) -baseVersion = '3.22.1a4' +baseVersion = '3.22.1a5' cgcloudVersion = '1.6.0a1.dev393' dockerName = 'toil'