55290e2b5b7b4ed3e678282a49a11da6f3b2de78,src/python/pants/binaries/binary_util.py,BinaryUtil,select_binary,#BinaryUtil#Any#Any#Any#,176
Before Change
// TODO(John Sirois): finish doc of the path structure expected under base_path
binary_path = self._select_binary_base_path(supportdir, version, name)
bootstrap_dir = os.path.realpath(os.path.expanduser(self._pants_bootstrapdir))
bootstrapped_binary_path = os.path.join(bootstrap_dir, binary_path)
if not os.path.exists(bootstrapped_binary_path):
downloadpath = bootstrapped_binary_path + "~"
try:
with self._select_binary_stream(supportdir, version, name) as stream:
with safe_open(downloadpath, "wb") as bootstrapped_binary:
bootstrapped_binary.write(stream())
os.rename(downloadpath, bootstrapped_binary_path)
chmod_plus_x(bootstrapped_binary_path)
finally:
safe_delete(downloadpath)
logger.debug("Selected {binary} binary bootstrapped to: {path}"
.format(binary=name, path=bootstrapped_binary_path))
return bootstrapped_binary_path
After Change
// TODO(John Sirois): finish doc of the path structure expected under base_path.
binary_path = self._select_binary_base_path(supportdir, version, name)
return self._fetch_binary(name=name, binary_path=binary_path)
def select_script(self, supportdir, version, name):
Selects a platform-independent script.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances
Project Name: pantsbuild/pants
Commit Name: 55290e2b5b7b4ed3e678282a49a11da6f3b2de78
Time: 2015-10-21
Author: benjyw@gmail.com
File Name: src/python/pants/binaries/binary_util.py
Class Name: BinaryUtil
Method Name: select_binary
Project Name: pyinstaller/pyinstaller
Commit Name: 473e4cfe41c6acb2740832fbfbfe5a6d3b37776d
Time: 2020-12-08
Author: rok.mandeljc@gmail.com
File Name: PyInstaller/utils/hooks/__init__.py
Class Name:
Method Name: exec_script
Project Name: pantsbuild/pants
Commit Name: 55290e2b5b7b4ed3e678282a49a11da6f3b2de78
Time: 2015-10-21
Author: benjyw@gmail.com
File Name: src/python/pants/binaries/binary_util.py
Class Name: BinaryUtil
Method Name: select_binary
Project Name: pantsbuild/pants
Commit Name: 3553fd8dd597907c39c4b840ba9cc15e2ec61428
Time: 2015-02-25
Author: dturner@twopensource.com
File Name: src/python/pants/backend/jvm/targets/jvm_binary.py
Class Name: Bundle
Method Name: add