Permalink
Browse files

Use LooseVersion instead of strict version on platform.python_version()

  • Loading branch information...
1 parent 2bf49b5 commit d6cc62ec7a9d7498c584766ede3c87e70897ffc9 @hellais hellais committed Nov 27, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 setup.py
View
@@ -19,7 +19,7 @@
import platform
from distutils import log
from distutils.core import setup
-from distutils.version import StrictVersion
+from distutils.version import StrictVersion, LooseVersion
requires = ["twisted"]
@@ -29,7 +29,7 @@
# avoiding installation problems on old RedHat distributions (ex. CentOS 5)
# http://stackoverflow.com/questions/7340784/easy-install-pyopenssl-error
py_version = platform.python_version()
-if StrictVersion(py_version) < StrictVersion('2.6'):
+if LooseVersion(py_version) < StrictVersion('2.6'):
distname, version, _id = platform.dist()
else:
distname, version, _id = platform.linux_distribution()

0 comments on commit d6cc62e

Please sign in to comment.