Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py: 62%

8 statements  

« prev     ^ index     » next       coverage.py v7.4.3, created at 2024-02-26 06:33 +0000

1"""This is a subpackage because the directory is on sys.path for _in_process.py 

2 

3The subpackage should stay as empty as possible to avoid shadowing modules that 

4the backend might import. 

5""" 

6 

7import importlib.resources as resources 

8 

9try: 

10 resources.files 

11except AttributeError: 

12 # Python 3.8 compatibility 

13 def _in_proc_script_path(): 

14 return resources.path(__package__, '_in_process.py') 

15else: 

16 def _in_proc_script_path(): 

17 return resources.as_file( 

18 resources.files(__package__).joinpath('_in_process.py'))