Commits

Anthony Tuininga  committed cbd93ab

Added sample advanced setup script that demonstrates a few of the features
available to setup scripts as requested by Markus Meyer.

  • Participants
  • Parent commits 87c96b7
  • Tags 4.0

Comments (0)

Files changed (5)

File samples/advanced/advanced_1.py

+import sys
+
+print "Hello from cx_Freeze Advanced #1"
+print
+
+module = __import__("testfreeze_1")
+

File samples/advanced/advanced_2.py

+import sys
+
+print "Hello from cx_Freeze Advanced #2"
+print
+
+module = __import__("testfreeze_2")
+

File samples/advanced/modules/testfreeze_1.py

+print "Test freeze module #1"

File samples/advanced/modules/testfreeze_2.py

+print "Test freeze module #2"

File samples/advanced/setup.py

+# An advanced setup script to create multiple executables and demonstrate a few
+# of the features available to setup scripts
+#
+# hello.py is a very simple "Hello, world" type script which also displays the
+# environment in which the script runs
+#
+# Run the build process by running the command 'python setup.py build'
+#
+# If everything works well you should find a subdirectory in the build
+# subdirectory that contains the files needed to run the script without Python
+
+import sys
+from cx_Freeze import setup, Executable
+
+executables = [
+        Executable("advanced_1.py"),
+        Executable("advanced_2.py")
+]
+
+buildOptions = dict(
+        compressed = True,
+        includes = ["testfreeze_1", "testfreeze_2"],
+        path = sys.path + ["modules"])
+
+setup(
+        name = "advanced_cx_Freeze_sample",
+        version = "0.1",
+        description = "Advanced sample cx_Freeze script",
+        options = dict(build_exe = buildOptions),
+        executables = executables)
+