TAG[.postN.devDISTANCE] -- No -dirty. Exceptions: 1: no tags. 0.post0.devDISTANCE
(pieces)
| 434 | |
| 435 | |
| 436 | def render_pep440_pre(pieces): |
| 437 | """TAG[.postN.devDISTANCE] -- No -dirty. |
| 438 | |
| 439 | Exceptions: |
| 440 | 1: no tags. 0.post0.devDISTANCE |
| 441 | """ |
| 442 | if pieces["closest-tag"]: |
| 443 | if pieces["distance"]: |
| 444 | # update the post release segment |
| 445 | tag_version, post_version = pep440_split_post(pieces["closest-tag"]) |
| 446 | rendered = tag_version |
| 447 | if post_version is not None: |
| 448 | rendered += ".post%d.dev%d" % (post_version + 1, pieces["distance"]) |
| 449 | else: |
| 450 | rendered += ".post0.dev%d" % (pieces["distance"]) |
| 451 | else: |
| 452 | # no commits, use the tag as the version |
| 453 | rendered = pieces["closest-tag"] |
| 454 | else: |
| 455 | # exception #1 |
| 456 | rendered = "0.post0.dev%d" % pieces["distance"] |
| 457 | return rendered |
| 458 | |
| 459 | |
| 460 | def render_pep440_post(pieces): |
no test coverage detected
searching dependent graphs…