Gentoo Archives: gentoo-commits

From: Brian Dolbec <dolsen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mirrorselect:master commit in: /
Date: Tue, 31 May 2022 04:08:51
Message-Id: 1653969926.4cd4fb6280433f301ad9159f7473dc32ceb063d6.dolsen@gentoo
1 commit: 4cd4fb6280433f301ad9159f7473dc32ceb063d6
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 31 04:05:26 2022 +0000
4 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
5 CommitDate: Tue May 31 04:05:26 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/mirrorselect.git/commit/?id=4cd4fb62
7
8 setup.py: Migrate from deprecated distutils to setuptools
9
10 Gentoo-bug-url: https://bugs.gentoo.org/841131
11 Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>
12
13 setup.py | 22 +++-------------------
14 1 file changed, 3 insertions(+), 19 deletions(-)
15
16 diff --git a/setup.py b/setup.py
17 index 5571711..7c4165c 100755
18 --- a/setup.py
19 +++ b/setup.py
20 @@ -6,13 +6,10 @@ from __future__ import print_function
21
22 import re
23 import sys
24 -from distutils import core, log
25 -from distutils.command.sdist import sdist
26 -from distutils.core import Command
27 -
28 import os
29 import io
30 import unittest
31 +from setuptools import setup, Command
32
33
34 __version__ = os.getenv('VERSION', default=os.getenv('PVR', default='9999'))
35 @@ -38,7 +35,7 @@ manpage = [os.path.join(cwd, path) for path in (
36 )]
37
38
39 -class set_version(core.Command):
40 +class set_version(Command):
41 """Set python version to our __version__."""
42 description = "hardcode scripts' version using VERSION from environment"
43 user_options = [] # [(long_name, short_name, desc),]
44 @@ -70,18 +67,6 @@ class set_version(core.Command):
45 sub(manpage, man_re)
46
47
48 -class x_sdist(sdist):
49 - """sdist defaulting to archive files owned by root."""
50 -
51 - def finalize_options(self):
52 - if self.owner is None:
53 - self.owner = 'root'
54 - if self.group is None:
55 - self.group = 'root'
56 -
57 - sdist.finalize_options(self)
58 -
59 -
60 class TestCommand(Command):
61 user_options = []
62
63 @@ -105,7 +90,7 @@ test_data = {
64 ]
65 }
66
67 -core.setup(
68 +setup(
69 name='mirrorselect',
70 version=__version__,
71 description='Tool for selecting Gentoo source and rsync mirrors.',
72 @@ -125,7 +110,6 @@ core.setup(
73 ),
74 cmdclass={
75 'test': TestCommand,
76 - 'sdist': x_sdist,
77 'set_version': set_version,
78 },
79 )