From 355603259aa37e424cf7466c3de6518375a935e3 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 6 Nov 2016 16:41:23 -0500 Subject: Add uninstall support for namespace packages --- setuptools/namespaces.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'setuptools/namespaces.py') 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 -- cgit v1.2.3