To fix the old setup.py, you need to patch it so the "newer" function comes from the right place.
Patch for the PKGBUILD:
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -14,10 +14,12 @@ makedepends=("python-distribute")
source=(
"https://github.com/mupen64plus/mupen64plus-ui-python/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz"
"fix_core_dump_by_int_cast.patch"
+ "fix_setup_py.patch"
)
sha256sums=(
"0223569ec031b6e6c1d96ac51a19b9262cccce7705c84b5ca5044c94afb75fca"
"598672aa8f821a9b28cdeae8a8058661e379460d9f1201104146623dc59ba7c1"
+ "81f41a2212c9a9edf71f2248e92e99e8f3420a1b74762d23d6e91a26d72d5155"
)
prepare() {
@@ -25,6 +27,9 @@ prepare() {
# https://github.com/mupen64plus/mupen64plus-ui-python/issues/191
patch -Np1 -i "${srcdir}/fix_core_dump_by_int_cast.patch"
+
+ # Make setuptools >69 work.
+ patch -Np0 -i "${srcdir}/fix_setup_py.patch"
}
package() {
Patch to fix setup.py:
--- setup.py.orig 2024-02-09 21:14:15.359607270 +0100
+++ setup.py 2024-02-09 21:15:55.391267720 +0100
@@ -15,6 +15,11 @@
import distutils.command.clean as distutils_clean
import setuptools
+try:
+ from setuptools.modified import newer
+except ImportError:
+ from distutils.dep_util import newer
+
# Add the src folder to the path
sys.path.insert(0, os.path.realpath("src"))
@@ -39,7 +44,7 @@
def compile_rc(self, qrc_file):
import PyQt5
py_file = os.path.splitext(qrc_file)[0] + "_rc.py"
- if not distutils.dep_util.newer(qrc_file, py_file):
+ if not newer(qrc_file, py_file):
return
origpath = os.getenv("PATH")
path = origpath.split(os.pathsep)
@@ -54,7 +59,7 @@
def compile_ui(self, ui_file):
from PyQt5 import uic
py_file = os.path.splitext(ui_file)[0] + "_ui.py"
- if not distutils.dep_util.newer(ui_file, py_file):
+ if not newer(ui_file, py_file):
return
with open(py_file, "w") as a_file:
uic.compileUi(ui_file, a_file, from_imports=True)
Pinned Comments
frealgagu commented on 2020-12-05 20:57 (UTC)
I maintain the latest built package at:
https://github.com/frealgagu/archlinux.m64py/releases