Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix version checking so 1.2.11 > 1.2.3 #3

Merged
merged 1 commit into from
Jan 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

from distutils.command.build_ext import build_ext
from distutils import sysconfig
from distutils.version import StrictVersion
from setuptools import Extension, setup, find_packages

# monkey patch import hook. Even though flake8 says it's not used, it is.
Expand Down Expand Up @@ -709,7 +710,7 @@ def check_zlib_version(self, include_dirs):
m = re.match(r'#define\s+ZLIB_VERSION\s+"([^"]*)"', line)
if not m:
continue
if m.group(1) < "1.2.3":
if StrictVersion(m.group(1)) < StrictVersion("1.2.3"):
return m.group(1)

# https://hg.python.org/users/barry/rev/7e8deab93d5a
Expand Down