File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 33from PyInstaller import __main__ as pyi_main
44
55
6- _APP_SOURCE = """import importlib.resources
6+ # NOTE: importlib.resources.contents is available in py3.7+, but due to how
7+ # pyinstaller handles importlib, we need to use the importlib_resources
8+ # backport if there are any resources methods that are not available in a given
9+ # python version, which ends up being py<3.10
10+ _APP_SOURCE = """
11+ import sys
12+ if sys.version_info >= (3, 10):
13+ from importlib.resources import contents
14+ else:
15+ from importlib_resources import contents
716
817import pydrive2.files
918
1019
11- cache_files = importlib.resources. contents(
20+ cache_files = contents(
1221 "googleapiclient.discovery_cache.documents"
1322)
1423assert len(cache_files) > 0
Original file line number Diff line number Diff line change 99 "flake8-docstrings" ,
1010 "pytest-mock" ,
1111 "pyinstaller" ,
12+ "importlib_resources; python_version < '3.10'" ,
1213]
1314
1415tests_requirements .append ("black==22.10.0" )
You can’t perform that action at this time.
0 commit comments