Source

cx_Freeze / doc / cx_Freeze.html

Full commit
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
<title>cx_Freeze</title>
<style type="text/css">

/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 5196 2007-06-03 20:25:28Z wiemann $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.

See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/

/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
  border: 0 }

table.borderless td, table.borderless th {
  /* Override padding for "table.docutils td" with "! important".
     The right padding separates the table cells. */
  padding: 0 0.5em 0 0 ! important }

.first {
  /* Override more specific margin styles with "! important". */
  margin-top: 0 ! important }

.last, .with-subtitle {
  margin-bottom: 0 ! important }

.hidden {
  display: none }

a.toc-backref {
  text-decoration: none ;
  color: black }

blockquote.epigraph {
  margin: 2em 5em ; }

dl.docutils dd {
  margin-bottom: 0.5em }

/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
  font-weight: bold }
*/

div.abstract {
  margin: 2em 5em }

div.abstract p.topic-title {
  font-weight: bold ;
  text-align: center }

div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
  margin: 2em ;
  border: medium outset ;
  padding: 1em }

div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
  font-weight: bold ;
  font-family: sans-serif }

div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title {
  color: red ;
  font-weight: bold ;
  font-family: sans-serif }

/* Uncomment (and remove this text!) to get reduced vertical space in
   compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
  margin-bottom: 0.5em }

div.compound .compound-last, div.compound .compound-middle {
  margin-top: 0.5em }
*/

div.dedication {
  margin: 2em 5em ;
  text-align: center ;
  font-style: italic }

div.dedication p.topic-title {
  font-weight: bold ;
  font-style: normal }

div.figure {
  margin-left: 2em ;
  margin-right: 2em }

div.footer, div.header {
  clear: both;
  font-size: smaller }

div.line-block {
  display: block ;
  margin-top: 1em ;
  margin-bottom: 1em }

div.line-block div.line-block {
  margin-top: 0 ;
  margin-bottom: 0 ;
  margin-left: 1.5em }

div.sidebar {
  margin: 0 0 0.5em 1em ;
  border: medium outset ;
  padding: 1em ;
  background-color: #ffffee ;
  width: 40% ;
  float: right ;
  clear: right }

div.sidebar p.rubric {
  font-family: sans-serif ;
  font-size: medium }

div.system-messages {
  margin: 5em }

div.system-messages h1 {
  color: red }

div.system-message {
  border: medium outset ;
  padding: 1em }

div.system-message p.system-message-title {
  color: red ;
  font-weight: bold }

div.topic {
  margin: 2em }

h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
  margin-top: 0.4em }

h1.title {
  text-align: center }

h2.subtitle {
  text-align: center }

hr.docutils {
  width: 75% }

img.align-left {
  clear: left }

img.align-right {
  clear: right }

ol.simple, ul.simple {
  margin-bottom: 1em }

ol.arabic {
  list-style: decimal }

ol.loweralpha {
  list-style: lower-alpha }

ol.upperalpha {
  list-style: upper-alpha }

ol.lowerroman {
  list-style: lower-roman }

ol.upperroman {
  list-style: upper-roman }

p.attribution {
  text-align: right ;
  margin-left: 50% }

p.caption {
  font-style: italic }

p.credits {
  font-style: italic ;
  font-size: smaller }

p.label {
  white-space: nowrap }

p.rubric {
  font-weight: bold ;
  font-size: larger ;
  color: maroon ;
  text-align: center }

p.sidebar-title {
  font-family: sans-serif ;
  font-weight: bold ;
  font-size: larger }

p.sidebar-subtitle {
  font-family: sans-serif ;
  font-weight: bold }

p.topic-title {
  font-weight: bold }

pre.address {
  margin-bottom: 0 ;
  margin-top: 0 ;
  font-family: serif ;
  font-size: 100% }

pre.literal-block, pre.doctest-block {
  margin-left: 2em ;
  margin-right: 2em }

span.classifier {
  font-family: sans-serif ;
  font-style: oblique }

span.classifier-delimiter {
  font-family: sans-serif ;
  font-weight: bold }

