Skip to content

Commit 3bdf0ed

Browse files
authored
Merge pull request #978 from carlosdamazio/freezing-code-linux
Adding instructions in Linux stubs in section "Freezing Your Code".
2 parents 6c223b9 + 92c70b8 commit 3bdf0ed

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

docs/shipping/freezing.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,45 @@ Linux
221221

222222
bbFreeze
223223
~~~~~~~~
224+
.. 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 <https://github.com/schmir/bbfreeze>`_.
225+
226+
bbFreeze can be used with all distributions that has Python installed along with pip2 and/or easy_install.
227+
228+
For pip2, use the following:
229+
230+
.. code-block:: console
231+
232+
$ pip2 install bbfreeze
233+
234+
Or, for easy_install:
235+
236+
.. code-block:: console
237+
238+
$ easy_install bbfreeze
239+
240+
With bbFreeze installed, you're ready to freeze your applications.
241+
242+
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.
243+
No need to worry, you can just ask to freeze the main entrypoint of your script and it should freeze entirely:
244+
245+
.. code-block:: console
246+
247+
$ bbfreeze script.py
248+
249+
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.
250+
251+
Alternatively, you can create a script that does the freezing for you. An API for the freezer is available from the library within:
252+
253+
.. code-block:: python
254+
255+
from bbfreeze import Freezer
256+
257+
freezer = Freezer(distdir='dist')
258+
freezer.addScript('script.py', gui_only=True) # Enable gui_only kwarg for app that uses GUI packages.
259+
freezer()
224260
225261
PyInstaller
226262
~~~~~~~~~~~
263+
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.
264+
265+
Don't forget to have dependencies such as Python and pip installed for usage.

0 commit comments

Comments
 (0)