commit:     1f6a527ae298f9eba93cecc1426204410588a25b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 30 12:48:50 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Nov 30 12:58:25 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f6a527a

games-emulation/m64py: Fix building with setuptools-69

Thanks to @FireBurn for the fix on the upstream bug.

Bug: https://github.com/mupen64plus/mupen64plus-ui-python/issues/227
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../files/m64py-0.2.5_p20211222-setuptools-69.patch     | 17 +++++++++++++++++
 games-emulation/m64py/m64py-0.2.5_p20211222.ebuild      |  6 +++++-
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git 
a/games-emulation/m64py/files/m64py-0.2.5_p20211222-setuptools-69.patch 
b/games-emulation/m64py/files/m64py-0.2.5_p20211222-setuptools-69.patch
new file mode 100644
index 000000000000..cb61839776e0
--- /dev/null
+++ b/games-emulation/m64py/files/m64py-0.2.5_p20211222-setuptools-69.patch
@@ -0,0 +1,17 @@
+diff --git a/setup.py b/setup.py
+index b68b6e3..270291d 100644
+--- a/setup.py
++++ b/setup.py
+@@ -15,6 +15,12 @@ import distutils.command.build as distutils_build
+ import distutils.command.clean as distutils_clean
+ import setuptools
+ 
++try:
++    import setuptools.modified
++    distutils.dep_util = setuptools.modified
++except ImportError:
++    pass
++
+ # Add the src folder to the path
+ sys.path.insert(0, os.path.realpath("src"))
+ 

diff --git a/games-emulation/m64py/m64py-0.2.5_p20211222.ebuild 
b/games-emulation/m64py/m64py-0.2.5_p20211222.ebuild
index caad3fcc70d1..2b4004c0ee48 100644
--- a/games-emulation/m64py/m64py-0.2.5_p20211222.ebuild
+++ b/games-emulation/m64py/m64py-0.2.5_p20211222.ebuild
@@ -44,11 +44,15 @@ RDEPEND="
        )
 "
 BDEPEND="
-       <dev-python/setuptools-69
        dev-qt/linguist-tools:5
 "
 
 python_prepare_all() {
+       local PATCHES=(
+               # 
https://github.com/mupen64plus/mupen64plus-ui-python/issues/227
+               "${FILESDIR}/${P}-setuptools-69.patch"
+       )
+
        # set the correct search path
        cat >> src/m64py/platform.py <<-_EOF_ || die
                SEARCH_DIRS = ["/usr/$(get_libdir)/mupen64plus"]

Reply via email to