commit:     3e66ce81e752dd4ce2ac7a0544df616746ade837
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 10 21:17:51 2022 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sun Jul 10 21:19:13 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e66ce81

app-portage/mirrorselect: Bump to 2.3.0-r1 to fix man page issue

Revert use of setuptools due to incorrect data_files install location

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Brian Dolbec <dolsen <AT> gentoo.org>

 .../files/mirrorselect-2.3.0-setup.py.patch        | 81 ++++++++++++++++++++++
 ...t-2.3.0.ebuild => mirrorselect-2.3.0-r1.ebuild} |  6 +-
 app-portage/mirrorselect/mirrorselect-9999.ebuild  |  2 +-
 3 files changed, 87 insertions(+), 2 deletions(-)

diff --git a/app-portage/mirrorselect/files/mirrorselect-2.3.0-setup.py.patch 
b/app-portage/mirrorselect/files/mirrorselect-2.3.0-setup.py.patch
new file mode 100644
index 000000000000..6b2e074c0878
--- /dev/null
+++ b/app-portage/mirrorselect/files/mirrorselect-2.3.0-setup.py.patch
@@ -0,0 +1,81 @@
+From 5444d0ddb5268325aac63dcdeb908b614916dd0f Mon Sep 17 00:00:00 2001
+From: Brian Dolbec <dol...@gentoo.org>
+Date: Sun, 10 Jul 2022 13:54:45 -0700
+Subject: [PATCH] Revert "setup.py: Migrate from deprecated distutils to 
setuptools"
+
+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 <dol...@gentoo.org>
+---
+ setup.py | 22 +++++++++++++++++++---
+ 1 file changed, 19 insertions(+), 3 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 9111d5e..a9728fa 100755
+--- a/setup.py
++++ b/setup.py
+@@ -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,
+       },
+ )
+--
+libgit2 1.4.3
+

diff --git a/app-portage/mirrorselect/mirrorselect-2.3.0.ebuild 
b/app-portage/mirrorselect/mirrorselect-2.3.0-r1.ebuild
similarity index 92%
rename from app-portage/mirrorselect/mirrorselect-2.3.0.ebuild
rename to app-portage/mirrorselect/mirrorselect-2.3.0-r1.ebuild
index 140f530d2904..063dbe74d8c3 100644
--- a/app-portage/mirrorselect/mirrorselect-2.3.0.ebuild
+++ b/app-portage/mirrorselect/mirrorselect-2.3.0-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI="8"
 
-DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_USE_SETUPTOOLS=no
 PYTHON_COMPAT=( python3_{8..10} )
 PYTHON_REQ_USE="xml"
 
@@ -26,6 +26,10 @@ RDEPEND="
        >=dev-python/ssl-fetch-0.3[${PYTHON_USEDEP}]
 "
 
+PATCHES=(
+       "${FILESDIR}/mirrorselect-2.3.0-setup.py.patch"
+)
+
 python_prepare_all() {
        python_setup
        eprefixify setup.py mirrorselect/main.py

diff --git a/app-portage/mirrorselect/mirrorselect-9999.ebuild 
b/app-portage/mirrorselect/mirrorselect-9999.ebuild
index 505417a219e3..b84d0b9c191a 100644
--- a/app-portage/mirrorselect/mirrorselect-9999.ebuild
+++ b/app-portage/mirrorselect/mirrorselect-9999.ebuild
@@ -3,7 +3,7 @@
 
 EAPI="8"
 
-DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_USE_SETUPTOOLS=no
 PYTHON_COMPAT=( python3_{8..10} )
 PYTHON_REQ_USE="xml"
 

Reply via email to