span.interpreted {
  font-family: sans-serif }

span.option {
  white-space: nowrap }

span.pre {
  white-space: pre }

span.problematic {
  color: red }

span.section-subtitle {
  /* font-size relative to parent (h1..h6 element) */
  font-size: 80% }

table.citation {
  border-left: solid 1px gray;
  margin-left: 1px }

table.docinfo {
  margin: 2em 4em }

table.docutils {
  margin-top: 0.5em ;
  margin-bottom: 0.5em }

table.footnote {
  border-left: solid 1px black;
  margin-left: 1px }

table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
  padding-left: 0.5em ;
  padding-right: 0.5em ;
  vertical-align: top }

table.docutils th.field-name, table.docinfo th.docinfo-name {
  font-weight: bold ;
  text-align: left ;
  white-space: nowrap ;
  padding-left: 0 }

h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
  font-size: 100% }

ul.auto-toc {
  list-style-type: none }

</style>
</head>
<body>
<div class="document" id="cx-freeze">
<h1 class="title">cx_Freeze</h1>

<div class="section" id="abstract">
<h1>Abstract</h1>
<p><strong>cx_Freeze</strong> is a set of scripts and modules for freezing Python scripts into
executables in much the same way that <a class="reference external" href="http://www.py2exe.org/">py2exe</a> and <a class="reference external" href="http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html">py2app</a> do. Unlike these two
tools, cx_Freeze is cross platform and should work on any platform that Python
itself works on. It requires <a class="reference external" href="http://www.python.org">Python</a> 2.3 or higher since it makes use of the
zip import facility which was introduced in that version.</p>
<p><strong>cx_Freeze</strong> is distributed under an open-source <a class="reference external" href="LICENSE.txt">license</a>.</p>
</div>
<div class="section" id="using-cx-freeze">
<h1>Using cx_Freeze</h1>
<p>There are three different ways to use cx_Freeze. The first is to use the
included <tt class="docutils literal"><span class="pre">cxfreeze</span></tt> script which works well for simple scripts. The second is
to create a <a class="reference external" href="http://docs.python.org/lib/module-distutils.html">distutils</a> setup script which can be used for more complicated
configuration or to retain the configuration for future use. The third method
involves working directly with the classes and modules used internally by
cx_Freeze and should be reserved for complicated scripts or extending or
embedding. Each of these methods is described in greater detail below.</p>
<p>There are three different options for producing executables as well. The first
option is the only one that was available in earlier versions of cx_Freeze,
that is appending the zip file to the executable itself. The second option is
creating a private zip file with the same name as the executable but with the
extension .zip. The final option is the default which is to create a zip file
called <tt class="docutils literal"><span class="pre">library.zip</span></tt> and place all modules in this zip file. The final two
options are necessary when creating an RPM since the RPM builder automatically
strips executables. These options are described in greater detail below as
well.</p>
<div class="section" id="cxfreeze-script">
<h2>cxfreeze script</h2>
<p>The <tt class="docutils literal"><span class="pre">cxfreeze</span></tt> script is included with other Python scripts. On Windows and
the Mac this is in the <tt class="docutils literal"><span class="pre">Scripts</span></tt> subdirectory of your Python installation
whereas on Unix platforms this in the bin directory of the prefix where Python
is installed.</p>
<p>Assuming you have a script called <tt class="docutils literal"><span class="pre">hello.py</span></tt> which you want to turn into an
executable, this can be accomplished by this command:</p>
<pre class="literal-block">
cxfreeze hello.py --target-dir dist
</pre>
<p>Further customization can be done using the following options:</p>
<table border="1" class="docutils">
<colgroup>
<col width="30%" />
<col width="70%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">option name</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>--version</td>
<td>show version number and exit</td>
</tr>
<tr><td>-h, --help</td>
<td>show this help message and exit</td>
</tr>
<tr><td>-O</td>
<td>optimize generated bytecode as per PYTHONOPTIMIZE;
use -OO in order to remove doc strings</td>
</tr>
<tr><td>-c, --compress</td>
<td>compress byte code in zip files</td>
</tr>
<tr><td>-s, --silent</td>
<td>suppress all output except warnings</td>
</tr>
<tr><td>--base-name</td>
<td>file on which to base the executable; if the name
of the file is not an absolute file name, the
subdirectory bases inside the cx_Freeze package
will be searched for a file matching the name,
without regard to the extension</td>
</tr>
<tr><td>--init-script</td>
<td>script which will be executed upon startup; if the
name of the file is not an absolute file name, the
subdirectory initscripts inside the cx_Freeze
package will be searched for a file matching the
name, without regard to the extension</td>
</tr>
<tr><td>--target-dir</td>
<td>directory in which to place the executable and any
dependent files</td>
</tr>
<tr><td>--target-name</td>
<td>the name of the file to create; the default is the
base name of the script and the extension of the
base executable name</td>
</tr>
<tr><td>--shared-name</td>
<td>the name of the file to create; the default is the
base name of the script and the extension of the
base executable name</td>
</tr>
<tr><td>--no-copy-deps</td>
<td>do not copy any dependent files (extensions, shared
libraries, etc.) to the target directory; this also
modifies the default init script to ConsoleKeepPath
and means that the target executable requires a
Python installation to execute properly</td>
</tr>
<tr><td>--default-path</td>
<td>list of paths separated by the standard path
separator for the platform which will be used to
initialize the search path instead of sys.path</td>
</tr>
<tr><td>--include-path</td>
<td>list of paths separated by the standard path
separator for the platform which will be used to
add to the search path</td>
</tr>
<tr><td>--replace-paths</td>
<td>replace all the paths in modules found in the given
paths with the given replacement string; multiple
values are separated by the standard path separator
for the platform and each value is of the form
&lt;search&gt;=&lt;replace&gt;; &lt;search&gt; can be * which means
all paths not already specified</td>
</tr>
<tr><td>--include-modules</td>
<td>comma separated list of names of modules to include</td>
</tr>
<tr><td>--exclude-modules</td>
<td>comma separated list of names of modules to exclude</td>
</tr>
<tr><td>--ext-list-file</td>
<td>name of file in which to place the list of
dependent files which were copied to the target
directory</td>
</tr>
<tr><td>-z, --zip-include</td>
<td>name of file to add to the zip file or a
specification of the form &lt;name&gt;=&lt;arcname&gt; which
will specify the archive name to use; multiple
--zip-include arguments can be used</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="distutils-setup-script">
<h2>distutils setup script</h2>
<p>In order to make use of distutils a setup script must be created. This is
called <tt class="docutils literal"><span class="pre">setup.py</span></tt> by convention although it need not be called that. A
very simple script might use the following:</p>
<pre class="literal-block">
from cx_Freeze import setup, Executable

