Skip to content

Commit df3beaa

Browse files
committed
fix rust version check in check command
1 parent 2d59e56 commit df3beaa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

setuptools_rust/check.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from .extension import RustExtension
1212
from .utils import cpython_feature, get_rust_version
1313

14-
MIN_VERSION = semantic_version.Spec('1.16')
14+
MIN_VERSION = semantic_version.Spec('>=1.16')
1515

1616

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

3333
version = get_rust_version()
3434
if version not in MIN_VERSION:
35+
print('Rust version mismatch: required rust%s got rust%s' % (
36+
MIN_VERSION, version))
3537
return
3638

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

0 commit comments

Comments
 (0)