aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2022-05-30 21:05:26 -0700
committerBrian Dolbec <dolsen@gentoo.org>2022-05-30 21:05:26 -0700
commit4cd4fb6280433f301ad9159f7473dc32ceb063d6 (patch)
tree09e075ce9a0abe1b5122515b2e8a412e585a429d
parentselectors.py: Fix bug 698528 clear screen on dialog exit (diff)
downloadmirrorselect-4cd4fb6280433f301ad9159f7473dc32ceb063d6.tar.gz
mirrorselect-4cd4fb6280433f301ad9159f7473dc32ceb063d6.tar.bz2
mirrorselect-4cd4fb6280433f301ad9159f7473dc32ceb063d6.zip
setup.py: Migrate from deprecated distutils to setuptools
Gentoo-bug-url: https://bugs.gentoo.org/841131 Signed-off-by: Brian Dolbec <dolsen@gentoo.org>
-rwxr-xr-xsetup.py22
1 files changed, 3 insertions, 19 deletions
diff --git a/setup.py b/setup.py
index 5571711..7c4165c 100755
--- a/setup.py
+++ b/setup.py
@@ -6,13 +6,10 @@ from __future__ import print_function
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'))
@@ -38,7 +35,7 @@ manpage = [os.path.join(cwd, path) for path in (
)]
-class set_version(core.Command):
+class set_version(Command):
"""Set python version to our __version__."""
description = "hardcode scripts' version using VERSION from environment"
user_options = [] # [(long_name, short_name, desc),]
@@ -70,18 +67,6 @@ 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)
-
-
class TestCommand(Command):
user_options = []
@@ -105,7 +90,7 @@ test_data = {
]
}
-core.setup(
+setup(
name='mirrorselect',
version=__version__,
description='Tool for selecting Gentoo source and rsync mirrors.',
@@ -125,7 +110,6 @@ core.setup(
),
cmdclass={
'test': TestCommand,
- 'sdist': x_sdist,
'set_version': set_version,
},
)