diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-05-22 22:23:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-22 22:23:11 (GMT) |
commit | 099e6a4096382697dda55d58d3a96f68375ea546 (patch) | |
tree | 9a0c3174ed1e5886b0165e91e0ab5537ce8eafc4 /Doc/faq | |
parent | b21193dd1ef45599b0f1a2314537bfc096fa96bd (diff) | |
download | cpython-099e6a4096382697dda55d58d3a96f68375ea546.zip cpython-099e6a4096382697dda55d58d3a96f68375ea546.tar.gz cpython-099e6a4096382697dda55d58d3a96f68375ea546.tar.bz2 |
bpo-30757: Improve "How to make stand-alone binaries" FAQ (GH-26309) (GH-26312)
Co-authored-by: denfromufa <denfromufa@users.noreply.github.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 2a1e6698b10a7b58c6ac66429de0f51cb739da35)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Diffstat (limited to 'Doc/faq')
-rw-r--r-- | Doc/faq/programming.rst | 17 | ||||
-rw-r--r-- | Doc/faq/windows.rst | 5 |
2 files changed, 12 insertions, 10 deletions
diff --git a/Doc/faq/programming.rst b/Doc/faq/programming.rst index f0784f0..ad51bb6 100644 --- a/Doc/faq/programming.rst +++ b/Doc/faq/programming.rst @@ -66,6 +66,8 @@ Static type checkers such as `Mypy <http://mypy-lang.org/>`_, source code. +.. _faq-create-standalone-binary: + How can I create a stand-alone binary from a Python script? ----------------------------------------------------------- @@ -89,14 +91,15 @@ only contains those built-in modules which are actually used in the program. It then compiles the generated C code and links it with the rest of the Python interpreter to form a self-contained binary which acts exactly like your script. -Obviously, freeze requires a C compiler. There are several other utilities -which don't: - -* `py2exe <http://www.py2exe.org/>`_ for Windows binaries -* `py2app <https://github.com/ronaldoussoren/py2app>`_ for Mac OS X binaries -* `cx_Freeze <https://cx-freeze.readthedocs.io/en/latest/>`_ for cross-platform - binaries +The following packages can help with the creation of console and GUI +executables: +* `Nuitka <https://nuitka.net/>`_ (Cross-platform) +* `PyInstaller <http://www.pyinstaller.org/>`_ (Cross-platform) +* `PyOxidizer <https://pyoxidizer.readthedocs.io/en/stable/>`_ (Cross-platform) +* `cx_Freeze <https://marcelotduarte.github.io/cx_Freeze/>`_ (Cross-platform) +* `py2app <https://github.com/ronaldoussoren/py2app>`_ (macOS only) +* `py2exe <http://www.py2exe.org/>`_ (Windows only) Are there coding standards or a style guide for Python programs? ---------------------------------------------------------------- diff --git a/Doc/faq/windows.rst b/Doc/faq/windows.rst index 186dac2..0153a4f 100644 --- a/Doc/faq/windows.rst +++ b/Doc/faq/windows.rst @@ -140,9 +140,8 @@ offender. How do I make an executable from a Python script? ------------------------------------------------- -See `cx_Freeze <https://cx-freeze.readthedocs.io/en/latest/>`_ and -`py2exe <http://www.py2exe.org/>`_, both are distutils extensions -that allow you to create console and GUI executables from Python code. +See :ref:`faq-create-standalone-binary` for a list of tools that can be used to +make executables. Is a ``*.pyd`` file the same as a DLL? |