From 92c70b865a4bd95efcea15180848b4d2c597ca86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Dam=C3=A1zio?= Date: Sun, 10 Feb 2019 17:58:44 -0200 Subject: [PATCH] Adding instructions for bbFreeze and PyInstaller in Linux stubs in Freezing Your Code. --- docs/shipping/freezing.rst | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/docs/shipping/freezing.rst b/docs/shipping/freezing.rst index 99dcba2..4f39c6f 100644 --- a/docs/shipping/freezing.rst +++ b/docs/shipping/freezing.rst @@ -221,6 +221,45 @@ Linux bbFreeze ~~~~~~~~ +.. warning:: bbFreeze will ONLY work in Python 2.x environment, since it's no longer being maintained as stated by it's former maintainer. If you're interested in it, check the repository in `here `_. + +bbFreeze can be used with all distributions that has Python installed along with pip2 and/or easy_install. + +For pip2, use the following: + +.. code-block:: console + + $ pip2 install bbfreeze + +Or, for easy_install: + +.. code-block:: console + + $ easy_install bbfreeze + +With bbFreeze installed, you're ready to freeze your applications. + +Let's assume you have a script, say, "hello.py" and a module called "module.py" and you have a function in it that's being used in your script. +No need to worry, you can just ask to freeze the main entrypoint of your script and it should freeze entirely: + +.. code-block:: console + + $ bbfreeze script.py + +With this, it creates a folder called dist/, of which contains the executable of the script and required .so (shared objects) files linked against libraries used within the Python script. + +Alternatively, you can create a script that does the freezing for you. An API for the freezer is available from the library within: + +.. code-block:: python + + from bbfreeze import Freezer + + freezer = Freezer(distdir='dist') + freezer.addScript('script.py', gui_only=True) # Enable gui_only kwarg for app that uses GUI packages. + freezer() PyInstaller ~~~~~~~~~~~ +PyInstaller can be used in a similar fashion as in OS X. The installation goes in the same manner as shown in the OS X section. + +Don't forget to have dependencies such as Python and pip installed for usage.