File tree 1 file changed +2
-6
lines changed
src/pip/_internal/commands
1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change
1
+ import importlib .resources
1
2
import locale
2
3
import logging
3
4
import os
10
11
from pip ._vendor .certifi import where
11
12
from pip ._vendor .packaging .version import parse as parse_version
12
13
13
- from pip import __file__ as pip_location
14
14
from pip ._internal .cli import cmdoptions
15
15
from pip ._internal .cli .base_command import Command
16
16
from pip ._internal .cli .cmdoptions import make_target_python
@@ -35,11 +35,7 @@ def show_sys_implementation() -> None:
35
35
36
36
37
37
def create_vendor_txt_map () -> Dict [str , str ]:
38
- vendor_txt_path = os .path .join (
39
- os .path .dirname (pip_location ), "_vendor" , "vendor.txt"
40
- )
41
-
42
- with open (vendor_txt_path ) as f :
38
+ with importlib .resources .open_text ("pip._vendor" , "vendor.txt" ) as f :
43
39
# Purge non version specifying lines.
44
40
# Also, remove any space prefix or suffixes (including comments).
45
41
lines = [
You can’t perform that action at this time.
0 commit comments