aboutsummaryrefslogtreecommitdiff
path: root/python/name.cc
diff options
context:
space:
mode:
Diffstat (limited to 'python/name.cc')
-rw-r--r--python/name.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/python/name.cc b/python/name.cc
index 5d98ebfba..32a22fc1c 100644
--- a/python/name.cc
+++ b/python/name.cc
@@ -188,7 +188,16 @@ void expose_name()
"[ro] PackageNamePart"
)
+#if PY_MAJOR_VERSION < 3
.def("__cmp__", &py_cmp<QualifiedPackageName>)
+# else
+ .def(bp::self == bp::self)
+ .def(bp::self != bp::self)
+ .def(bp::self < bp::self)
+ .def(bp::self <= bp::self)
+ .def(bp::self > bp::self)
+ .def(bp::self >= bp::self)
+# endif
.def(bp::self_ns::str(bp::self))
;