Skip to content

Commit f512c99

Browse files
authored
change version handling. (#45)
1 parent dc7c464 commit f512c99

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pyjsonviewer/pyjsonviewer.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def get_version(project_dir):
3333
HISTORY_FILE_PATH = os.path.join(os.path.expanduser('~'),
3434
".pyjsonviewer_history")
3535
PROJECT_DIR = os.path.dirname(os.path.abspath(__file__))
36-
VERSION = get_version(PROJECT_DIR)
37-
36+
__version__ = get_version(PROJECT_DIR)
37+
VERSION = eval("(" + __version__.replace(".", ",") + ")")
3838

3939
class JSONTreeFrame(ttk.Frame):
4040
class Listbox(tk.Listbox):
@@ -278,7 +278,7 @@ def show_info_window():
278278
msg = """
279279
PyJSONViewer
280280
by Atsushi Sakai(@Atsushi_twi)
281-
Ver.""" + VERSION + """\n
281+
Ver.""" + __version__ + """\n
282282
"""
283283
messagebox.showinfo("About", msg)
284284

setup.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
except(IOError, ImportError):
2828
readme = open(PROJECT_PATH + '/README.md').read()
2929

30-
# read VERSION
30+
# read __version__
3131
with open(PROJECT_PATH + "/pyjsonviewer/VERSION", 'r') as fd:
32-
VERSION = fd.readline().rstrip('\n')
32+
__version__ = fd.readline().rstrip('\n')
3333

3434
setup(
3535
name="PyJSONViewer",
36-
version=VERSION,
36+
version=__version__,
3737
url="https://github.com/AtsushiSakai/PyJSONViewer",
3838
author="Atsushi Sakai",
3939
author_email="[email protected]",

0 commit comments

Comments
 (0)