cpython: c7d0fc181376 (original) (raw)
Mercurial > cpython
changeset 69001:c7d0fc181376 3.2
Martin v. Löwis martin@v.loewis.de | |
---|---|
date | Sun, 27 Mar 2011 10:14:57 +0200 |
parents | d5c819d597fe(current diff)fd8336947f90(diff) |
children | a7e0a1dbfbb6 74f9ed48ae5d |
files | Lib/msilib/__init__.py Misc/NEWS |
diffstat | 2 files changed, 19 insertions(+), 8 deletions(-)[+] [-] Lib/msilib/__init__.py 25 Misc/NEWS 2 |
line wrap: on
line diff
--- a/Lib/msilib/init.py +++ b/Lib/msilib/init.py @@ -173,10 +173,10 @@ def add_tables(db, module): def make_id(str): #str = str.replace(".", "_") # colons are allowed
- str = str.replace(" ", "_")
- str = str.replace("-", "_")
- if str[0] in string.digits:
str = "_"+str[](#l1.10)
- for c in " -+~;":
str = str.replace(c, "_")[](#l1.12)
- if str[0] in (string.digits + "."):
assert re.match("^[A-Za-z_][A-Za-z0-9_.]*$", str), "FILE"+str return str @@ -284,19 +284,28 @@ class Directory: [(feature.id, component)])str = "_" + str[](#l1.14)
oldfile = file[](#l1.22)
file = file.replace('+', '_')[](#l1.23)
file = ''.join(c for c in file if not c in ' "/\[]:;=,')[](#l1.24) parts = file.split(".")[](#l1.25)
if len(parts)>1:[](#l1.26)
if len(parts) > 1:[](#l1.27)
prefix = "".join(parts[:-1]).upper()[](#l1.28) suffix = parts[-1].upper()[](#l1.29)
if not prefix:[](#l1.30)
prefix = suffix[](#l1.31)
suffix = None[](#l1.32) else:[](#l1.33)
prefix = file.upper()[](#l1.34) suffix = None[](#l1.35)
prefix = parts[0].upper()[](#l1.36)
if len(prefix) <= 8 and (not suffix or len(suffix)<=3):[](#l1.37)
if len(parts) < 3 and len(prefix) <= 8 and file == oldfile and ([](#l1.38)
not suffix or len(suffix) <= 3):[](#l1.39) if suffix:[](#l1.40) file = prefix+"."+suffix[](#l1.41) else:[](#l1.42) file = prefix[](#l1.43)
assert file not in self.short_names[](#l1.44) else:[](#l1.45)
file = None[](#l1.46)
if file is None or file in self.short_names:[](#l1.47) prefix = prefix[:6][](#l1.48) if suffix:[](#l1.49) suffix = suffix[:3][](#l1.50)
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -53,6 +53,8 @@ Core and Builtins Library ------- +- Issue #7639: Fix short file name generation in bdist_msi +