Message408289
The code to copy a file could be rewritten to use a regex match. For example:
# Copy src to dst. If src is a base executable, copy a launcher.
dirname, filename = os.path.split(src)
m = re.match(r'(pythonw?)[0-9._]*((?:_d)?(?:\.exe|\.pdb))$',
filename.lower())
if m is not None:
src = os.path.join(os.path.dirname(__file__),
'scripts', 'nt', m.group(1) + m.group(2))
# If the base environment is a Python source build, use
# the launcher in the build directory instead of
# "Lib/venv/scripts/nt".
if sysconfig.is_python_build(True) or not os.path.isfile(src):
basename = ('venvlauncher' if m.group(1) == 'python' else
'venvwlauncher')
src = os.path.join(dirname, basename + m.group(2)) |
|
Date |
User |
Action |
Args |
2021-12-11 03:21:25 | eryksun | set | recipients:
+ eryksun, paul.moore, vinay.sajip, tim.golden, zach.ware, steve.dower, miss-islington, n_rosenstein, Ian Norton, mitchhentges |
2021-12-11 03:21:25 | eryksun | set | messageid: <1639192885.21.0.319526541302.issue43749@roundup.psfhosted.org> |
2021-12-11 03:21:25 | eryksun | link | issue43749 messages |
2021-12-11 03:21:25 | eryksun | create | |
|