Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to py2exe 0.11.1.0 #13510

Merged
merged 2 commits into from
Mar 20, 2022
Merged

Upgrade to py2exe 0.11.1.0 #13510

merged 2 commits into from
Mar 20, 2022

Conversation

michaelDCurran
Copy link
Member

@michaelDCurran michaelDCurran commented Mar 20, 2022

Link to issue number:

Alternative to pr #13508

Summary of the issue:

Some time after we branched for the 2021.3 beta, pr #13066 was merged to master, which upgraded Py2exe to 0.11.0.1. However, this version of Py2exe fails to build the NVDA distribution when using optimized Python (E.g. when building a release).

Traceback (most recent call last):
  File "setup.py", line 290, in <module>
    + getRecursiveDataFiles('documentation', '../user_docs', excludes=('*.t2t', '*.t2tconf', '*/developerGuide.*'))
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\setuptools\__init__.py", line 144, in setup
    return distutils.core.setup(**attrs)
  File "C:\Program Files (x86)\Python37-32\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Program Files (x86)\Python37-32\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Program Files (x86)\Python37-32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "setup.py", line 114, in run
    super(py2exe, self).run()
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\distutils_buildexe.py", line 192, in run
    self._run()
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\distutils_buildexe.py", line 272, in _run
    builder.analyze()
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\runtime.py", line 172, in analyze
    mf.import_package(modname)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\mf310.py", line 144, in import_package
    self.import_hook(name,  None, ["*"])
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 211, in import_hook
    q, tail = self.find_head_package(parent, name)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 267, in find_head_package
    q = self.import_module(head, qname, parent)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 361, in import_module
    m = self.load_module(fqname, fp, pathname, stuff)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 374, in load_module
    m = self.load_package(fqname, pathname)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 526, in load_package
    self.load_module(fqname, fp, buf, stuff)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 402, in load_module
    self.scan_code(co, m)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 475, in scan_code
    self._safe_import_hook(name, m, fromlist, level=0)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 420, in _safe_import_hook
    self.import_hook(name, caller, level=level)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 211, in import_hook
    q, tail = self.find_head_package(parent, name)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 267, in find_head_package
    q = self.import_module(head, qname, parent)
...
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 361, in import_module
    m = self.load_module(fqname, fp, pathname, stuff)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 402, in load_module
    self.scan_code(co, m)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 508, in scan_code
    self.scan_code(c, m)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 508, in scan_code
    self.scan_code(c, m)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 475, in scan_code
    self._safe_import_hook(name, m, fromlist, level=0)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 435, in _safe_import_hook
    self.import_hook(name, caller, [sub], level=level)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 216, in import_hook
    self.ensure_fromlist(m, fromlist)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 306, in ensure_fromlist
    submod = self.import_module(sub, subname, m)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 355, in import_module
    parent and parent.__path__, parent)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 555, in find_module
    return _find_module(name, path)
  File "C:\Users\mick\programming\git\nvda\.venv\lib\site-packages\py2exe\vendor\modulefinder.py", line 89, in _find_module
    spec = importlib.machinery.PathFinder.find_spec(name, path)
  File "<frozen importlib._bootstrap_external>", line 1280, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1246, in _get_spec
TypeError: 'int' object is not iterable

This was not noticed until trying to build the NVDA 2022.1beta1 tag.

Example builds:

Description of how this pull request fixes the issue:

This pr upgrades py2exe to 0.11.1.0.

Testing strategy:

Known issues with pull request:

None known.

Change log entries:

None needed.

New features
Changes
Bug fixes
For Developers

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English

@michaelDCurran michaelDCurran requested a review from a team as a code owner March 20, 2022 05:54
@michaelDCurran michaelDCurran requested review from seanbudd and removed request for a team March 20, 2022 05:54
@michaelDCurran michaelDCurran added this to the 2022.1 milestone Mar 20, 2022
seanbudd
seanbudd previously approved these changes Mar 20, 2022
Copy link
Member

@seanbudd seanbudd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, make sure to update the line in the changes file

@michaelDCurran michaelDCurran merged commit aa62bf8 into beta Mar 20, 2022
@michaelDCurran michaelDCurran deleted the py2exe0.11.1.0 branch March 20, 2022 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants