1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-09-09 13:31:53 +01:00

Implement PEP396

Implement PEP396 which specifies that a package should advertise its
version via __version__ attribute.

As devlib is often used as a development version directly from source,
also add a __full_version__ attribute which appends the current commit
ID to the version.

Use the __full_version__ inside setup.py
This commit is contained in:
Sergei Trofimov
2018-06-14 16:33:14 +01:00
committed by setrofim
parent 4a862d06bb
commit cc04e1a839
2 changed files with 33 additions and 1 deletions

View File

@@ -30,3 +30,14 @@ from devlib.trace.serial_trace import SerialTraceCollector
from devlib.host import LocalConnection
from devlib.utils.android import AdbConnection
from devlib.utils.ssh import SshConnection, TelnetConnection, Gem5Connection
from devlib.utils.version import get_commit as __get_commit
__version__ = '0.0.4'
__commit = __get_commit()
if __commit:
__full_version__ = '{}-{}'.format(__version__, __commit)
else:
__full_version__ = __version__