Title: bundlebuilder broken in 2.7
Type: behavior Stage: test needed
Components: macOS Versions: Python 2.7
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: ronaldoussoren Nosy List: barry-scott, ned.deily, r.david.murray, ronaldoussoren, willingc
Priority: normal Keywords:

Created on 2012-12-30 21:39 by barry-scott, last changed 2016-06-24 14:59 by r.david.murray. This issue is now closed.

Messages (11)
msg178616 - (view) Author: Barry Alan Scott (barry-scott) * Date: 2012-12-30 21:39
bundlebuild in pytthon 2.7 fails to create usable applications.

After examining the code there are a number of coding errors:

1. optimize will puts the -O in the wrong place in the argv
2. is never added to the path

The bunderbuilder in 2.6 can be made to work with 2.7 by
applying the following patch to the 2.6 code.

---   2012-12-30 21:32:40.000000000 +0000
+++    2012-12-30 21:32:40.000000000 +0000
@@ -337,7 +337,6 @@
     "Python",  # the Python core library
-    "Resources/version.plist",
 def isFramework():
msg178621 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2012-12-30 22:23
Barry, can you provide a simple test case that demonstrates the failures you see?
msg178622 - (view) Author: Barry Alan Scott (barry-scott) * Date: 2012-12-30 22:33
I'm using the pysvn workbench sources to find the problem.

Test cases for Mac Apps are not that simple. You need a GUI
framework for starters.

But I'm happy to test any candidate fix using workbench.

As I said a code inspection of the changes since 2.6 will
show that this code cannot work.
msg178648 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2012-12-31 07:36
It would be nice to have a simple self-contained example, especially one that could be converted to a testcase later on. 

Using the pysvn workbench should be good enough to find the problem though (assuming it is open source). Is there a download URL for this project?
msg178649 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2012-12-31 07:38
BTW. bundlebuilder is deprecated and is no longer present in py3k.

Also: for python 2.7 is build using bundlebuilder, and that app works just fine.
msg178662 - (view) Author: Barry Alan Scott (barry-scott) * Date: 2012-12-31 10:58
Why not use IDLE? Workbench is a lot of code and dependencies.

I expect that it works because was created using the --no-zipimport option that is new in 2.7.

However with zip import the code is badly broken.

Build with zip import and you should reproduce the bug.

Have you code inspected the module as I suggested to review the new code?

_getSiteCode is clearly wrong. The if is backwards and no else.

The following inserts are in the wrong order:

if %(optimize)s:
    sys.argv.insert(1, '-O')

sys.argv.insert(1, mainprogram)
msg178664 - (view) Author: Ronald Oussoren (ronaldoussoren) * (Python committer) Date: 2012-12-31 11:09
It probably works because only uses the stdlib (that is, anything imported from the main script is in the stdlib)

The bundlebuilder call for

                --builddir=. \
                --name=IDLE \
                --link-exec \
                --plist=Info.plist \
                --mainprogram=$(srcdir)/ \
                --iconfile=$(srcdir)/../Icons/IDLE.icns \
                --resource=$(srcdir)/../Icons/PythonSource.icns \
                --resource=$(srcdir)/../Icons/PythonCompiled.icns \
                --python=$(prefix)/Resources/ \

I don't have time to look into this right now, maybe in a couple of weeks.
msg269107 - (view) Author: Carol Willing (willingc) * (Python committer) Date: 2016-06-23 04:59
Closed as an out of date issue.
msg269169 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-06-24 13:51
It's not obvious that this issue would be out of date by our normal policies; however, since bundlebuilder doesn't exist in python3 it seems reasonable to close it.  What functionality python2 has at this point is what it has.
msg269179 - (view) Author: Carol Willing (willingc) * (Python committer) Date: 2016-06-24 14:21
R. David, Would there be a better resolution than 'out of date'? The other resolutions didn't really seem to fit either.

Agree, that the issue is a moot point.
msg269185 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-06-24 14:59
No, I think out of date is closest.  It's no longer relevant because it no longer exists in python3, so its support date has effectively passed EOL :)
Date User Action Args
2016-06-24 14:59:15r.david.murraysetmessages: + msg269185
2016-06-24 14:21:15willingcsetmessages: + msg269179
2016-06-24 13:51:33r.david.murraysetnosy: + r.david.murray
messages: + msg269169
2016-06-23 04:59:22willingcsetstatus: open -> closed

nosy: + willingc
messages: + msg269107

resolution: out of date
2012-12-31 11:09:12ronaldoussorensetmessages: + msg178664
2012-12-31 10:58:29barry-scottsetmessages: + msg178662
2012-12-31 07:38:00ronaldoussorensetmessages: + msg178649
2012-12-31 07:36:18ronaldoussorensetmessages: + msg178648
2012-12-30 22:33:46barry-scottsetmessages: + msg178622
2012-12-30 22:23:03ned.deilysetassignee: ronaldoussoren
type: performance -> behavior
components: + macOS

nosy: + ronaldoussoren, ned.deily
messages: + msg178621
stage: test needed
2012-12-30 21:39:39barry-scottcreate