Skip to content

Commit

Permalink
Bump opencv and fix imagehash install
Browse files Browse the repository at this point in the history
using workaround that would be better with
pypa/pip#9948 or pypa/pip#10837
  • Loading branch information
Avasam committed Oct 21, 2023
1 parent 0b59591 commit 4147510
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sonar.python.version=3.10, 3.11
sonar.python.version=3.10, 3.11, 3.12
13 changes: 11 additions & 2 deletions scripts/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
9 changes: 3 additions & 6 deletions scripts/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4147510

Please sign in to comment.