1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-26 09:28:13 +00:00

Add 'trezorctl version' to track version of installed package

This commit is contained in:
slush 2017-12-02 18:31:34 +01:00
parent 29e4c6a05e
commit 59ef832424
3 changed files with 12 additions and 1 deletions

View File

@ -17,9 +17,11 @@ if '--disable-hidapi' in sys.argv:
else:
install_requires.append('hidapi>=0.7.99.post20')
from trezorlib.version import VERSION
setup(
name='trezor',
version='0.8.0a0',
version=VERSION,
author='TREZOR',
author_email='info@trezor.io',
description='Python library for communicating with TREZOR Hardware Wallet',
@ -45,6 +47,7 @@ setup(
'trezorlib.transport_udp',
'trezorlib.tx_api',
'trezorlib.types_pb2',
'trezorlib.version',
],
scripts=['trezorctl'],
install_requires=install_requires,

View File

@ -114,6 +114,13 @@ def ls(transport_name):
return devices
@cli.command(name='version', help='Show version of trezorctl/trezorlib.')
@click.pass_obj
def version(_):
from trezorlib.version import VERSION
return VERSION
#
# Basic device functions
#

1
trezorlib/version.py Normal file
View File

@ -0,0 +1 @@
VERSION = '0.8.0a1'