diff --git a/.sonarcloud.properties b/.sonarcloud.properties index 4a69364d..56192197 100644 --- a/.sonarcloud.properties +++ b/.sonarcloud.properties @@ -1 +1 @@ -sonar.python.version=3.10, 3.11 +sonar.python.version=3.10, 3.11, 3.12 diff --git a/scripts/install.ps1 b/scripts/install.ps1 index eda5612f..a3cce96a 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -3,6 +3,12 @@ $dev = If ($Env:GITHUB_JOB -eq 'Build') { '' } Else { '-dev' } # Ensures installation tools are up to date. This also aliases pip to pip3 on MacOS. python -m pip install wheel pip setuptools --upgrade pip install -r "$PSScriptRoot/requirements$dev.txt" --upgrade +# These libraries install extra requirements we don't want +# Open suggestion for support in requirements files: https://github.com/pypa/pip/issues/9948 & https://github.com/pypa/pip/pull/10837 +# pyautogui: We only use it for hotkeys +# ImageHash: uneeded + broken on Python 3.12 PyWavelets install +# scipy: needed for ImageHash +pip install pyautogui ImageHash scipy --no-deps --upgrade # Patch libraries so we don't have to install from git @@ -18,8 +24,11 @@ $libPath = python -c 'import pymonctl as _; print(_.__path__[0])' $libPath = python -c 'import pywinbox as _; print(_.__path__[0])' (Get-Content "$libPath/_pywinbox_win.py").replace('ctypes.windll.shcore.SetProcessDpiAwareness(2)', 'pass') | Set-Content "$libPath/_pywinbox_win.py" -# Uninstall optional dependencies that PyInstaller picks up -python -m pip uninstall pyscreeze mouseinfo pyperclip -y +# Uninstall optional dependencies if pyautogui was installed outside this script +# pyscreeze -> pyscreenshot -> mss deps call SetProcessDpiAwareness +# pygetwindow, pymsgbox, pytweening are picked up by PySide6 (could --exclude from build, but more consistent with unfrozen run) +# mouseinfo, pyperclip, just to be safe? +python -m pip uninstall pyscreeze pyscreenshot mss pygetwindow pymsgbox pytweening -y # Don't compile resources on the Build CI job as it'll do so in build script diff --git a/scripts/requirements.txt b/scripts/requirements.txt index 6edb993b..9501ab57 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -4,19 +4,16 @@ # # Dependencies: certifi -ImageHash>=4.3.1 # Contains type information + setup as package not module +ImageHash>=4.3.1 ; python_version < '3.12' # Contains type information + setup as package not module # PyWavelets install broken on Python 3.12 git+https://github.com/boppreh/keyboard.git#egg=keyboard # Fix install on macos and linux-ci https://github.com/boppreh/keyboard/pull/568 numpy>=1.26 # Python 3.12 support -opencv-python-headless>=4.8.1.78 ; python_version < "3.12" # Typing fixes -# September 18th dev snapshot -https://download.qt.io/snapshots/ci/pyside/dev/a53379153abe1fc3b1ac5625714c6002510c6d73/split_wheels/PySide6_Essentials-6.6.0a1.dev1694513817-cp37-abi3-win_amd64.whl#egg=pyside6-essentials; python_version >= "3.12.0" -https://download.qt.io/snapshots/ci/pyside/dev/a53379153abe1fc3b1ac5625714c6002510c6d73/split_wheels/shiboken6-6.6.0a1.dev1694513817-cp37-abi3-win_amd64.whl#shiboken6 ; python_version >= "3.12.0" +opencv-python-headless>=4.8.1.78 # Typing fixes packaging Pillow>=10.0 # Python 3.12 support psutil>=5.9.6 # Python 3.12 fixes PyAutoGUI PyWinCtl>=0.0.42 # py.typed -PySide6-Essentials>=6.5.1 # fixes incomplete tuple return types https://bugreports.qt.io/browse/PYSIDE-2285 +PySide6-Essentials>=6.6.0 # Python 3.12 support requests>=2.28.2 # charset_normalizer 3.x update toml typing-extensions>=4.4.0 # @override decorator support