aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/namespaces.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-11-06 16:41:23 -0500
committerJason R. Coombs <jaraco@jaraco.com>2016-11-06 16:41:23 -0500
commit355603259aa37e424cf7466c3de6518375a935e3 (patch)
tree44882a2534fbdf9165d4491b5b1faa59c72f45de /setuptools/namespaces.py
parent14827711f669a830190313951ab5aef7b71ab2c6 (diff)
downloadexternal_python_setuptools-355603259aa37e424cf7466c3de6518375a935e3.tar.gz
external_python_setuptools-355603259aa37e424cf7466c3de6518375a935e3.tar.bz2
external_python_setuptools-355603259aa37e424cf7466c3de6518375a935e3.zip
Add uninstall support for namespace packages
Diffstat (limited to 'setuptools/namespaces.py')
-rwxr-xr-xsetuptools/namespaces.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/setuptools/namespaces.py b/setuptools/namespaces.py
index cc934b7e..a6371c99 100755
--- a/setuptools/namespaces.py
+++ b/setuptools/namespaces.py
@@ -30,6 +30,14 @@ class Installer:
with open(filename, 'wt') as f:
f.writelines(lines)
+ def uninstall_namespaces(self):
+ filename, ext = os.path.splitext(self._get_target())
+ filename += self.nspkg_ext
+ if not os.path.exists(filename):
+ return
+ log.info("Removing %s", filename)
+ os.remove(filename)
+
def _get_target(self):
return self.target