File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ _piptool_install()
52
52
git_repository (
53
53
name = "subpar" ,
54
54
remote = "https://github.com/google/subpar" ,
55
- tag = "1.0 .0" ,
55
+ tag = "1.1 .0" ,
56
56
)
57
57
58
58
# Test data for WHL tool testing.
Original file line number Diff line number Diff line change @@ -48,8 +48,10 @@ def extract_packages(package_names):
48
48
# Add extracted directories to import path ahead of their zip file
49
49
# counterparts.
50
50
sys .path [0 :0 ] = dirs_to_add
51
- existing_pythonpath = os .environ ['PYTHONPATH' ].split (':' )
52
- os .environ ['PYTHONPATH' ] = ':' .join (dirs_to_add + existing_pythonpath )
51
+ existing_pythonpath = os .environ .get ('PYTHONPATH' )
52
+ if existing_pythonpath :
53
+ dirs_to_add .extend (existing_pythonpath .split (':' ))
54
+ os .environ ['PYTHONPATH' ] = ':' .join (dirs_to_add )
53
55
54
56
55
57
# Wheel, pip, and setuptools are much happier running from actual
@@ -68,7 +70,12 @@ def extract_packages(package_names):
68
70
69
71
70
72
def pip_main (argv ):
71
- argv = ["--disable-pip-version-check" ] + argv
73
+ # Extract the certificates from the PAR following the example of get-pip.py
74
+ # https://github.com/pypa/get-pip/blob/430ba37776ae2ad89/template.py#L164-L168
75
+ cert_path = os .path .join (tempfile .mkdtemp (), "cacert.pem" )
76
+ with open (cert_path , "wb" ) as cert :
77
+ cert .write (pkgutil .get_data ("pip._vendor.requests" , "cacert.pem" ))
78
+ argv = ["--disable-pip-version-check" , "--cert" , cert_path ] + argv
72
79
return pip .main (argv )
73
80
74
81
You can’t perform that action at this time.
0 commit comments