mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Merge pull request #208 from bigchaindb/feat/204/print-version-number
Feat/204/print version number
This commit is contained in:
commit
6da2603e28
@ -37,4 +37,4 @@ config = {
|
||||
# for more info.
|
||||
_config = copy.deepcopy(config)
|
||||
from bigchaindb.core import Bigchain # noqa
|
||||
|
||||
from bigchaindb.version import __version__ # noqa
|
||||
|
@ -5,6 +5,8 @@ for ``argparse.ArgumentParser``.
|
||||
import argparse
|
||||
import multiprocessing as mp
|
||||
|
||||
from bigchaindb.version import __version__
|
||||
|
||||
|
||||
def start(parser, scope):
|
||||
"""Utility function to execute a subcommand.
|
||||
@ -46,7 +48,7 @@ def start(parser, scope):
|
||||
func(args)
|
||||
|
||||
|
||||
base_parser = argparse.ArgumentParser(add_help=False)
|
||||
base_parser = argparse.ArgumentParser(add_help=False, prog='bigchaindb')
|
||||
|
||||
base_parser.add_argument('-c', '--config',
|
||||
help='Specify the location of the configuration file')
|
||||
@ -55,3 +57,7 @@ base_parser.add_argument('-y', '--yes', '--yes-please',
|
||||
action='store_true',
|
||||
help='Assume "yes" as answer to all prompts and run '
|
||||
'non-interactively')
|
||||
|
||||
base_parser.add_argument('-v', '--version',
|
||||
action='version',
|
||||
version='%(prog)s {}'.format(__version__))
|
||||
|
2
bigchaindb/version.py
Normal file
2
bigchaindb/version.py
Normal file
@ -0,0 +1,2 @@
|
||||
__version__ = '0.1.5'
|
||||
__short_version__ = '0.1'
|
@ -30,6 +30,11 @@ from recommonmark.parser import CommonMarkParser
|
||||
# ones.
|
||||
import sphinx_rtd_theme
|
||||
|
||||
# get version
|
||||
_version = {}
|
||||
with open('../../bigchaindb/version.py') as fp:
|
||||
exec(fp.read(), _version)
|
||||
|
||||
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
@ -69,9 +74,9 @@ author = 'BigchainDB Contributors'
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.1'
|
||||
version = _version['__short_version__']
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.1.5'
|
||||
release = _version['__version__']
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
7
setup.py
7
setup.py
@ -6,6 +6,11 @@ For full docs visit https://bigchaindb.readthedocs.org
|
||||
"""
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
# get the version
|
||||
version = {}
|
||||
with open('bigchaindb/version.py') as fp:
|
||||
exec(fp.read(), version)
|
||||
|
||||
tests_require = [
|
||||
'pytest',
|
||||
'coverage',
|
||||
@ -32,7 +37,7 @@ docs_require = [
|
||||
|
||||
setup(
|
||||
name='BigchainDB',
|
||||
version='0.1.5',
|
||||
version=version['__version__'],
|
||||
description='BigchainDB: A Scalable Blockchain Database',
|
||||
long_description=__doc__,
|
||||
url='https://github.com/BigchainDB/bigchaindb/',
|
||||
|
Loading…
x
Reference in New Issue
Block a user