jeffreywugz / pyev

Automatically exported from code.google.com/p/pyev
0 stars 0 forks source link

setup.py python version check doesn't handle some versions #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
On Ubuntu 11.10, my python version as reported by platform.python_version() is 
"2.7.2+".  StrictVersion can't handle the "+", resulting in the following 
stacktrace when I attempt to install pyev:

~/Downloads/pyev-0.9.0 $ python setup.py install
Traceback (most recent call last):
  File "setup.py", line 56, in <module>
    check_version(python_version, min_python_versions[major], "Python{0}".format(major))
  File "setup.py", line 40, in check_version
    if StrictVersion(current_version) < StrictVersion(minimum_version):
  File "/usr/lib/python2.7/distutils/version.py", line 40, in __init__
    self.parse(vstring)
  File "/usr/lib/python2.7/distutils/version.py", line 107, in parse
    raise ValueError, "invalid version number '%s'" % vstring

I would assume that other Linux distros may have the same problem. Using 
LooseVersion instead should make this check more robust.

Original issue reported on code.google.com by ty...@datastax.com on 26 Jun 2013 at 8:38

GoogleCodeExporter commented 9 years ago
Is there any reason why you can't switch to LooseVersion for the check?  There 
is no workaround for this bug besides manually editing setup.py, which is *not* 
good for a library dependency.

Original comment by ty...@datastax.com on 13 Aug 2013 at 9:27

GoogleCodeExporter commented 9 years ago
I'm also curious why pyev checks for Python ≥ 2.7? I removed that check in my 
fork and was able to use it for my purpose (to use it with 
https://pypi.python.org/pypi/memcacheliked/0.2.1, which uses http://diesel.io/, 
which requires pyev on platforms that don't have epoll like Mac OS X) and it 
worked for me.

Are there some things that don't work in Python < 2.7?

Original comment by msabr...@gmail.com on 24 Mar 2014 at 3:23