diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2010-08-06 10:43:31 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2010-08-06 10:43:31 (GMT) |
commit | 2e3d539ce2d4b91e3353e890858f8f8de6215d25 (patch) | |
tree | 5a0104478e83b3eb173aafba89e1f34b5e7fd6f5 /Tools | |
parent | 38bf2ccf4c461a1c65aafffccb87ddb38cf52b5c (diff) | |
download | cpython-2e3d539ce2d4b91e3353e890858f8f8de6215d25.zip cpython-2e3d539ce2d4b91e3353e890858f8f8de6215d25.tar.gz cpython-2e3d539ce2d4b91e3353e890858f8f8de6215d25.tar.bz2 |
Change pyc removal to support __pycache__.
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/msi/msilib.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Tools/msi/msilib.py b/Tools/msi/msilib.py index 38fef8c..8f73934 100644 --- a/Tools/msi/msilib.py +++ b/Tools/msi/msilib.py @@ -583,10 +583,17 @@ class Directory: return files def remove_pyc(self): - "Remove .pyc/.pyo files on uninstall" + "Remove .pyc/.pyo files from __pycache__ on uninstall" + directory = self.logical + "_pycache" + add_data(self.db, "Directory", [(directory, self.logical, "__PYCA~1|__pycache__")]) + flags = 256 if Win64 else 0 + add_data(self.db, "Component", + [(directory, gen_uuid(), directory, flags, None, None)]) + add_data(self.db, "FeatureComponents", [(current_feature.id, directory)]) + add_data(self.db, "CreateFolder", [(directory, directory)]) add_data(self.db, "RemoveFile", - [(self.component+"c", self.component, "*.pyc", self.logical, 2), - (self.component+"o", self.component, "*.pyo", self.logical, 2)]) + [(self.component, self.component, "*.*", directory, 2), + ]) def removefile(self, key, pattern): "Add a RemoveFile entry" |