• Home
  • Raw
  • Download

Lines Matching +full:python3 +full:- +full:pip

1 :mod:`zipapp` --- Manage executable Python zip archives
14 --------------
18 <using-on-interface-options>`. The module provides both a
19 :ref:`zipapp-command-line-interface` and a :ref:`zipapp-python-api`.
23 -------------
25 The following example shows how the :ref:`zipapp-command-line-interface`
30 .. code-block:: shell-session
32 $ python -m zipapp myapp -m "myapp:main"
37 .. _zipapp-command-line-interface:
39 Command-Line Interface
40 ----------------------
44 .. code-block:: shell-session
46 $ python -m zipapp source [options]
51 displayed if the --info option is specified).
57 .. cmdoption:: -o <output>, --output=<output>
67 .. cmdoption:: -p <interpreter>, --python=<interpreter>
73 .. cmdoption:: -m <mainfn>, --main=<mainfn>
80 :option:`--main` cannot be specified when copying an archive.
82 .. cmdoption:: -c, --compress
87 :option:`--compress` has no effect when copying an archive.
91 .. cmdoption:: --info
97 .. cmdoption:: -h, --help
102 .. _zipapp-python-api:
105 ----------
115 * The name of a directory, or a :term:`path-like object` referring
118 * The name of an existing application archive file, or a :term:`path-like object`
129 * If it is the name of a file, or a :term:`path-like object`,
181 The *archive* argument can be a filename or a file-like object open
185 .. _zipapp-examples:
188 --------
192 .. code-block:: shell-session
194 $ python -m zipapp myapp
206 .. code-block:: shell-session
208 $ python -m zipapp myapp -p "/usr/bin/env python"
216 >>> zipapp.create_archive('old_archive.pyz', 'new_archive.pyz', '/usr/bin/python3')
233 .. _zipapp-specifying-the-interpreter:
236 --------------------------
247 * If you use an explicit version, for example "/usr/bin/env python3" your
251 exact version like "/usr/bin/env python3.4" as you will need to change your
254 Typically, you should use an "/usr/bin/env python2" or "/usr/bin/env python3",
259 --------------------------------------------
261 Using the :mod:`zipapp` module, it is possible to create self-contained Python
274 using pip:
276 .. code-block:: shell-session
278 $ python -m pip install -r requirements.txt --target myapp
281 file - if not, you can just list the dependencies manually on the pip command
284 3. Optionally, delete the ``.dist-info`` directories created by pip in the
285 ``myapp`` directory. These hold metadata for pip to manage the packages, and
286 as you won't be making any further use of pip they aren't required -
291 .. code-block:: shell-session
293 $ python -m zipapp -p "interpreter" myapp
296 the appropriate interpreter available. See :ref:`zipapp-specifying-the-interpreter`
312 ``subprocess.run(['myapp'])`` won't find your application - you need to
320 you end up with a single-file executable that runs your application.
378 any version of Python 3.x. All it needs is for Python (``python3.dll``) to be
404 ensure that your users have ``python3.dll`` on their PATH (which is not the
418 -----------------------------------------
436 launcher on Windows. The interpreter should be encoded in UTF-8 on Windows,
440 in the "root" of the zipfile - i.e., it cannot be in a subdirectory). The
447 application archives - the module is a convenience, but archives in the above