mirror of https://github.com/python/cpython.git
bpo-30757: Improve "How to make stand-alone binaries" FAQ (GH-26309)
Co-authored-by: denfromufa <denfromufa@users.noreply.github.com> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
This commit is contained in:
parent
220dd80a26
commit
2a1e6698b1
|
@ -66,6 +66,8 @@ Static type checkers such as `Mypy <http://mypy-lang.org/>`_,
|
||||||
source code.
|
source code.
|
||||||
|
|
||||||
|
|
||||||
|
.. _faq-create-standalone-binary:
|
||||||
|
|
||||||
How can I create a stand-alone binary from a Python script?
|
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
|
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.
|
interpreter to form a self-contained binary which acts exactly like your script.
|
||||||
|
|
||||||
Obviously, freeze requires a C compiler. There are several other utilities
|
The following packages can help with the creation of console and GUI
|
||||||
which don't:
|
executables:
|
||||||
|
|
||||||
* `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
|
|
||||||
|
|
||||||
|
* `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?
|
Are there coding standards or a style guide for Python programs?
|
||||||
----------------------------------------------------------------
|
----------------------------------------------------------------
|
||||||
|
|
|
@ -140,9 +140,8 @@ offender.
|
||||||
How do I make an executable from a Python script?
|
How do I make an executable from a Python script?
|
||||||
-------------------------------------------------
|
-------------------------------------------------
|
||||||
|
|
||||||
See `cx_Freeze <https://cx-freeze.readthedocs.io/en/latest/>`_ and
|
See :ref:`faq-create-standalone-binary` for a list of tools that can be used to
|
||||||
`py2exe <http://www.py2exe.org/>`_, both are distutils extensions
|
make executables.
|
||||||
that allow you to create console and GUI executables from Python code.
|
|
||||||
|
|
||||||
|
|
||||||
Is a ``*.pyd`` file the same as a DLL?
|
Is a ``*.pyd`` file the same as a DLL?
|
||||||
|
|
Loading…
Reference in New Issue