Skip to content

Commit

Permalink
pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Jun 30, 2017
1 parent d66f7a5 commit 90e2302
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setuptools_rust/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from .extension import RustExtension
from .utils import Binding

__all__ = ('RustExtension',
__all__ = ('RustExtension', 'Binding',
'check_rust', 'clean_rust', 'build_ext', 'build_rust', 'test_rust')


Expand Down
3 changes: 2 additions & 1 deletion setuptools_rust/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def run(self):
features.update(cpython_feature(binding=ext.binding))

# check cargo command
feature_args = ["--features", " ".join(features)] if features else []
feature_args = [
"--features", " ".join(features)] if features else []
args = (["cargo", "check", "--lib", "--manifest-path", ext.path]
+ feature_args
+ list(ext.args or []))
Expand Down
3 changes: 2 additions & 1 deletion setuptools_rust/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def run(self):
features.update(cpython_feature(ext=False, binding=ext.binding))

# test cargo command
feature_args = ["--features", " ".join(features)] if features else []
feature_args = [
"--features", " ".join(features)] if features else []
args = (["cargo", "test", "--lib", "--manifest-path", ext.path]
+ feature_args
+ list(ext.args or []))
Expand Down
4 changes: 3 additions & 1 deletion setuptools_rust/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def cpython_feature(ext=True, binding=Binding.PyO3):
else:
return ("pyo3/python3",)
else:
raise DistutilsPlatformError("Unsupported python version: %s" % sys.version)
raise DistutilsPlatformError(
"Unsupported python version: %s" % sys.version)
elif binding is Binding.RustCPython:
if (2, 7) < version < (2, 8):
if ext:
Expand All @@ -53,6 +54,7 @@ def cpython_feature(ext=True, binding=Binding.PyO3):
else:
raise DistutilsPlatformError('Unknown Binding: "{}" '.format(binding))


def get_rust_version():
try:
output = subprocess.check_output(["rustc", "-V"])
Expand Down

0 comments on commit 90e2302

Please sign in to comment.