diff --git a/mypy.ini b/mypy.ini index abb6d6b3a..4883c5c31 100644 --- a/mypy.ini +++ b/mypy.ini @@ -13,6 +13,12 @@ warn_unused_ignores = True # types-setuptools [mypy-setuptools.*] ignore_missing_imports = True +# pkg_resources is part of setuptools but has separate stubs that are outdated +[mypy-pkg_resources.*] +ignore_missing_imports = True +# pkg_resources API changed in setuptools 81+ and stubs are outdated +[mypy-gprofiler.metadata.py_module_version] +disable_error_code = attr-defined # no types in package / types- package :( [mypy-configargparse.*] ignore_missing_imports = True diff --git a/pyinstaller.spec b/pyinstaller.spec index 03f0558f6..7c91bdfbb 100644 --- a/pyinstaller.spec +++ b/pyinstaller.spec @@ -6,7 +6,7 @@ a = Analysis(scripts=['pyi_build.py'], pathex=['/app'], binaries=[], datas=[('gprofiler/resources', 'gprofiler/resources')], - hiddenimports=['backports.tarfile'], + hiddenimports=['backports.tarfile', 'pkg_resources'], hookspath=[], runtime_hooks=[], excludes=['readline'], diff --git a/requirements.txt b/requirements.txt index 5abaf6c79..fbad9d5e8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ psutil==7.0.0 requests==2.33.0 ConfigArgParse==1.7 distro==1.9.0 -setuptools==78.1.1 # For pkg_resources +setuptools==83.0.0 # For pkg_resources packaging==24.2 pyelftools~=0.32 curlify==2.2.1 diff --git a/scripts/check_pyinstaller.sh b/scripts/check_pyinstaller.sh index 348b0dc3e..1aadb2642 100755 --- a/scripts/check_pyinstaller.sh +++ b/scripts/check_pyinstaller.sh @@ -17,7 +17,7 @@ set -uo pipefail # grep returns 0 if a match is found and 1 if no match is found -result=$(grep "gprofiler\." "build/pyinstaller/warn-pyinstaller.txt" | grep -v 'missing module named wmi' | grep -v 'missing module named pythoncom' | grep -v 'missing module named netifaces' | grep -v 'missing module named cpuid') +result=$(grep "gprofiler\." "build/pyinstaller/warn-pyinstaller.txt" | grep -v 'missing module named wmi' | grep -v 'missing module named pythoncom' | grep -v 'missing module named netifaces' | grep -v 'missing module named cpuid' | grep -v 'missing module named pkg_resources') if [ -n "$result" ]; then echo "$result"