Skip to content

Commit

Permalink
Warn user on python3.7.
Browse files Browse the repository at this point in the history
  • Loading branch information
DailyDreaming committed Jan 29, 2020
1 parent 2d0b0b8 commit 6e61068
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
20 changes: 13 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -93,6 +98,7 @@ def runSetup():
kubernetes_reqs = [
kubernetes]
mesos_reqs = [
http_parser,
pymesos,
psutil]
wdl_reqs = []
Expand Down
2 changes: 1 addition & 1 deletion version_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit 6e61068

Please sign in to comment.