Skip to content

Commit

Permalink
Use codespell to find common typos
Browse files Browse the repository at this point in the history
This is enforced by the pre-commit configuration.

The changeset also fixes the issues found by codespell.
  • Loading branch information
ronaldoussoren committed Apr 10, 2022
1 parent cdf5ab9 commit 841eb4f
Show file tree
Hide file tree
Showing 25 changed files with 64 additions and 55 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ repos:
- id: pyupgrade
args: ['--py36-plus']

- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
args: ["--config", ".codespellrc"]
exclude: PyObjCTest|_metadata\.py$|\.fwinfo$|\.rtf$|\.mht$

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
Expand Down
42 changes: 23 additions & 19 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ py2app.0.29

This is enforced by the pre-commit configuration

* Use codespell to avoid common typos.

This is enforced by the pre-commit configuration

py2app 0.28
-----------

Expand Down Expand Up @@ -63,7 +67,7 @@ py2app 0.28

* #406: Fix incompatibility with python 2.7

py2app 0.24 accidently broke compatibility with Python 2.7, and
py2app 0.24 accidentally broke compatibility with Python 2.7, and
this release fixes this.

This is the last release with Python 2.7 support, the next
Expand Down Expand Up @@ -272,7 +276,7 @@ py2app 0.23

* #320: Process "@loader_path" in load commands

A popular pattern in C extensions with bindins to C library on PyPI is to
A popular pattern in C extensions with bindings to C library on PyPI is to
copy those C libraries into the wheel and reference those using
an "@loader_path" linker command in the C extension. Until this release
py2app could not process those linker commands correctly.
Expand Down Expand Up @@ -448,7 +452,7 @@ py2app 0.11
- Issue #174: clean up the summary about missing modules by removing warnings about things that aren't modules.

Also notes when an module is likely an alias for some other module. These changes should remove a lot
of false postive warnings from the output of py2app.
of false positive warnings from the output of py2app.

- Fix issue #161: opengl recipe uses "file" function that isn't present on Python 3

Expand Down Expand Up @@ -539,7 +543,7 @@ py2app 0.8 is a feature release
linked to AppKit)

- Don't copy Python's Makefile, Setup file and the like into a bundle when
sysconfig and distutils.sysconfig don't need these files (basicly, when
sysconfig and distutils.sysconfig don't need these files (basically, when
using any recent python version).

- Fix some issues with virtualenv support:
Expand Down Expand Up @@ -654,7 +658,7 @@ py2app 0.7.4

- Issue #91: Added a recipe for `lxml <http://lxml.de/>`, needed because
lxml performs a number of imports from an extension and those cannot
be detected automaticly by modulegraph.
be detected automatically by modulegraph.

- Issue #94: The site-packages zipfile in the application bundle now contains
zipfile entries for directories as well. This is needed to work around
Expand Down Expand Up @@ -714,7 +718,7 @@ py2app 0.7.3 is a bugfix release

- Issue #88: Ensure that the fix for #65 won't try to create a symlink that
points to itself. This could for example occur with homebrew, where the
exposed lib directory contains symlinks to a cellar, while tye install_name
exposed lib directory contains symlinks to a cellar, while type install_name
does mention the "public" lib directory::

$ ls -l /opt/homebrew/lib
Expand Down Expand Up @@ -747,7 +751,7 @@ py2app 0.7.2 is a bugfix release

Reported by Steve Strassmann

- Issue #76: Semi-standalone packages using extensions modules coudn't use
- Issue #76: Semi-standalone packages using extensions modules couldn't use
extensions unless they also used the ``--site-packages`` option (and
the extensions are in the site-packages directory).

Expand Down Expand Up @@ -797,7 +801,7 @@ py2app 0.7
py2app 0.7 is a bugfix release

