|
@@ -18,6 +18,8 @@ import tempfile
|
|
|
|
|
|
import six
|
|
|
|
|
|
+from functools import total_ordering
|
|
|
+
|
|
|
logger = logging.getLogger(__name__ if __name__ != '__main__' else 'ymake_conf.py')
|
|
|
|
|
|
|
|
@@ -82,6 +84,7 @@ class ConfigureError(Exception):
|
|
|
pass
|
|
|
|
|
|
|
|
|
+@total_ordering
|
|
|
class Platform(object):
|
|
|
def __init__(self, name, os, arch):
|
|
|
"""
|
|
@@ -273,8 +276,8 @@ class Platform(object):
|
|
|
def __eq__(self, other):
|
|
|
return (self.name, self.os, self.arch) == (other.name, other.os, other.arch)
|
|
|
|
|
|
- def __cmp__(self, other):
|
|
|
- return cmp((self.name, self.os, self.arch), (other.name, other.os, other.arch))
|
|
|
+ def __lt__(self, other):
|
|
|
+ return (self.name, self.os, self.arch) < (other.name, other.os, other.arch)
|
|
|
|
|
|
def __hash__(self):
|
|
|
return hash((self.name, self.os, self.arch))
|
|
@@ -2406,7 +2409,7 @@ class Cuda(object):
|
|
|
return False
|
|
|
|
|
|
if host != target:
|
|
|
- if not(host.is_linux_x86_64 and target.is_linux_armv8):
|
|
|
+ if not (host.is_linux_x86_64 and target.is_linux_armv8):
|
|
|
return False
|
|
|
if not self.cuda_version.from_user:
|
|
|
return False
|