Skip to content

Commit 9861f77

Browse files
Trivial tweaks on README.
1 parent a189990 commit 9861f77

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

stage8.2_packaging_pyinstaller/README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ able to just give a list of commands to download the code, install an
99
environment and run the application.
1010

1111
But 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
1414
install an application and its environment, or which look and behave like
1515
ordinary 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/)
3030
because 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
```
3737
pip install -U pyinstaller
3838
```
3939
changing to the directory of your program, and running
4040
```
4141
pysinstaller 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
4445
next to your application. You can run this executable as a command from the
4546
command-line, or by finding the icon in your OS file browser and opening it
4647
that way.
4748

4849
PyInstaller 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
5051
as possible. This is magical, and as with all magical things there are a lot
5152
of 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

6869
PyInstaller 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
7071
executable file. While the single file is nicer, getting it to work can be
7172
more difficult. For simplicity, we'll use the default single directory
7273
approach for this tutorial. You can use zip or a similar utility to bundle
@@ -123,12 +124,12 @@ entry_points={
123124
which advertise that the package has a command-line script `my_script` that
124125
can be run from the `main` function in `my_package.my_script` and Python tools
125126
will 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
127128
for building general "plugin" capabilities for Python libraries.
128129

129130
Amir Rachum has a [good blog post](https://amir.rachum.com/blog/2017/07/28/python-entry-points/)
130131
from 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

133134
Entry points used to be part of the `setuptools` library, but since Python 3.8
134135
they 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
193194
you 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
235236
a PyInstaller application. The idea is that these can be defined once for a
236237
given 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
239240
require additional support, such as Matplotlib: you should not need to do
240241
any 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)
243244
has additional community-contributed hook files for popular packages, which
244245
are `pip`-installable as `pyinstaller-hooks-contrib`.

0 commit comments

Comments
 (0)