forked from pyinstaller/pyinstaller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyi-makespec.1
252 lines (252 loc) · 7.46 KB
/
pyi-makespec.1
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
.\" Man page generated from reStructuredText.
.
.TH "PYI-MAKESPEC" "1" "2017-01-15" "3.2.1" "PyInstaller"
.SH NAME
pyi-makespec \- Create a spec file for your PyInstaller project
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.\" disable justification (adjust text to left margin only)
.ad l
\.SH SYNOPSIS
.sp
\fBpyi\-makespec\fP <options> SCRIPT [SCRIPT ...]
.SH DESCRIPTION
.sp
The spec file is the description of what you want \fIPyInstaller\fP to do
with your program. \fBpyi\-makespec\fP is a simple wizard to create spec
files that cover basic usages:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
pyi\-makespec [\-\-onefile] yourprogram.py
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
By default, \fBpyi\-makespec\fP generates a spec file that tells
\fIPyInstaller\fP to create a distribution directory contains the main
executable and the dynamic libraries. The option \fB\-\-onefile\fP
specifies that you want PyInstaller to build a single file with
everything inside.
.sp
In most cases the specfile generated by \fBpyi\-makespec\fP is all you
need. If not, see \fIWhen things go wrong\fP in the manual and be sure to
read the introduction to \fISpec Files\fP\&.
.SH OPTIONS
.INDENT 0.0
.TP
.B \-h\fP,\fB \-\-help
show this help message and exit
.TP
.BI \-\-log\-level \ LEVEL
Amount of detail in build\-time console messages. LEVEL
may be one of DEBUG, INFO, WARN, ERROR, CRITICAL
(default: INFO).
.UNINDENT
.SS What to generate
.INDENT 0.0
.TP
.B \-D\fP,\fB \-\-onedir
Create a one\-folder bundle containing an executable
(default)
.TP
.B \-F\fP,\fB \-\-onefile
Create a one\-file bundled executable.
.TP
.BI \-\-specpath \ DIR
Folder to store the generated spec file (default:
current directory)
.TP
.BI \-n \ NAME\fP,\fB \ \-\-name \ NAME
Name to assign to the bundled app and spec file
(default: first script\(aqs basename)
.UNINDENT
.SS What to bundle, where to search
.INDENT 0.0
.TP
.BI \-\-add\-data \ <SRC;DEST or SRC:DEST>
Additional non\-binary files or folders to be added to
the executable. The path separator is platform
specific, \fBos.pathsep\fP (which is \fB;\fP on Windows
and \fB:\fP on most unix systems) is used. This option
can be used multiple times.
.TP
.BI \-\-add\-binary \ <SRC;DEST or SRC:DEST>
Additional binary files to be added to the executable.
See the \fB\-\-add\-data\fP option for more details. This
option can be used multiple times.
.TP
.BI \-p \ DIR\fP,\fB \ \-\-paths \ DIR
A path to search for imports (like using PYTHONPATH).
Multiple paths are allowed, separated by \(aq:\(aq, or use
this option multiple times
.TP
.BI \-\-hidden\-import \ MODULENAME\fP,\fB \ \-\-hiddenimport \ MODULENAME
Name an import not visible in the code of the
script(s). This option can be used multiple times.
.TP
.BI \-\-additional\-hooks\-dir \ HOOKSPATH
An additional path to search for hooks. This option
can be used multiple times.
.TP
.BI \-\-runtime\-hook \ RUNTIME_HOOKS
Path to a custom runtime hook file. A runtime hook is
code that is bundled with the executable and is
executed before any other code or module to set up
special features of the runtime environment. This
option can be used multiple times.
.TP
.BI \-\-exclude\-module \ EXCLUDES
Optional module or package (the Python name, not the
path name) that will be ignored (as though it was not
found). This option can be used multiple times.
.TP
.BI \-\-key \ KEY
The key used to encrypt Python bytecode.
.UNINDENT
.SS How to generate
.INDENT 0.0
.TP
.B \-d\fP,\fB \-\-debug
Tell the bootloader to issue progress messages while
initializing and starting the bundled app. Used to
diagnose problems with missing imports.
.TP
.B \-s\fP,\fB \-\-strip
Apply a symbol\-table strip to the executable and
shared libs (not recommended for Windows)
.TP
.B \-\-noupx
Do not use UPX even if it is available (works
differently between Windows and *nix)
.UNINDENT
.SS Windows and Mac OS X specific options
.INDENT 0.0
.TP
.B \-c\fP,\fB \-\-console\fP,\fB \-\-nowindowed
Open a console window for standard i/o (default)
.TP
.B \-w\fP,\fB \-\-windowed\fP,\fB \-\-noconsole
Windows and Mac OS X: do not provide a console window
for standard i/o. On Mac OS X this also triggers
building an OS X .app bundle. This option is ignored
in *NIX systems.
.TP
.BI \-i \ <FILE.ico or FILE.exe,ID or FILE.icns>\fP,\fB \ \-\-icon \ <FILE.ico or FILE.exe,ID or FILE.icns>
FILE.ico: apply that icon to a Windows executable.
FILE.exe,ID, extract the icon with ID from an exe.
FILE.icns: apply the icon to the .app bundle on Mac OS
X
.UNINDENT
.SS Windows specific options
.INDENT 0.0
.TP
.BI \-\-version\-file \ FILE
add a version resource from FILE to the exe
.TP
.BI \-m \ <FILE or XML>\fP,\fB \ \-\-manifest \ <FILE or XML>
add manifest FILE or XML to the exe
.TP
.BI \-r \ RESOURCE\fP,\fB \ \-\-resource \ RESOURCE
Add or update a resource to a Windows executable. The
RESOURCE is one to four items,
FILE[,TYPE[,NAME[,LANGUAGE]]]. FILE can be a data file
or an exe/dll. For data files, at least TYPE and NAME
must be specified. LANGUAGE defaults to 0 or may be
specified as wildcard * to update all resources of the
given TYPE and NAME. For exe/dll files, all resources
from FILE will be added/updated to the final
executable if TYPE, NAME and LANGUAGE are omitted or
specified as wildcard *.This option can be used
multiple times.
.TP
.B \-\-uac\-admin
Using this option creates a Manifest which will
request elevation upon application restart.
.TP
.B \-\-uac\-uiaccess
Using this option allows an elevated application to
work with Remote Desktop.
.UNINDENT
.SS Windows Side\-by\-side Assembly searching options (advanced)
.INDENT 0.0
.TP
.B \-\-win\-private\-assemblies
Any Shared Assemblies bundled into the application
will be changed into Private Assemblies. This means
the exact versions of these assemblies will always be
used, and any newer versions installed on user
machines at the system level will be ignored.
.TP
.B \-\-win\-no\-prefer\-redirects
While searching for Shared or Private Assemblies to
bundle into the application, PyInstaller will prefer
not to follow policies that redirect to newer
versions, and will try to bundle the exact versions of
the assembly.
.UNINDENT
.SS Mac OS X specific options
.INDENT 0.0
.TP
.BI \-\-osx\-bundle\-identifier \ BUNDLE_IDENTIFIER
Mac OS X .app bundle identifier is used as the default
unique program name for code signing purposes. The
usual form is a hierarchical name in reverse DNS
notation. For example:
com.mycompany.department.appname (default: first
script\(aqs basename)
.UNINDENT
.SH ENVIRONMENT VARIABLES
.TS
center;
|l|l|.
_
T{
PYINSTALLER_CONFIG_DIR
T} T{
This changes the directory where PyInstaller caches some
files. The default location for this is operating system
dependent, but is typically a subdirectory of the home
directory.
T}
_
.TE
.SH SEE ALSO
.sp
\fBpyi\-build\fP(1), The PyInstaller Manual, \fBpyinstaller\fP(1)
.sp
Project Homepage \fI\%http://www.pyinstaller.org\fP
.SH AUTHOR
Hartmut Goebel
.SH COPYRIGHT
This document has been placed in the public domain.
.\" Generated by docutils manpage writer.
.