Skip to content

Commit

Permalink
Insure parse_version does not return tuple (resolves #476)
Browse files Browse the repository at this point in the history
* Insure min_version does not return tuple (resolves #476)

* Mention minimal setup tools version in error message

* Improve version checking error message
  • Loading branch information
Christopher Ketchum authored and hannes-ucsc committed Nov 2, 2016
1 parent 43a9ab6 commit cfd31fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@
from version import version
from pkg_resources import parse_version, require, DistributionNotFound


def check_provided(distribution, min_version, max_version=None, optional=False):
min_version = parse_version(min_version)
if isinstance(min_version, tuple):
raise RuntimeError("Setuptools version 8.0 or newer required. Update by running "
"'pip install --upgrade setuptools'")
if max_version is not None:
max_version = parse_version(max_version)

Expand Down

0 comments on commit cfd31fd

Please sign in to comment.