machawk1 / wail

:whale2: Web Archiving Integration Layer: One-Click User Instigated Preservation
https://matkelly.com/wail
MIT License
345 stars 32 forks source link

Update to build with Python 3.10 (dependent on wxPython support) #543

Closed machawk1 closed 1 year ago

machawk1 commented 2 years ago

Pyinstaller does not yet support Py 3.10 when using the releases, though this was slated to be updated with a new release of Pyinstaller following the release of Py 3.10.

https://github.com/pyinstaller/pyinstaller/issues/5693

Currently building WAIL w/ the latest release of Pyinstaller on macOS 11.6 arm64 Py 3.10 fails.

machawk1 commented 2 years ago

This might be resolved with https://github.com/pyinstaller/pyinstaller/pull/5694.

machawk1 commented 2 years ago

A new version of pyinstaller with support for Python 3.10 was released on October 29, 2021.

machawk1 commented 2 years ago

wxPython appears to not support Python 3.10 as of release 4.1.1. Full trace attached due to GitHub rejecting it in a comment due to length:

wxpython411_python_310.txt

machawk1 commented 2 years ago

https://discuss.wxpython.org/t/serious-upgrade-problem/35604 suggests that building wxPython from source using Python 3.10 might remedy the issue. Task added to original message.

machawk1 commented 2 years ago

Also note in the left navigation at https://pypi.org/project/wxPython/#files that Python 3.10 is not listed as supported. 3.10 is now listed as a supported version of Python on PyPI.

machawk1 commented 2 years ago

Installing snapshots of wxPython: https://wxpython.org/Phoenix/snapshot-builds/README.txt

% python3 --version
Python 3.10.0
 % python3 -m pip install -U --pre \
        -f https://wxpython.org/Phoenix/snapshot-builds/ \
        wxPython
Looking in links: https://wxpython.org/Phoenix/snapshot-builds/
Collecting wxPython
  Using cached https://wxpython.org/Phoenix/snapshot-builds/wxPython-4.1.2a1.dev5310%2Baf8cca51.tar.gz (66.9 MB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: pillow in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from wxPython) (8.3.2)
Requirement already satisfied: six in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from wxPython) (1.11.0)
Requirement already satisfied: numpy in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from wxPython) (1.21.2)
Using legacy 'setup.py install' for wxPython, since package 'wheel' is not installed.
Installing collected packages: wxPython
  Running setup.py install for wxPython ... error
  error: subprocess-exited-with-error

  × Running setup.py install for wxPython did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/dist.py:697: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead
        warnings.warn(
      running install
      running build
      WARNING: Building this way assumes that all generated files have been
      generated already.  If that is not the case then use build.py directly
      to generate the source and perform the build stage.  You can use
      --skip-build with the bdist_* or install commands to avoid this
      message and the wxWidgets and Phoenix build steps in the future.

      "/Library/Frameworks/Python.framework/Versions/3.10/bin/python3" -u build.py build
      /private/var/folders/s2/dqb5xbtj2x90kksrxdg5lhym0000gp/T/pip-install-m0xmhlwh/wxpython_ecc5c13bb5c7498bae7b624b8b5ae807/build.py:42: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
        from distutils.dep_util import newer, newer_group
      Traceback (most recent call last):
        File "/private/var/folders/s2/dqb5xbtj2x90kksrxdg5lhym0000gp/T/pip-install-m0xmhlwh/wxpython_ecc5c13bb5c7498bae7b624b8b5ae807/build.py", line 49, in <module>
          from buildtools.wxpysip import sip_runner
        File "/private/var/folders/s2/dqb5xbtj2x90kksrxdg5lhym0000gp/T/pip-install-m0xmhlwh/wxpython_ecc5c13bb5c7498bae7b624b8b5ae807/buildtools/wxpysip.py", line 20, in <module>
          from sipbuild.code_generator import (set_globals, parse, generateCode,
      ModuleNotFoundError: No module named 'sipbuild'
      Command '"/Library/Frameworks/Python.framework/Versions/3.10/bin/python3" -u build.py build' failed with exit code 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> wxPython

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Also updated to Python 3.10.4 and encountered the same result.

machawk1 commented 2 years ago

https://github.com/wxWidgets/Phoenix/issues/2128 shows some users still waiting on an official wheel that supports Python 3.10.

ChrisBarker-NOAA commented 2 years ago

Yup -- and a new release would be nice in any case :-)

@RobinD42: I notice you've pushed changes lately -- let us know if you need some help getting a release out.

machawk1 commented 1 year ago

wxPython was released on August 7, 2022, so this should be re-tested.