Compare major.minor.bugfix
(self, other)
| 76 | self.is_devversion = bool(re.search(r'.dev', vstring)) |
| 77 | |
| 78 | def _compare_version(self, other): |
| 79 | """Compare major.minor.bugfix""" |
| 80 | if self.major == other.major: |
| 81 | if self.minor == other.minor: |
| 82 | if self.bugfix == other.bugfix: |
| 83 | vercmp = 0 |
| 84 | elif self.bugfix > other.bugfix: |
| 85 | vercmp = 1 |
| 86 | else: |
| 87 | vercmp = -1 |
| 88 | elif self.minor > other.minor: |
| 89 | vercmp = 1 |
| 90 | else: |
| 91 | vercmp = -1 |
| 92 | elif self.major > other.major: |
| 93 | vercmp = 1 |
| 94 | else: |
| 95 | vercmp = -1 |
| 96 | |
| 97 | return vercmp |
| 98 | |
| 99 | def _compare_pre_release(self, other): |
| 100 | """Compare alpha/beta/rc/final.""" |