setup: use version from package

This commit is contained in:
Grigori Goronzy 2015-11-23 19:33:26 +01:00
parent bc242390e7
commit b96bc39948
3 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ from setuptools import setup, find_packages
setup(
name = "stcgal",
version = "1.0",
version = stcgal.__version__,
packages = find_packages(exclude=["doc"]),
install_requires = ["pyserial"],
entry_points = {

View File

@ -1 +1 @@
VERSION = "1.0"
__version__ = "1.0"

View File

@ -138,7 +138,7 @@ class StcGal:
def cli():
# check arguments
parser = argparse.ArgumentParser(description="stcgal %s - an STC MCU ISP flash tool" %stcgal.VERSION)
parser = argparse.ArgumentParser(description="stcgal %s - an STC MCU ISP flash tool" %stcgal.__version__)
parser.add_argument("code_binary", help="code segment binary file to flash", type=argparse.FileType("rb"), nargs='?')
parser.add_argument("eeprom_binary", help="eeprom segment binary file to flash", type=argparse.FileType("rb"), nargs='?')
parser.add_argument("-P", "--protocol", help="protocol version", choices=["stc89", "stc12a", "stc12", "stc15a", "stc15"], default="stc12")