@@ -9,8 +9,8 @@ able to just give a list of commands to download the code, install an
99environment and run the application.
1010
1111But a major advantage of GUI applications is that they are intended to be
12- accessible by users who are not as knowledgable about coding. For this reason
13- it's desirable to be able to provide them with simply tools which either
12+ accessible by users who are not as knowledgeable about coding. For this reason
13+ it's desirable to be able to provide them with simple tools which either
1414install an application and its environment, or which look and behave like
1515ordinary applications on their operating system.
1616
@@ -26,27 +26,28 @@ consider using include:
2626 which is new and somewhat incomplete, but aims to be deployable on all
2727 platforms including iOS and Android.
2828
29- In this tutorial we will use [ PyInstaller] ( https://pyinstaller.org/en/stable/ )
29+ In this section we will use [ PyInstaller] ( https://pyinstaller.org/en/stable/ )
3030because it works on all major desktop platforms and is fairly mature.
3131
3232## PyInstaller Basics
3333
34- At its simplest, using PyInstaller is just a matter of installing pysinstaller
35- with pip:
34+ At its simplest, using PyInstaller is just a matter of installing pyinstaller
35+ with ` pip ` :
3636```
3737pip install -U pyinstaller
3838```
3939changing to the directory of your program, and running
4040```
4141pysinstaller my_script.py
4242```
43- Pysinstaller will create an application file and place it in a ` dist/ ` folder
43+ PyInstaller will create an application file (.exe if on Windows, executable if
44+ on POSIX systems) and place it in a ` dist/ ` folder
4445next to your application. You can run this executable as a command from the
4546command-line, or by finding the icon in your OS file browser and opening it
4647that way.
4748
4849PyInstaller tries to analyse your code and only include modules that it knows
49- that your application will use, to make the resuling application file as small
50+ that your application will use, to make the resulting application file as small
5051as possible. This is magical, and as with all magical things there are a lot
5152of options and things to tweak to make sure that the magic works.
5253
@@ -66,7 +67,7 @@ the particular idiosyncracies of each.
6667### Single Directory vs. Single File
6768
6869PyInstaller gives you a choice between building an application as an
69- executable plus auxillary files as a single directory, or as a single
70+ executable plus auxiliary files as a single directory, or as a single
7071executable file. While the single file is nicer, getting it to work can be
7172more difficult. For simplicity, we'll use the default single directory
7273approach for this tutorial. You can use zip or a similar utility to bundle
@@ -123,12 +124,12 @@ entry_points={
123124which advertise that the package has a command-line script ` my_script ` that
124125can be run from the ` main ` function in ` my_package.my_script ` and Python tools
125126will ensure that these are made available when you install them into a Python
126- environment. However they are a much more general mechanism which can be used
127+ environment. However they are a much more general mechanism which can be used
127128for building general "plugin" capabilities for Python libraries.
128129
129130Amir Rachum has a [ good blog post] ( https://amir.rachum.com/blog/2017/07/28/python-entry-points/ )
130131from a few years back that explains why you might use or care about entry
131- points. More modern code may also use the
132+ points.
132133
133134Entry points used to be part of the ` setuptools ` library, but since Python 3.8
134135they are now available via the
@@ -193,7 +194,7 @@ Most of this you can ignore for simple usage, but there are a few things that
193194you can use to fix the problems listed above:
194195
195196- adding data files: the ` datas ` argument to the ` Analysis ` function expects
196- a list of ` (source, dest) ` tuples that tell PyImporter to include the
197+ a list of ` (source, dest) ` tuples that tell PyInstaller to include the
197198 file(s) at the ` source ` path in your code in the directory specified by
198199 ` dest ` in your application. This understands basic "glob"-style wildcards.
199200
@@ -235,10 +236,10 @@ provide particular information that `package.name` needs to correctly work in
235236a PyInstaller application. The idea is that these can be defined once for a
236237given library and then shared by all the applications which use this library.
237238
238- PyInstaller comes with built in support for some common libraries which
239+ PyInstaller comes with built- in support for some common libraries which
239240require additional support, such as Matplotlib: you should not need to do
240241any additional work to build an application which used matplotlib in a
241- standard way, for example. Additionally the
242+ standard way, for example. Additionally the
242243[ PyInstaller hooks repository] ( https://github.com/pyinstaller/pyinstaller-hooks-contrib )
243244has additional community-contributed hook files for popular packages, which
244245are ` pip ` -installable as ` pyinstaller-hooks-contrib ` .
0 commit comments