diff --git a/__pkginfo__.py b/__pkginfo__.py index c425c768..69e5f3a9 100644 --- a/__pkginfo__.py +++ b/__pkginfo__.py @@ -98,6 +98,6 @@ def read(*rnames): return open(os.path.join(srcdir, *rnames)).read() -# Get info from files; set: long_description and VERSION +# Get info from files; set: long_description and __version__ long_description = read("README.rst") + "\n" exec(read("uncompyle6/version.py")) diff --git a/setup.py b/setup.py index 084c8e59..1d1da4af 100755 --- a/setup.py +++ b/setup.py @@ -29,7 +29,7 @@ from __pkginfo__ import ( modname, py_modules, short_desc, - VERSION, + __version__, web, zip_safe, ) @@ -52,6 +52,6 @@ setup( test_suite="nose.collector", url=web, tests_require=["nose>=1.0"], - version=VERSION, + version=__version__, zip_safe=zip_safe, ) diff --git a/uncompyle6/__init__.py b/uncompyle6/__init__.py index 920b6203..90eb5df0 100644 --- a/uncompyle6/__init__.py +++ b/uncompyle6/__init__.py @@ -30,10 +30,7 @@ import sys __docformat__ = "restructuredtext" -from uncompyle6.version import VERSION - -# This ensures VERSION will appear in pydoc -__version__ = VERSION +from uncompyle6.version import __version__ PYTHON3 = sys.version_info >= (3, 0) diff --git a/uncompyle6/bin/pydisassemble.py b/uncompyle6/bin/pydisassemble.py index cddca7b1..04048259 100755 --- a/uncompyle6/bin/pydisassemble.py +++ b/uncompyle6/bin/pydisassemble.py @@ -1,13 +1,13 @@ #!/usr/bin/env python # Mode: -*- python -*- # -# Copyright (c) 2015-2016, 2018 by Rocky Bernstein +# Copyright (c) 2015-2016, 2018, 2020 by Rocky Bernstein # from __future__ import print_function import sys, os, getopt from uncompyle6.disas import disassemble_file -from uncompyle6.version import VERSION +from uncompyle6.version import __version__ program, ext = os.path.splitext(os.path.basename(__file__)) @@ -58,7 +58,7 @@ Type -h for for full help.""" % program print(__doc__) sys.exit(1) elif opt in ('-V', '--version'): - print("%s %s" % (program, VERSION)) + print("%s %s" % (program, __version__)) sys.exit(0) else: print(opt) diff --git a/uncompyle6/bin/uncompile.py b/uncompyle6/bin/uncompile.py index fc121b84..e265d792 100755 --- a/uncompyle6/bin/uncompile.py +++ b/uncompyle6/bin/uncompile.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # Mode: -*- python -*- # -# Copyright (c) 2015-2017, 2019 by Rocky Bernstein +# Copyright (c) 2015-2017, 2019-2020 by Rocky Bernstein # Copyright (c) 2000-2002 by hartmut Goebel # from __future__ import print_function @@ -63,7 +63,7 @@ program = 'uncompyle6' from uncompyle6 import verify from uncompyle6.main import main, status_msg -from uncompyle6.version import VERSION +from uncompyle6.version import __version__ def usage(): print(__doc__) @@ -105,7 +105,7 @@ def main_bin(): print(__doc__) sys.exit(0) elif opt in ('-V', '--version'): - print("%s %s" % (program, VERSION)) + print("%s %s" % (program, __version__)) sys.exit(0) elif opt == '--verify': options['do_verify'] = 'strong' diff --git a/uncompyle6/main.py b/uncompyle6/main.py index 31bf89f5..5e14bfd1 100644 --- a/uncompyle6/main.py +++ b/uncompyle6/main.py @@ -20,7 +20,7 @@ from xdis import iscode, sysinfo2float from uncompyle6.disas import check_object_path from uncompyle6.semantics import pysource from uncompyle6.parser import ParserError -from uncompyle6.version import VERSION +from uncompyle6.version import __version__ # from uncompyle6.linenumbers import line_number_mapping @@ -91,7 +91,7 @@ def decompile( "# uncompyle6 version %s\n" "# %sPython bytecode %s%s\n# Decompiled from: %sPython %s" % ( - VERSION, + __version__, co_pypy_str, bytecode_version, " (%s)" % str(magic_int) if magic_int else "", diff --git a/uncompyle6/version.py b/uncompyle6/version.py index d8a4bdc9..0a0a5868 100644 --- a/uncompyle6/version.py +++ b/uncompyle6/version.py @@ -12,6 +12,5 @@ # along with this program. If not, see . # This file is suitable for sourcing inside POSIX shell as -# well as importing into Python. That's why there is no -# space around "=" below. -VERSION="3.7.4" # noqa +# well as importing into Python +__version__="3.7.4" # noqa