Fix setup.py for tensorflow -rc versions

This commit is contained in:
Geoffrey Irving
2018-09-18 11:35:43 -07:00
parent 68a29d0ab3
commit a42c4eb2bb

View File

@@ -1,3 +1,4 @@
import re
from setuptools import setup, find_packages
import sys
@@ -49,6 +50,6 @@ setup(name='baselines',
try:
from distutils.version import StrictVersion
import tensorflow
assert StrictVersion(tensorflow.__version__) >= StrictVersion('1.4.0')
assert StrictVersion(re.sub(r'-rc\d+$', '', tensorflow.__version__)) >= StrictVersion('1.4.0')
except ImportError:
assert False, "TensorFlow needed, of version above 1.4"