.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.2. .TH PEX "1" "June 2022" "pex 1.5.3-1" "User Commands" .SH NAME pex \- pex .SH SYNOPSIS .B pex [\fI\,-o OUTPUT.PEX\/\fR] [\fI\,options\/\fR] [\fI\,-- arg1 arg2 \/\fR...] .SH DESCRIPTION pex builds a PEX (Python Executable) file based on the given specifications: sources, requirements, their dependencies and other options. .SH OPTIONS .TP \fB\-\-version\fR show program's version number and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .TP \fB\-o\fR PEX_NAME, \fB\-\-output\-file\fR=\fI\,PEX_NAME\/\fR The name of the generated .pex file: Omiting this will run PEX immediately and not save it to a file. .TP \fB\-p\fR FILE, \fB\-\-preamble\-file\fR=\fI\,FILE\/\fR The name of a file to be included as the preamble for the generated .pex file .TP \fB\-D\fR DIR, \fB\-\-sources\-directory\fR=\fI\,DIR\/\fR Add sources directory to be packaged into the generated .pex file. This option can be used multiple times. .TP \fB\-R\fR DIR, \fB\-\-resources\-directory\fR=\fI\,DIR\/\fR Add resources directory to be packaged into the generated .pex file. This option can be used multiple times. .TP \fB\-r\fR FILE, \fB\-\-requirement\fR=\fI\,FILE\/\fR Add requirements from the given requirements file. This option can be used multiple times. .TP \fB\-\-constraints\fR=\fI\,FILE\/\fR Add constraints from the given constraints file. This option can be used multiple times. .TP \fB\-v\fR Turn on logging verbosity, may be specified multiple times. .TP \fB\-\-pex\-root\fR=\fI\,PEX_ROOT\/\fR Specify the pex root used in this invocation of pex. [Default: ~/.pex] .TP \fB\-\-help\-variables\fR Print out help about the various environment variables used to change the behavior of a running PEX file. .IP Resolver options: .IP Tailor how to find, resolve and translate the packages that get put into the PEX environment. .TP \fB\-\-pypi\fR, \fB\-\-no\-pypi\fR, \fB\-\-no\-index\fR Whether to use pypi to resolve dependencies; Default: use pypi .TP \fB\-\-pex\-path\fR=\fI\,PEX_PATH\/\fR A colon separated list of other pex files to merge into the runtime environment. .TP \fB\-f\fR PATH/URL, \fB\-\-find\-links\fR=\fI\,PATH\/\fR/URL, \fB\-\-repo\fR=\fI\,PATH\/\fR/URL Additional repository path (directory or URL) to look for requirements. .TP \fB\-i\fR URL, \fB\-\-index\fR=\fI\,URL\/\fR, \fB\-\-index\-url\fR=\fI\,URL\/\fR Additional cheeseshop indices to use to satisfy requirements. .TP \fB\-\-pre\fR, \fB\-\-no\-pre\fR Whether to include pre\-release and development versions of requirements; Default: only stable versions are used, unless explicitly requested .TP \fB\-\-disable\-cache\fR Disable caching in the pex tool entirely. .TP \fB\-\-cache\-dir\fR=\fI\,CACHE_DIR\/\fR The local cache directory to use for speeding up requirement lookups. [Default: ~/.pex/build] .TP \fB\-\-cache\-ttl\fR=\fI\,CACHE_TTL\/\fR The cache TTL to use for inexact requirement specifications. .TP \fB\-\-wheel\fR, \fB\-\-no\-wheel\fR, \fB\-\-no\-use\-wheel\fR Whether to allow wheel distributions; Default: allow wheels .TP \fB\-\-build\fR, \fB\-\-no\-build\fR Whether to allow building of distributions from source; Default: allow builds .TP \fB\-\-manylinux\fR, \fB\-\-no\-manylinux\fR, \fB\-\-no\-use\-manylinux\fR Whether to allow resolution of manylinux dists for linux target platforms; Default: allow manylinux .IP PEX output options: .IP Tailor the behavior of the emitted .pex file if \fB\-o\fR is specified. .TP \fB\-\-zip\-safe\fR, \fB\-\-not\-zip\-safe\fR Whether or not the sources in the pex file are zip safe. If they are not zip safe, they will be written to disk prior to execution; Default: zip safe. .TP \fB\-\-always\-write\-cache\fR Always write the internally cached distributions to disk prior to invoking the pex source code. This can use less memory in RAM constrained environments. [Default: False] .TP \fB\-\-ignore\-errors\fR Ignore run\-time requirement resolution errors when invoking the pex. [Default: False] .TP \fB\-\-inherit\-path\fR=\fI\,INHERIT_PATH\/\fR Inherit the contents of sys.path (including sitepackages) running the pex. Possible values: false (does not inherit sys.path), fallback (inherits sys.path after packaged dependencies), prefer (inherits sys.path before packaged dependencies), No value (alias for prefer, for backwards compatibility). [Default: false] .IP PEX environment options: .IP Tailor the interpreter and platform targets for the PEX environment. .TP \fB\-\-python\fR=\fI\,PYTHON\/\fR The Python interpreter to use to build the pex. Either specify an explicit path to an interpreter, or specify a binary accessible on $PATH. This option can be passed multiple times to create a multi\-interpreter compatible pex. Default: Use current interpreter. .TP \fB\-\-interpreter\-constraint\fR=\fI\,INTERPRETER_CONSTRAINT\/\fR A constraint that determines the interpreter compatibility for this pex, using the Requirementstyle format, e.g. "CPython>=3", or ">=2.7" for requirements agnostic to interpreter class. This option can be passed multiple times. .TP \fB\-\-rcfile\fR=\fI\,RC_FILE\/\fR An additional path to a pexrc file to read during configuration parsing. Used primarily for testing. .TP \fB\-\-python\-shebang\fR=\fI\,PYTHON_SHEBANG\/\fR The exact shebang (#!...) line to add at the top of the PEX file minus the #!. This overrides the default behavior, which picks an environment python interpreter compatible with the one used to build the PEX file. .TP \fB\-\-platform\fR=\fI\,PLATFORMS\/\fR The platform for which to build the PEX. This option can be passed multiple times to create a multiplatform pex. To use wheels for specific interpreter/platform tags, you can append them to the platform with hyphens like: PLATFORM\-IMPL\-PYVER\-ABI (e.g. "linux_x86_64\-cp\-27\-cp27mu", "macosx_10.12_x86_64\-cp\-36\-cp36m") PLATFORM is the host platform e.g. "linux\-x86_64", "macosx\-10.12\-x86_64", etc". IMPL is the python implementation abbreviation (e.g. "cp", "pp", "jp"). PYVER is a two\-digit string representing the python version (e.g. "27", "36"). ABI is the ABI tag (e.g. "cp36m", "cp27mu", "abi3", "none"). Default: current platform. .TP \fB\-\-interpreter\-cache\-dir\fR=\fI\,INTERPRETER_CACHE_DIR\/\fR The interpreter cache to use for keeping track of interpreter dependencies for the pex tool. Default: `~/.pex/interpreters`. .IP PEX entry point options: .IP Specify what target/module the PEX should invoke if any. .TP \fB\-m\fR MODULE[:SYMBOL], \fB\-e\fR MODULE[:SYMBOL], \fB\-\-entry\-point\fR=\fI\,MODULE[\/\fR:SYMBOL] Set the entry point to module or module:symbol. If just specifying module, pex behaves like python \fB\-m\fR, e.g. python \fB\-m\fR SimpleHTTPServer. If specifying module:symbol, pex imports that symbol and invokes it as if it were main. .TP \fB\-c\fR SCRIPT_NAME, \fB\-\-script\fR=\fI\,SCRIPT_NAME\/\fR, \fB\-\-console\-script\fR=\fI\,SCRIPT_NAME\/\fR Set the entry point as to the script or console_script as defined by a any of the distributions in the pex. For example: "pex \fB\-c\fR fab fabric" or "pex \fB\-c\fR mturk boto". .TP \fB\-\-validate\-entry\-point\fR Validate the entry point by importing it in separate process. Warning: this could have side effects. For example, entry point `a.b.c:m` will translate to `from a.b.c import m` during validation. [Default: False]