Opened 6 years ago

Closed 6 years ago

#57521 closed defect (fixed)

py37-pyqt5: Patch failure on 10.7

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: mamoll (Mark Moll)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py-pyqt5

Description

py37-pyqt5 fails to patch:

--->  Applying patch-use-default-sip.diff
DEBUG: Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-pyqt5/py37-pyqt5/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.7'
Executing:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-pyqt5/py37-pyqt5/work/PyQt5_gpl-5.9.2" && /usr/bin/patch -p0 < '/opt/bblocal/var/buildworker/ports/build/ports/python/py-pyqt5/files/patch-use-default-sip.diff'
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-pyqt5/py37-pyqt5/work/PyQt5_gpl-5.9.2" && /usr/bin/patch -p0 < '/opt/bblocal/var/buildworker/ports/build/ports/python/py-pyqt5/files/patch-use-default-sip.diff'
patching file configure.py
Hunk #1 FAILED at 644.
Hunk #2 FAILED at 2438.
patch unexpectedly ends in middle of line
Hunk #3 FAILED at 2916.
3 out of 3 hunks FAILED -- saving rejects to file configure.py.rej
Command failed:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_python_py-pyqt5/py37-pyqt5/work/PyQt5_gpl-5.9.2" && /usr/bin/patch -p0 < '/opt/bblocal/var/buildworker/ports/build/ports/python/py-pyqt5/files/patch-use-default-sip.diff'
Exit code: 1

Change History (4)

comment:1 Changed 6 years ago by michaelld (Michael Dickens)

Summary: py37-pyqt5: Patch failurepy37-pyqt5: Patch failure on 10.7

comment:2 Changed 6 years ago by mamoll (Mark Moll)

Is this an acceptable fix?:

diff --git a/python/py-pyqt5/Portfile b/python/py-pyqt5/Portfile
index 1eb4f416c3..ad9e994dda 100644
--- a/python/py-pyqt5/Portfile
+++ b/python/py-pyqt5/Portfile
@@ -71,8 +71,11 @@ if {${name} ne ${subport}} {
     # the DBus headers themselves
     # do not clear include directories just because --dbus is given
     patchfiles-append patch-dbus_includes.diff
-    # PyQt5 insists on using a private copy of sip, but the default sip seems to work just fine
-    patchfiles-append patch-use-default-sip.diff
+    # only use patch on current version, not the pegged version for older versions of macOS
+    if {${os.major} > 14 || ${os.platform} ne "darwin"} {
+        # PyQt5 insists on using a private copy of sip, but the default sip seems to work just fine
+        patchfiles-append patch-use-default-sip.diff
+    }
 
     build.cmd           make
     build.target        all

comment:3 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

It does look like patch-use-default-sip.diff was introduced when pyqt5 was updated to 5.11.2, so excluding the patch for pyqt5 5.9.2 used on older systems does seem fine. But see also #56601 which still has questions about pinning older OS versions to this version.

comment:4 Changed 6 years ago by mamoll (Mark Moll)

Resolution: fixed
Status: assignedclosed

In 1a2966a8ff79c4f736c54063275bf495667cb281/macports-ports (master):

py-pyqt5: don't use sip patch for pinned version. closes #57521

Note: See TracTickets for help on using tickets.