TabViewer / gtabview

Simple graphical tabular data viewer
MIT License
33 stars 3 forks source link

gtabview.__version__ #16

Closed s-celles closed 3 years ago

s-celles commented 9 years ago

Hello,

it may be interesting to provide a __version__ attribute available using:

print(gtabview.__version__)

to avoid to change into several place version number I'm doing this in setup.py

NAME = 'package_name'
here = path.abspath(path.dirname(__file__))'
with io.open(path.join(here, NAME, 'version.py'), 'rt', encoding='UTF-8') as f:
    exec(f.read())

setup(
    name=NAME,
    version=__version__,
    ...
)

and I have a version.py file inside package directory

__author__ = '...'
__credits__ = ['...']
__email__ = '...'
__version__ = '...'
__license__ = '...'
__url__ = 'https://github.com/...'
__maintainer__ = "..."

Kind regards