MCPcopy Index your code
hub / github.com/python/cpython / patchScript

Function patchScript

Mac/BuildScript/build-installer.py:1415–1423  ·  view source on GitHub ↗
(inPath, outPath)

Source from the content-addressed store, hash-verified

1413 fp.close()
1414
1415def patchScript(inPath, outPath):
1416 major, minor = getVersionMajorMinor()
1417 data = fileContents(inPath)
1418 data = data.replace('@PYMAJOR@', str(major))
1419 data = data.replace('@PYVER@', getVersion())
1420 fp = open(outPath, 'w')
1421 fp.write(data)
1422 fp.close()
1423 os.chmod(outPath, STAT_0o755)
1424
1425
1426

Callers 2

packageFromRecipeFunction · 0.85
mainFunction · 0.85

Calls 9

getVersionMajorMinorFunction · 0.85
fileContentsFunction · 0.85
strFunction · 0.85
getVersionFunction · 0.85
openFunction · 0.50
replaceMethod · 0.45
writeMethod · 0.45
closeMethod · 0.45
chmodMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…