diff --git a/setup.py b/setup.py index 3421f06b2d..8db1319a3c 100755 --- a/setup.py +++ b/setup.py @@ -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, diff --git a/trezorctl b/trezorctl index 1d52b54397..1428d8f18f 100755 --- a/trezorctl +++ b/trezorctl @@ -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 # diff --git a/trezorlib/version.py b/trezorlib/version.py new file mode 100644 index 0000000000..b377742a76 --- /dev/null +++ b/trezorlib/version.py @@ -0,0 +1 @@ +VERSION = '0.8.0a1'