| @@ 1236-1258 (lines=23) @@ | ||
| 1233 | return "+" |
|
| 1234 | ||
| 1235 | ||
| 1236 | def render_pep440(pieces): |
|
| 1237 | """Build up version string, with post-release "local version identifier". |
|
| 1238 | ||
| 1239 | Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you |
|
| 1240 | get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty |
|
| 1241 | ||
| 1242 | Exceptions: |
|
| 1243 | 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] |
|
| 1244 | """ |
|
| 1245 | if pieces["closest-tag"]: |
|
| 1246 | rendered = pieces["closest-tag"] |
|
| 1247 | if pieces["distance"] or pieces["dirty"]: |
|
| 1248 | rendered += plus_or_dot(pieces) |
|
| 1249 | rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) |
|
| 1250 | if pieces["dirty"]: |
|
| 1251 | rendered += ".dirty" |
|
| 1252 | else: |
|
| 1253 | # exception #1 |
|
| 1254 | rendered = "0+untagged.%d.g%s" % (pieces["distance"], |
|
| 1255 | pieces["short"]) |
|
| 1256 | if pieces["dirty"]: |
|
| 1257 | rendered += ".dirty" |
|
| 1258 | return rendered |
|
| 1259 | ||
| 1260 | ||
| 1261 | def render_pep440_pre(pieces): |
|
| @@ 315-337 (lines=23) @@ | ||
| 312 | return "+" |
|
| 313 | ||
| 314 | ||
| 315 | def render_pep440(pieces): |
|
| 316 | """Build up version string, with post-release "local version identifier". |
|
| 317 | ||
| 318 | Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you |
|
| 319 | get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty |
|
| 320 | ||
| 321 | Exceptions: |
|
| 322 | 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] |
|
| 323 | """ |
|
| 324 | if pieces["closest-tag"]: |
|
| 325 | rendered = pieces["closest-tag"] |
|
| 326 | if pieces["distance"] or pieces["dirty"]: |
|
| 327 | rendered += plus_or_dot(pieces) |
|
| 328 | rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) |
|
| 329 | if pieces["dirty"]: |
|
| 330 | rendered += ".dirty" |
|
| 331 | else: |
|
| 332 | # exception #1 |
|
| 333 | rendered = "0+untagged.%d.g%s" % (pieces["distance"], |
|
| 334 | pieces["short"]) |
|
| 335 | if pieces["dirty"]: |
|
| 336 | rendered += ".dirty" |
|
| 337 | return rendered |
|
| 338 | ||
| 339 | ||
| 340 | def render_pep440_pre(pieces): |
|