Skip to content

Commit

Permalink
fix rust version check in check command
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Apr 11, 2017
1 parent 2d59e56 commit df3beaa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions setuptools_rust/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .extension import RustExtension
from .utils import cpython_feature, get_rust_version

MIN_VERSION = semantic_version.Spec('1.16')
MIN_VERSION = semantic_version.Spec('>=1.16')


class check_rust(Command):
Expand All @@ -32,6 +32,8 @@ def run(self):

version = get_rust_version()
if version not in MIN_VERSION:
print('Rust version mismatch: required rust%s got rust%s' % (
MIN_VERSION, version))
return

# Make sure that if pythonXX-sys is used, it builds against the current
Expand Down Expand Up @@ -70,6 +72,7 @@ def run(self):
except OSError:
raise DistutilsExecError(
"Unable to execute 'cargo' - this package "
"requires rust to be installed and cargo to be on the PATH")
"requires rust to be installed and "
"cargo to be on the PATH")
else:
print("Extension '%s' checked" % ext.name)

0 comments on commit df3beaa

Please sign in to comment.