Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d0191f0

Browse filesBrowse files
AustinSchuhbrandjon
authored andcommitted
Remove the temporary directory containing cacert.pem when done (bazel-contrib#169)
Our verification machines were filling up /tmp/ with this temporary folder. This patch removes it when piptool exits.
1 parent 120590e commit d0191f0
Copy full SHA for d0191f0

File tree

Expand file treeCollapse file tree

2 files changed

+3
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-1
lines changed

‎rules_python/piptool.py

Copy file name to clipboardExpand all lines: rules_python/piptool.py
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ def extract_packages(package_names):
7373
def pip_main(argv):
7474
# Extract the certificates from the PAR following the example of get-pip.py
7575
# https://github.com/pypa/get-pip/blob/430ba37776ae2ad89/template.py#L164-L168
76-
cert_path = os.path.join(tempfile.mkdtemp(), "cacert.pem")
76+
cert_tmpdir = tempfile.mkdtemp()
77+
cert_path = os.path.join(cert_tmpdir, "cacert.pem")
78+
atexit.register(lambda: shutil.rmtree(cert_tmpdir, ignore_errors=True))
7779
with open(cert_path, "wb") as cert:
7880
cert.write(pkgutil.get_data("pip._vendor.requests", "cacert.pem"))
7981
argv = ["--disable-pip-version-check", "--cert", cert_path] + argv

‎tools/piptool.par

Copy file name to clipboard
212 Bytes
Binary file not shown.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.