rubik / pyg

A Python Package Manager
http://pyg-installer.co.nr
MIT License
21 stars 3 forks source link

Improve uninstaller's file-detection #77

Closed rubik closed 13 years ago

rubik commented 13 years ago

pyg.inst.Uninstaller does not uninstall *.so files, for example.

fdev31 commented 13 years ago

Isn't that a bug ? Do you mean it won't remove .so files of some package or it won't remove .so only packages ?

rubik commented 13 years ago

It doesn't look for *.so files, so it doesn't remove them. I don't know if that is a bug.

fdev31 commented 13 years ago

But shouldn't it look for all installed files instead of filtering ? What is the reason of such a filter ?

rubik commented 13 years ago

There is no filter. The uninstaller simply looks for certain files following the specified patterns:

# Egg files
uninstall_re = re.compile(r'{0}(-(\d\.?)+(\-py\d\.\d)?\.(egg|egg\-info))?$'.format(self.name), re.I)
# Modules (.py) or packages
uninstall_re2 = re.compile(r'{0}(?:(\.py|\.pyc))'.format(self.name), re.I)