You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
971 B

  1. diff --git a/pip/_vendor/pep517/in_process/__init__.py b/pip/_vendor/pep517/in_process/__init__.py
  2. index c932313..a01143b 100644
  3. --- a/pip/_vendor/pep517/in_process/__init__.py
  4. +++ b/pip/_vendor/pep517/in_process/__init__.py
  5. @@ -10,8 +10,13 @@ try:
  6. import importlib.resources as resources
  7. def _in_proc_script_path():
  8. - return resources.path(__package__, '_in_process.py')
  9. + if resources.is_resource(__package__, '_in_process.py'):
  10. + return resources.path(__package__, '_in_process.py')
  11. + return resources.path(__package__, '_in_process.pyc')
  12. except ImportError:
  13. @contextmanager
  14. def _in_proc_script_path():
  15. - yield pjoin(dirname(abspath(__file__)), '_in_process.py')
  16. + _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.py')
  17. + if not os.path.isfile(_in_proc_script):
  18. + _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.pyc')
  19. + yield _in_proc_script