Commits

Anthony Tuininga committed 9aab4d8

Include a version attribute in the cx_Freeze package and display it in the
output for the --version option to the script.

  • Participants
  • Parent commits 0c2c3be

Comments (0)

Files changed (2)

File cx_Freeze/__init__.py

+version = "4.0b1"
+
 import sys
-
 from dist import *
 if sys.platform == "win32" and sys.version_info[:2] >= (2, 5):
     from windist import *

File cx_Freeze/main.py

 import stat
 import sys
 
-from cx_Freeze import Freezer, Executable
+import cx_Freeze
 
 __all__ = ["main"]
 
-
 USAGE = \
 """
 %prog [options] [SCRIPT]
 
 VERSION = \
 """
-%prog HEAD
-Copyright (c) 2007 Colt Engineering. All rights reserved.
-Copyright (c) 2002-2006 Computronix Corporation. All rights reserved."""
+%%prog %s
+Copyright (c) 2007-2008 Colt Engineering. All rights reserved.
+Copyright (c) 2002-2006 Computronix Corporation. All rights reserved.""" % \
+        cx_Freeze.version
 
 
 def ParseCommandLine():
 
 def main():
     options = ParseCommandLine()
-    executables = [Executable(options.script, targetName = options.targetName)]
-    freezer = Freezer(executables,
+    executables = [cx_Freeze.Executable(options.script,
+            targetName = options.targetName)]
+    freezer = cx_Freeze.Freezer(executables,
             includes = options.includeModules,
             excludes = options.excludeModules,
             replacePaths = options.replacePaths,