MCPcopy
hub / github.com/imnowdevops/ddc-material / main

Function main

16.Python/Python-Scripts/get-pip.py:183–202  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

181
182
183def main():
184 tmpdir = None
185 try:
186 # Create a temporary working directory
187 tmpdir = tempfile.mkdtemp()
188
189 # Unpack the zipfile into the temporary directory
190 pip_zip = os.path.join(tmpdir, "pip.zip")
191 with open(pip_zip, "wb") as fp:
192 fp.write(b85decode(DATA.replace(b"\n", b"")))
193
194 # Add the zipfile to sys.path so that we can import it
195 sys.path.insert(0, pip_zip)
196
197 # Run the bootstrap
198 bootstrap(tmpdir=tmpdir)
199 finally:
200 # Clean up our temporary working directory
201 if tmpdir:
202 shutil.rmtree(tmpdir, ignore_errors=True)
203
204
205DATA = b"""

Callers 1

get-pip.pyFile · 0.70

Calls 2

b85decodeFunction · 0.70
bootstrapFunction · 0.70

Tested by

no test coverage detected