- Issue #65: generated bundle would crash when two libraries linked to the
same library using different names (one refering to the real name, the other
same library using different names (one referring to the real name, the other
to a symlink).

An example if this is an application using wxWidgets when wxWidgets is installed
Expand Down Expand Up @@ -907,7 +911,7 @@ py2app 0.7 is a bugfix release
"open application" and "open documents" Apple Events during startup,
which broke an assumption in argv_emulation.py.

- py2app is more strict w.r.t. explictly closing files, this avoids
- py2app is more strict w.r.t. explicitly closing files, this avoids
ResourceWarnings for unclosed files.

- fix test issue with semi-standalone builds on Python 3.2
Expand Down Expand Up @@ -947,7 +951,7 @@ py2app 0.6.4 is a bugfix and minor feature release

* fat3: i386, x86_64, ppc

* univeral: i386, x86_64, ppc, ppc64
* universal: i386, x86_64, ppc, ppc64

* intel: i386, x86_64

Expand All @@ -960,7 +964,7 @@ py2app 0.6.4 is a bugfix and minor feature release
- The '-O' flag of py2app now defaults to the python optimization level
when using python 2.6 or later.

- Issue #31: honor optimze flag at runtime.
- Issue #31: honor optimize flag at runtime.

Until now an application bundle created by py2app would also run without
the "-O" flag, even when the user specified it should. This is now fixed.
Expand All @@ -978,7 +982,7 @@ py2app 0.6.4 is a bugfix and minor feature release

This fixes and issue reported by Sean Robinson: py2app used to create a non-working
bundle when you used these packages because the packages didn't get included
(as intented), but were not available on ``sys.path`` either.
(as intended), but were not available on ``sys.path`` either.

- Fixed the recipe for sip, which in turn ensures that PyQt4 applications
work.
Expand Down Expand Up @@ -1020,7 +1024,7 @@ py2app 0.6.4 is a bugfix and minor feature release
- Issue #22: py2app will give an error when the specified version is invalid,
instead of causing a crash in the generated executable.

- Issue #23: py2app failed to work when an .egg directory was implictly added
- Issue #23: py2app failed to work when an .egg directory was implicitly added
to ``sys.path`` by setuptools and the "-O" option was used (for example
``python setup.py py2app -O2``)

Expand Down Expand Up @@ -1086,8 +1090,8 @@ Bugfixes:
stub executables, in particular not those that have support
for the PPC architecture.

- Don't rebuild the stub executables automaticly, that's
unsafe with Xcode 4 and could trigger accidently when
- Don't rebuild the stub executables automatically, that's
unsafe with Xcode 4 and could trigger accidentally when
files are installed in a different order than expected.

- Small tweaks to the testsuite to ensure that they work
Expand All @@ -1105,7 +1109,7 @@ py2app 0.6 is a minor feature release
Features:

- it is now possible to specify which python distributions must
be availble when building the bundle by using the
be available when building the bundle by using the
"install_requires" argument of the ``setup()`` function::

setup(
Expand Down Expand Up @@ -1166,7 +1170,7 @@ Bug fixes:
- Do not compile ``.nib`` files, it is not strictly needed and
breaks PyObjC projects that still use the NibClassBuilder code.

- Better error messsages when trying to include a non-existing
- Better error messages when trying to include a non-existing
file as a resource.

- Don't drop into PDB when an exception occurs.
Expand Down Expand Up @@ -1338,7 +1342,7 @@ Bug fixes:
code archives inside py2app-created bundles. This version has a workaround
for this "feature" for Stuffit.

- Be more carefull about passing non-constant strings as the template argumenti
- Be more careful about passing non-constant strings as the template argumenti
of string formatting functions (in the app and bundle templates), to avoid
crashes under some conditions.

Expand Down Expand Up @@ -1827,7 +1831,7 @@ py2app 0.1.2
applications.

- Adds an "Alias" feature to modulegraph, so that ``sys.modules`` craziness
such as ``wxPython.wx -> wx`` can be accomodated (this particular craziness
such as ``wxPython.wx -> wx`` can be accommodated (this particular craziness
is also now handled by default)

- A ``sys.path`` alternative may be passed to ``find_modules`` now, though
Expand Down
2 changes: 1 addition & 1 deletion doc/environment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ shell environment, which does not pick up changes to the environment in the
user's shell profile.

The "emulate_shell_environment" option will run a login shell in the background
to fetch exported environment varialbles and inject them into your application.
to fetch exported environment variables and inject them into your application.

It is also possible to inject extra variables into the environment by using
the ``LSEnvironment`` key in the Info.plist file, for example like so:
Expand Down
4 changes: 2 additions & 2 deletions doc/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ must replace hyphens (``-``) with underscores (``_``). ``setup.cfg`` files
may use either hyphens or underscores, but command-line options must always
use the hyphens.

Lists of values are a comma seperated sequence of names on the command-line and
Lists of values are a comma separated sequence of names on the command-line and
in setup.cfg, and regular python lists in setup.py (as shown in the earlier example).


Expand All @@ -54,7 +54,7 @@ Options for 'py2app' command:
- level (integer)
- Specifies the optimization level for the Pytho interpreter
level 0 to disable, level 1 for ``python -O``, and level 2
for ``python -OO``. Defaults to the optimation level of the
for ``python -OO``. Defaults to the optimization level of the
process running py2app.

* - ``--includes``
Expand Down
6 changes: 3 additions & 3 deletions examples/PyOpenGL/lesson5.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
#
# To run this code get and install OpenGL, GLUT, PyOpenGL (see http:#www.python.org), and NumPy.
# Installing PyNumeric means having a C compiler that is configured properly, or so I found. For
# Win32 this assumes VC++, I poked through the setup.py for Numeric, and chased through disutils code
# Win32 this assumes VC++, I poked through the setup.py for Numeric, and chased through distutils code
# and noticed what seemed to be hard coded preferences for VC++ in the case of a Win32 OS. However,
# I am new to Python and know little about disutils, so I may just be not using it right.
# I am new to Python and know little about distutils, so I may just be not using it right.
#
# NumPy is not a hard requirement, as I am led to believe (based on skimming PyOpenGL sources) that
# PyOpenGL could run without it. However preformance may be impacted since NumPy provides an efficient
# PyOpenGL could run without it. However performance may be impacted since NumPy provides an efficient
# multi-dimensional array type and a linear algebra library.
#
# BTW, since this is Python make sure you use tabs or spaces to indent, I had numerous problems since I
Expand Down
4 changes: 2 additions & 2 deletions examples/wxPython/2.4/doodle/superdoodle.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
save and reload doodles, clear the workspace, and has a simple control
panel for setting color and line thickness in addition to the popup
menu that DoodleWindow provides. There is also a nice About dialog
implmented using an wx.html.HtmlWindow.
implemented using an wx.html.HtmlWindow.
"""

import sys
Expand Down Expand Up @@ -243,7 +243,7 @@ def __init__(self, parent, ID, doodle):
self.thknsBtns[x] = b
self.thknsBtns[1].SetToggle(True)

# Make a colour indicator window, it is registerd as a listener
# Make a colour indicator window, it is registered as a listener
# with the doodle window so it will be notified when the settings
# change
ci = ColourIndicator(self)
Expand Down
4 changes: 2 additions & 2 deletions examples/wxPython/2.5/doodle/superdoodle.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
save and reload doodles, clear the workspace, and has a simple control
panel for setting color and line thickness in addition to the popup
menu that DoodleWindow provides. There is also a nice About dialog
implmented using an wx.html.HtmlWindow.
implemented using an wx.html.HtmlWindow.
"""

import wx # This module uses the new wx namespace
Expand Down Expand Up @@ -234,7 +234,7 @@ def __init__(self, parent, ID, doodle):
self.thknsBtns[x] = b
self.thknsBtns[1].SetToggle(True)

# Make a colour indicator window, it is registerd as a listener
# Make a colour indicator window, it is registered as a listener
# with the doodle window so it will be notified when the settings
# change
ci = ColourIndicator(self)
Expand Down
2 changes: 0 additions & 2 deletions examples/wxPython/2.5/wxGlade/README.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
te: this information is relevant to `py2app`_ 0.1.2 - which is currently just on the `svn trunk`_)

In order to see how hard it would be to package a complicated application such as `wxGlade`_, I decided to give it a try. `wxGlade`_ is quite a dynamic beast with regard to code generation and widget plugins, so it was a bit of a pain to deal with. I actually had to add several features to `py2app`_ in the process:

* A feature where one module can be "aliased" to another module. I needed this because wxPython.wx points to wx, but is not actually on the filesystem.
Expand Down
4 changes: 2 additions & 2 deletions examples/wxPython/4.0/doodle/superdoodle.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
save and reload doodles, clear the workspace, and has a simple control
panel for setting color and line thickness in addition to the popup
menu that DoodleWindow provides. There is also a nice About dialog
implmented using an wx.html.HtmlWindow.
implemented using an wx.html.HtmlWindow.
"""

import wx # This module uses the new wx namespace
Expand Down Expand Up @@ -237,7 +237,7 @@ def __init__(self, parent, ID, doodle):
self.thknsBtns[x] = b
self.thknsBtns[1].SetToggle(True)

# Make a colour indicator window, it is registerd as a listener
# Make a colour indicator window, it is registered as a listener
# with the doodle window so it will be notified when the settings
# change
ci = ColourIndicator(self)
Expand Down
2 changes: 1 addition & 1 deletion py2app/_pkg_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def update_metadata_cache_distinfo(infos, dist_info_path):
# (See issue #280 at https://github.com/pypa/wheel)
#
# This code works for all filenames, except those containing
# line seperators.
# line separators.
relpath = ln.rsplit(",", 2)[0]

if relpath.startswith('"') and relpath.endswith('"'):
Expand Down
2 changes: 1 addition & 1 deletion py2app/bootstrap/emulate_shell_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def _emulate_shell_environ():
# is required to get the right behavior from the shell, without
# a tty the shell won't properly initialize the environment.
#
# NOTE: The code is very carefull w.r.t. getting the login
# NOTE: The code is very careful w.r.t. getting the login
# name, the application shouldn't crash when the shell information
# cannot be retrieved
try:
Expand Down
8 changes: 4 additions & 4 deletions py2app/build_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
def finalize_distribution_options(dist):
"""
setuptools.finalize_distribution_options extension
point for py2app, to deail with autodiscovery in
point for py2app, to deal with autodiscovery in
setuptools 61.
This addin will set the name and py_modules attributes
Expand Down Expand Up @@ -265,7 +265,7 @@ def copy_dylib(self, src):
if os.path.islink(src):
dest = os.path.join(self.dest, os.path.basename(os.path.realpath(src)))

# Ensure that the orginal name also exists, avoids problems when
# Ensure that the original name also exists, avoids problems when
# the filename is used from Python (see issue #65)
#
# NOTE: The if statement checks that the target link won't
Expand Down Expand Up @@ -540,7 +540,7 @@ class py2app(Command):
(
"extra-scripts=",
None,
"set of additonal scripts to include in the application bundle",
"set of additional scripts to include in the application bundle",
),
("include-plugins=", None, "List of plugins to include"),
(
Expand Down Expand Up @@ -1248,7 +1248,7 @@ def finalize_modulefinder(self, mf):
if isinstance(item, Package) and item.filename == "-":
# In python3.3 or later the default importer supports namespace
# packages without an __init__ file, don't use that
# funcionality because that causes problems with our suppport
# funcionality because that causes problems with our support
# for loading C extensions.
#
# if sys.version_info[:2] <= (3,3):
Expand Down
4 changes: 2 additions & 2 deletions py2app/converters/nibfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

# _run_nibtool is an experiment while researching an odd
# failure of py2app: when _run_nibtool is None py2app will often
# (but for from everytime) fail when there are NIB files in the
# (but for from every time) fail when there are NIB files in the
# project. The failure is very odd: writing to sys.stderr fails
# with EGAIN as the errno, and subsequently the interpreter basicly
# with EGAIN as the errno, and subsequently the interpreter basically
# crashes.
#
# This workaround seems to fix that issue for now.
Expand Down
2 changes: 1 addition & 1 deletion py2app/recipes/PIL/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def check(cmd, mf):
if sip is not None:
mf.removeReference(sip, "ImageTk")

# The ImageQt plugin should only be usefull when using PyQt, which
# The ImageQt plugin should only be useful when using PyQt, which
# would then be explicitly imported.
# Note: this code doesn't have the right side-effect at the moment
# due to the way the PyQt5 recipe is structured.
Expand Down
2 changes: 1 addition & 1 deletion py2app/recipes/autopackages.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AUTO_PACKAGES = [
# Embbedded datafiles accessed using
# Embedded datafiles accessed using
# ``__file__`` relative paths.
"botocore",
"docutils",
Expand Down
2 changes: 1 addition & 1 deletion py2app/recipes/gcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def check(cmd, mf):
return None

# Dependency in package metadata, but
# no runtime dependency. Explicity include
# no runtime dependency. Explicitly include
# to ensure that the package metadata for
# googleapis_common_protos is included.
return {"includes": ["google.api"]}
2 changes: 1 addition & 1 deletion py2app/recipes/qt5.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def check(cmd, mf):
import PyQt5
from PyQt5.QtCore import QLibraryInfo
except ImportError:
# PyQt5 in the graph, but not instaled
# PyQt5 in the graph, but not installed
return None

# All imports are done from C code, hence not visible
Expand Down
Loading

0 comments on commit 841eb4f

Please sign in to comment.