diff options
author | Brian Dolbec <dolsen@gentoo.org> | 2022-07-10 13:54:45 -0700 |
---|---|---|
committer | Brian Dolbec <dolsen@gentoo.org> | 2022-07-10 13:54:45 -0700 |
commit | 5444d0ddb5268325aac63dcdeb908b614916dd0f (patch) | |
tree | 54fabf921c3affe22447f63703630d8abab09e2d | |
parent | Some py2 compat. cleanup (diff) | |
download | mirrorselect-5444d0ddb5268325aac63dcdeb908b614916dd0f.tar.gz mirrorselect-5444d0ddb5268325aac63dcdeb908b614916dd0f.tar.bz2 mirrorselect-5444d0ddb5268325aac63dcdeb908b614916dd0f.zip |
Revert "setup.py: Migrate from deprecated distutils to setuptools"2.3.0-rc1
This reverts commit 4cd4fb6280433f301ad9159f7473dc32ceb063d6.
setuptools is installing data_file to the pkg dir inside python.
Reverting back to distutils for correct install for now.
Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
-rwxr-xr-x | setup.py | 22 |
1 files changed, 19 insertions, 3 deletions
@@ -5,10 +5,13 @@ import logging import re import sys +from distutils import core, log +from distutils.command.sdist import sdist +from distutils.core import Command + import os import io import unittest -from setuptools import setup, Command __version__ = os.getenv('VERSION', default=os.getenv('PVR', default='9999')) @@ -34,7 +37,7 @@ manpage = [os.path.join(cwd, path) for path in ( )] -class set_version(Command): +class set_version(core.Command): """Set python version to our __version__.""" description = "hardcode scripts' version using VERSION from environment" user_options = [] # [(long_name, short_name, desc),] @@ -66,6 +69,18 @@ class set_version(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) + + class TestCommand(Command): user_options = [] @@ -89,7 +104,7 @@ test_data = { ] } -setup( +core.setup( name='mirrorselect', version=__version__, description='Tool for selecting Gentoo source and rsync mirrors.', @@ -109,6 +124,7 @@ setup( ), cmdclass={ 'test': TestCommand, + 'sdist': x_sdist, 'set_version': set_version, }, ) |