From: Scott Kitterman Date: Tue, 7 Dec 2021 20:08:04 -0500 Subject: Short circuit root test for building Debian packages Origin: vendor Forwarded: not-needed Last-Update: 2020-04-13 * Patch install.Installer class not to error out when subclassed as DebianInstaller from dh-python --- flit/install.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flit/install.py b/flit/install.py index 50917f1..1aa71c8 100644 --- a/flit/install.py +++ b/flit/install.py @@ -108,7 +108,8 @@ class Installer(object): if (hasattr(os, 'getuid') and (os.getuid() == 0) and (not os.environ.get('FLIT_ROOT_INSTALL'))): - raise RootInstallError + if type(self).__name__ != 'DebianInstaller': + raise RootInstallError if user is None: self.user = self._auto_user(python)