forked from LBRYCommunity/lbry-sdk
fix lbrynet --version
This commit is contained in:
parent
82871b8f6b
commit
95436b233c
4 changed files with 7 additions and 5 deletions
|
@ -1,5 +1,6 @@
|
|||
import logging
|
||||
|
||||
__name__ = "lbrynet"
|
||||
__version__ = "0.30.0rc5"
|
||||
version = tuple(__version__.split('.'))
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ from requests.exceptions import ConnectionError
|
|||
from docopt import docopt
|
||||
from textwrap import dedent
|
||||
|
||||
from lbrynet import __name__ as lbrynet_name
|
||||
from lbrynet.daemon.Daemon import Daemon
|
||||
from lbrynet.daemon.DaemonControl import start as daemon_main
|
||||
from lbrynet.daemon.DaemonConsole import main as daemon_console
|
||||
|
@ -133,7 +134,7 @@ def main(argv=None):
|
|||
return 0
|
||||
|
||||
elif method in ['version', '--version', '-v']:
|
||||
print(json.dumps(get_platform(get_ip=False), sort_keys=True, indent=2, separators=(',', ': ')))
|
||||
print(lbrynet_name + " " + get_platform(get_ip=False)["lbrynet_version"])
|
||||
return 0
|
||||
|
||||
elif method == 'start':
|
||||
|
|
|
@ -13,7 +13,7 @@ import logging.handlers
|
|||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def get_lbrynet_version():
|
||||
def get_lbrynet_version() -> str:
|
||||
if build_type.BUILD == "dev":
|
||||
try:
|
||||
with open(os.devnull, 'w') as devnull:
|
||||
|
@ -27,7 +27,7 @@ def get_lbrynet_version():
|
|||
return lbrynet_version
|
||||
|
||||
|
||||
def get_platform(get_ip=True):
|
||||
def get_platform(get_ip: bool = True) -> dict:
|
||||
p = {
|
||||
"processor": platform.processor(),
|
||||
"python_version": platform.python_version(),
|
||||
|
|
4
setup.py
4
setup.py
|
@ -1,12 +1,12 @@
|
|||
import os
|
||||
from lbrynet import __version__
|
||||
from lbrynet import __name__, __version__
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
BASE = os.path.dirname(__file__)
|
||||
README_PATH = os.path.join(BASE, 'README.md')
|
||||
|
||||
setup(
|
||||
name="lbrynet",
|
||||
name=__name__,
|
||||
version=__version__,
|
||||
author="LBRY Inc.",
|
||||
author_email="hello@lbry.io",
|
||||
|
|
Loading…
Reference in a new issue