diff options
author | 2019-02-13 00:40:52 -0800 | |
---|---|---|
committer | 2019-02-13 00:42:04 -0800 | |
commit | 7d5fd760f68c19156a6766cdea77c291513cac12 (patch) | |
tree | 33bae9e0c032975a5d22c12376d33d9e1067ee1e | |
parent | selectors.py: Give urllib hostname info (bug 604968) (diff) | |
download | mirrorselect-7d5fd760f68c19156a6766cdea77c291513cac12.tar.gz mirrorselect-7d5fd760f68c19156a6766cdea77c291513cac12.tar.bz2 mirrorselect-7d5fd760f68c19156a6766cdea77c291513cac12.zip |
setup.py: extend sdist to archive files owned by root
Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rwxr-xr-x | setup.py | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -7,6 +7,7 @@ from __future__ import print_function import re import sys from distutils import core, log +from distutils.command.sdist import sdist import os import io @@ -67,6 +68,18 @@ class set_version(core.Command): sub(manpage, man_re) +class x_sdist(sdist): + """sdist defaulting to archive files owned by root.""" + + def finalize_options(self): + if self.owner is None: + self.owner = 'root' + if self.group is None: + self.group = 'root' + + sdist.finalize_options(self) + + def load_test(): """Only return the real test class if it's actually being run so that we don't depend on snakeoil just to install.""" @@ -113,6 +126,7 @@ core.setup( ), cmdclass={ 'test': load_test(), + 'sdist': x_sdist, 'set_version': set_version, }, ) |