Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ as `dev` as long as `pyipmi/version.py` has not been generated, e.g. by

The version of the package is taken from, in this order:

1. `git describe --tags` in a git checkout, e.g. `0.5.8.dev77+g7c853b0`
1. `git describe --tags` in a git checkout, e.g. `0.5.8.post77+g7c853b0`
for the 77th commit after the tag `0.5.8`
2. `pyipmi/version.py`, which is generated by `setup.py` and is part of the
source distribution on PyPI
Expand Down
2 changes: 1 addition & 1 deletion docs/source/introduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Package version

The version of the package is taken from, in this order:

#. ``git describe --tags`` in a git checkout, e.g. ``0.5.8.dev77+g7c853b0``
#. ``git describe --tags`` in a git checkout, e.g. ``0.5.8.post77+g7c853b0``
for the 77th commit after the tag ``0.5.8``
#. ``pyipmi/version.py``, which is generated by ``setup.py`` and is part of
the source distribution on PyPI
Expand Down
1 change: 0 additions & 1 deletion pyipmi/interfaces/ipmb.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
from collections.abc import Iterable, Sequence

from .. import Routing, Target
from ..errors import IpmiTimeoutError
from ..msgs import (create_message, create_request_by_name,
encode_message, decode_message, constants)
from ..utils import check_rsp_completion_code
Expand Down
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
def pep440_version(describe):
"""Convert the output of 'git describe' to a PEP 440 version.

0.5.8-77-g7c853b0.dirty -> 0.5.8.dev77+g7c853b0.dirty
0.5.8-77-g7c853b0.dirty -> 0.5.8.post77+g7c853b0.dirty

The commits after a tag are counted as a post-release: a version
newer than the tag, so that it satisfies e.g. python-ipmi>=0.5.8.

Without tags, e.g. in a shallow clone, 'git describe --always' prints
only the abbreviated commit:
Expand All @@ -32,7 +35,7 @@ def pep440_version(describe):
tag, distance, commit, dirty = m.groups()
version = tag
if distance:
version += f'.dev{distance}+{commit}'
version += f'.post{distance}+{commit}'
if dirty:
version += ('.' if distance else '+') + dirty[1:]
return version
Expand Down