Opened 11 years ago

Closed 10 years ago

#39270 closed defect (fixed)

python27: building "Build Applet.app" fails on 10.8 due to removed QuickDraw headers

Reported by: d.schreij@… Owned by: jyrkiwahlstedt
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: mountainlion Cc: macports.org@…
Port: python27

Description

Python27 (2.7.5) builds fine, but when staged into destroot, the process stops with the message:

:info:destroot Traceback (most recent call last):
:info:destroot   File "./scripts/BuildApplet.py", line 16, in <module>
:info:destroot     import EasyDialogs
:info:destroot   File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.5/Lib/plat-mac/EasyDialogs.py", line 247, in <module>
:info:destroot     screenbounds = Qd.GetQDGlobalsScreenBits().bounds
:info:destroot AttributeError: 'module' object has no attribute 'GetQDGlobalsScreenBits'
:info:destroot make[1]: *** [install_BuildApplet] Error 1

For further insight I have attached the main.log as well I am aware that I'm building with the i386 arch, but that is strict a requirement of the current project I'm working on

Attachments (2)

main.log (1.5 MB) - added by d.schreij@… 11 years ago.
Main.log
skip-Build-Applet.patch (6.0 KB) - added by larryv (Lawrence Velázquez) 11 years ago.
backport upstream fix

Download all attachments as: .zip

Change History (14)

Changed 11 years ago by d.schreij@…

Attachment: main.log added

Main.log

comment:1 Changed 11 years ago by d.schreij@…

Cc: d.schreij@… added

Cc Me!

comment:2 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jmr@… d.schreij@… removed
Owner: changed from macports-tickets@… to jmr@…

comment:3 Changed 11 years ago by jmroot (Joshua Root)

Owner: changed from jmr@… to jwa@…

comment:5 Changed 11 years ago by larryv (Lawrence Velázquez)

Keywords: mountainlion added
Summary: Python27 staging into destroot fails: AttributeError: 'module' object has no attribute 'GetQDGlobalsScreenBits'python27: building "Build Applet.app" fails on 10.8 due to removed QuickDraw headers

comment:6 in reply to:  5 ; Changed 11 years ago by macports.org@…

When installing a fresh copy of MacPorts on mountain lion, python27 can't be installed because of this bug. Since a lot of packages directly depend on python27, all those packages can't be installed neither (703 in total, without py27-* still 174). Counting also rdependent packages, many more are affected.

It seems that the bug has been fixed upstream (see http://bugs.python.org/issue18098) but the fix will only be available with python 2.7.6. I think because so many packages are affected for mountain lion users, getting a work around for the bug would be appreciated very much by many.

Maybe the fix can be backported to 2.7.5?

Thank you, best regards, Adrian.

comment:7 in reply to:  6 ; Changed 11 years ago by larryv (Lawrence Velázquez)

Cc: macports.org@… added

Replying to macports.org@…:

When installing a fresh copy of MacPorts on mountain lion, python27 can't be installed because of this bug.

I installed python27 from source on 10.8 just the other day and did not encounter this problem.

Since a lot of packages directly depend on python27, all those packages can't be installed neither (703 in total, without py27-* still 174). Counting also rdependent packages, many more are affected.

It seems that the bug has been fixed upstream (see http://bugs.python.org/issue18098) but the fix will only be available with python 2.7.6. I think because so many packages are affected for mountain lion users, getting a work around for the bug would be appreciated very much by many.

Given that this is literally the only ticket that has been filed, I have to conclude that MacPorts users are, by and large, not encountering this. I can only speculate as to why.

Maybe the fix can be backported to 2.7.5?

I suppose it wouldn’t hurt to apply the fix ourselves until 2.7.6 is out. Can you try the following?

% sudo port clean python27
% curl https://trac.macports.org/raw-attachment/ticket/39270/skip-Build-Applet.patch | patch -d $(port dir python27) -p5
% sudo port install python27

comment:8 in reply to:  7 Changed 11 years ago by macports.org@…

Replying to larryv@…:

I installed python27 from source on 10.8 just the other day and did not encounter this problem.

I changed build_arch to i386; that might be the cause. Anyway sorry for claiming it is not working, when it does.

The fix helps indeed. I could install python27 with your instructions, thank you very much.

Changed 11 years ago by larryv (Lawrence Velázquez)

Attachment: skip-Build-Applet.patch added

backport upstream fix

comment:9 Changed 11 years ago by larryv (Lawrence Velázquez)

I’ve changed the patch to revbump python27, because this change would remove Build Applet.app on 10.8, even for 64-bit builds. I’ll let jwa decide whether it’s worth committing, since the problem is uncommon, and 2.7.6 will fix it anyway.

comment:10 Changed 11 years ago by d.schreij@…

The command:

curl https://trac.macports.org/raw-attachment/ticket/39270/skip-Build-Applet.patch | patch -d $(port dir python27) -p5

gives me the error:

patch: Can't rename file Portfile to Portfile.orig : Permission denied

even if I issue the command with sudo. Is there anyway I can override the permissions?

Last edited 11 years ago by d.schreij@… (previous) (diff)

comment:11 in reply to:  10 Changed 11 years ago by larryv (Lawrence Velázquez)

Make sure you are running curl | sudo patch and not sudo curl | patch.

comment:12 Changed 10 years ago by larryv (Lawrence Velázquez)

Resolution: fixed
Status: newclosed

Should be fixed with 2.7.6 update in r113224.

Note: See TracTickets for help on using tickets.