setup(
        name = &quot;hello&quot;,
        version = &quot;0.1&quot;,
        description = &quot;the typical 'Hello, world!' script&quot;,
        executables = [Executable(&quot;hello.py&quot;)])
</pre>
<p>The script is invoked as follows:</p>
<pre class="literal-block">
python setup.py build
</pre>
<p>This command will create a subdirectory called <tt class="docutils literal"><span class="pre">build</span></tt> with a further
subdirectory starting with the letters <tt class="docutils literal"><span class="pre">exe.</span></tt> and ending with the typical
identifier for the platform that distutils uses. This allows for multiple
platforms to be built without conflicts.</p>
<p>cx_Freeze creates two new commands and subclasses four others in order to
provide the ability to both build and install executables. In typical distutils
fashion they can be provided in the setup script, on the command line or in
a setup.cfg configuration file. They are described in further detail below.</p>
<div class="section" id="distutils-commands">
<h3>distutils commands</h3>
<div class="section" id="build">
<h4>build</h4>
<p>This command is a standard command which has been modified by cx_Freeze to
build any executables that are defined. The following options were added to
the standard set of options for the command:</p>
<table border="1" class="docutils">
<colgroup>
<col width="30%" />
<col width="70%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">option name</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>build-exe (-b)</td>
<td>directory for built executables and dependent files</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="build-exe">
<h4>build_exe</h4>
<p>This command performs the work of building an executable or set of executables.
It can be further customized:</p>
<table border="1" class="docutils">
<colgroup>
<col width="30%" />
<col width="70%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">option name</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>build-exe (-b)</td>
<td>directory for built executables and dependent files</td>
</tr>
<tr><td>optimize (-o)</td>
<td>optimization level, one of 0 (disabled), 1 or 2</td>
</tr>
<tr><td>excludes (-e)</td>
<td>comma separated list of names of modules to exclude</td>
</tr>
<tr><td>includes (-e)</td>
<td>comma separated list of names of modules to include</td>
</tr>
<tr><td>packages (-p)</td>
<td>comma separated list of packages to include, which
includes all submodules in the package</td>
</tr>
<tr><td>replace-paths</td>
<td>comma separated list of paths to replace in modules
in the form &lt;search&gt;=&lt;replace&gt;, using the value *
in the search portion of the directive will cause
all paths not mentioned by any other directive to
be replaced with the replacement value</td>
</tr>
<tr><td>path</td>
<td>comma separated list of paths to search; the
default value is sys.path</td>
</tr>
<tr><td>init-script (-i)</td>
<td>the name of the script to use during initialization
which, if given as a relative path, will be joined
with the initscripts subdirectory of the cx_Freeze
installation; the default value is &quot;Console&quot;</td>
</tr>
<tr><td>base</td>
<td>the name of the base executable to use which, if
given as a relative path, will be joined with the
bases subdirectory of the cx_Freeze installation;
the default value is &quot;Console&quot;</td>
</tr>
<tr><td>compressed (-c)</td>
<td>create a compressed zip file</td>
</tr>
<tr><td>copy-dependent-files</td>
<td>copy all dependent files</td>
</tr>
<tr><td>create-shared-zip</td>
<td>create a shared zip file called library.zip which
will contain all modules shared by all executables
which are built</td>
</tr>
<tr><td>append-script-to-exe</td>
<td>append the script module to the executable</td>
</tr>
<tr><td>include-in-shared-zip</td>
<td>include the script module in the shared zip file</td>
</tr>
<tr><td>icon</td>
<td>include the icon in the frozen executables on the
Windows platform and alongside the frozen
executable on other platforms</td>
</tr>
<tr><td>constants</td>
<td>comma separated list of constant values to include
in the constants module called BUILD_CONSTANTS in
form &lt;name&gt;=&lt;value&gt;</td>
</tr>
<tr><td>include-files</td>
<td>list containing files to be copied to the target
directory; it is expected that this list will
contain strings or 2-tuples for the source and
destination; the source can be a file or a directory
(in which case the tree is copied except for .svn
and CVS directories); the target must not be an
absolute path</td>
</tr>
<tr><td>zip-includes</td>
<td>list containing files to be included in the zip file
directory; it is expected that this list will
contain strings or 2-tuples for the source and
destination</td>
</tr>
<tr><td>bin-includes</td>
<td>list of names of files to include when determining
dependencies of binary files that would normally be
excluded</td>
</tr>
<tr><td>bin-excludes</td>
<td>list of names of files to exclude when determining
dependencies of binary files that would normally be
included</td>
</tr>
<tr><td>silent (-s)</td>
<td>suppress all output except warnings</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="install">
<h4>install</h4>
<p>This command is a standard command which has been modified by cx_Freeze to
install any executables that are defined. The following options were added to
the standard set of options for the command:</p>
<table border="1" class="docutils">
<colgroup>
<col width="30%" />
<col width="70%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">option name</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>install-exe</td>
<td>directory for installed executables and dependent
files</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="install-exe">
<h4>install_exe</h4>
<p>This command performs the work installing an executable or set of executables.
It can be used directly but most often is used when building Windows installers
or RPM packages. It can be further customized:</p>
<table border="1" class="docutils">
<colgroup>
<col width="30%" />
<col width="70%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">option name</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>install-dir (-d)</td>
<td>directory to install executables to; this defaults
to a subdirectory called &lt;name&gt;-&lt;version&gt; in the
&quot;Program Files&quot; directory on Windows and
&lt;prefix&gt;/lib on other platforms; on platforms other
than Windows symbolic links are also created in
&lt;prefix&gt;/bin for each executable.</td>
</tr>
<tr><td>build-dir (-b)</td>
<td>build directory (where to install from); this
defaults to the build_dir from the build command</td>
</tr>
<tr><td>force (-f)</td>
<td>force installation, overwriting existing files</td>
</tr>
<tr><td>skip-build</td>
<td>skip the build steps</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="bdist-msi">
<h4>bdist_msi</h4>
<p>This command is a standard command in Python 2.5 and higher which has been
modified by cx_Freeze to handle installing executables and their dependencies.
The following options were added to the standard set of options for the
command:</p>
<table border="1" class="docutils">
<colgroup>
<col width="30%" />
<col width="70%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">option name</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>add-to-path</td>
<td>add the target directory to the PATH environment
variable; the default value is True if there are
any console based executables and False otherwise</td>
</tr>
<tr><td>upgrade-code</td>
<td>define the upgrade code for the package that is
created; this is used to force removal of any
packages created with the same upgrade code prior
to the installation of this one</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="bdist-rpm">
<h4>bdist_rpm</h4>
<p>This command is a standard command which has been modified by cx_Freeze to
ensure that packages are created with the proper architecture for the platform.
The standard command assumes that the package should be architecture
independent if it cannot find any extension modules.</p>
</div>
</div>
<div class="section" id="cx-freeze-executable">
<h3>cx_Freeze.Executable</h3>
<p>The options for the <cite>build_exe</cite> command are the defaults for any executables
that are created. The options for the <cite>Executable</cite> class allow specification of
the values specific to a particular executable. The arguments to the
constructor are as follows:</p>
<table border="1" class="docutils">
<colgroup>
<col width="30%" />
<col width="70%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">argument name</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>script</td>
<td>the name of the file containing the script which is
to be frozen</td>
</tr>
<tr><td>initScript</td>
<td>the name of the initialization script that will be
executed before the actual script is executed; this
script is used to set up the environment for the
executable; if a name is given without an absolute
path the names of files in the initscripts
subdirectory of the cx_Freeze package is searched</td>
</tr>
<tr><td>base</td>
<td>the name of the base executable; if a name is given
without an absolute path the names of files in the
bases subdirectory of the cx_Freeze package is
searched</td>
</tr>
<tr><td>path</td>
<td>list of paths to search for modules</td>
</tr>
<tr><td>targetDir</td>
<td>the directory in which to place the target
executable and any dependent files</td>
</tr>
<tr><td>targetName</td>
<td>the name of the target executable; the default
value is the name of the script with the extension
exchanged with the extension for the base
executable</td>
</tr>
<tr><td>includes</td>
<td>list of names of modules to include</td>
</tr>
<tr><td>excludes</td>
<td>list of names of modules to exclude</td>
</tr>
<tr><td>packages</td>
<td>list of names of packages to include, including all
of the package's submodules</td>
</tr>
<tr><td>replacePaths</td>
<td>list of 2-tuples containing search values and
replacement values for paths of modules that are
included; a search value of &quot;*&quot; will cause all
paths not otherwise specified to be replaced with
that directive's replacement value</td>
</tr>
<tr><td>compress</td>
<td>boolean value indicating if the module bytecode
should be compressed or not</td>
</tr>
<tr><td>copyDependentFiles</td>
<td>boolean value indicating if dependent files should
be copied to the target directory or not</td>
</tr>
<tr><td>appendScriptToExe</td>
<td>boolean value indicating if the script module
should be appended to the executable itself</td>
</tr>
<tr><td>appendScriptToLibrary</td>
<td>boolean value indicating if the script module
should be appended to the shared library zipfile</td>
</tr>
<tr><td>icon</td>
<td>name of icon which should be included in the
executable itself on Windows or placed in the
target directory for other platforms</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</body>
</html>