On 14 September 2012 07:51, Ronald Oussoren <ronaldousso...@mac.com> wrote:
> > On 13 Sep, 2012, at 23:41, Paul Wiseman <poal...@gmail.com> wrote: > > On 13 September 2012 19:56, Michael McCracken <michael.mccrac...@gmail.com > > wrote: > >> Paul, it's like this: >> setup(blah, options={"py2app": = {"bdist_base": "build/app1", >> "dist_dir": "dist/app1"}}) >> setup(blah, options={"py2app": = {"bdist_base": "build/app2", >> "dist_dir": "dist/app2"}}) >> >> For the full version, see my setup.py here: (ignore "windows-installer") >> >> >> http://bazaar.launchpad.net/~ubuntuone-control-tower/ubuntuone-windows-installer/trunk/view/head:/scripts/setup-mac.py >> >> see line 571 for how I call setup, line 562 for where I set the >> app-specific options, and line 497 for the dict with the options that >> the apps have in common. >> >> -mike >> >> > Awesome, thanks buddy! > > changing the dist and build folders has solved my problem with > cprocessors.py and I can get a build, however running the app now reveals > another hurdle (yay) > > ImportError: > dlopen(/Users/paul/Source/Python/dist/_--_BRAND_--_/_--_BRAND_--_.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core_.so, > 2): no suitable image found. Did find: > /Users/paul/Source/Python/dist/_--_BRAND_--_/_--_BRAND_--_.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core_.so: > no matching architecture in universal wrapper > > running file on it gives the following; > > paul$ file > dist/_--_BRAND_--_/_--_BRAND_--_.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core_.so > dist/_--_BRAND_--_/_--_BRAND_--_.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core_.so: > Mach-O universal binary with 2 architectures > dist/_--_BRAND_--_/_--_BRAND_--_.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core_.so > (for architecture ppc): Mach-O bundle ppc > dist/_--_BRAND_--_/_--_BRAND_--_.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core_.so > (for architecture i386): Mach-O bundle i386 > > and running this shows that it's looking for x86_64 > > paul$ dist/_--_BRAND_--_/_--_BRAND_--_.app/Contents/MacOS/python > Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import sys > >>> sys.maxsize > 9223372036854775807 > > but... > > paul$ python > Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) > [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> import sys > >>> sys.maxsize > 2147483647 > > my python interpreter is 32-bit and I ran 'python setup.py py2app' - how > has the app got ahold of a 64bit interpreter? I thought it just used the > one that you call setup with? > > > What does the file command have to say about the python you use? Are you > by any change using Apple's python with VERSIONER_PYTHON_PREFER_32_BIT set > the environment (or the simular settings in defaults(1)). That would > explain why you get a binary in the app bundle that supports 64-bit code > while you don't get 64-bit code outsite of it. > > :>>> import distutils.util > :>>> distutils.util.get_platform() > 'macosx-10.8-intel' > > Py2app currently doesn't detect this, although it might be better to do so > (either automaticly adjust the executable in the bundle, or warn about this) > > Ronald > > Ah, yea I am indeed using the VERSIONER variable, I got myself confused because I was checking this, pauls-mac-pro:Python paul$ type python python is hashed (/Library/Frameworks/Python.framework/Versions/2.7/bin/python) paul$ file /Library/Frameworks/Python.framework/Versions/2.7/bin/python /Library/Frameworks/Python.framework/Versions/2.7/bin/python: Mach-O universal binary with 1 architecture /Library/Frameworks/Python.framework/Versions/2.7/bin/python (for architecture i386): Mach-O executable i386 which I don't quite understand, but. paul$ file $(whereis python) /usr/bin/python: Mach-O universal binary with 3 architectures /usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64 /usr/bin/python (for architecture i386): Mach-O executable i386 /usr/bin/python (for architecture ppc7400): Mach-O executable ppc would explain it, although I'm a little confused which python I'm actually running when I type python, I guess it must be the later (which is /usr/bin/python) By the way, thank you all so much for your help with this!! I think I'm getting pretty close now I think :) So the final question (hopefully ;) ) is how can I use the later python (I want i386 and ppc support, so don't want to use the former) but default it to not use x86_64? > > > >> On Thu, Sep 13, 2012 at 11:32 AM, Paul Wiseman <poal...@gmail.com> >> wrote: >> > On 13 September 2012 14:36, Ronald Oussoren <ronaldousso...@mac.com> >> wrote: >> >> >> >> >> >> On 13 Sep, 2012, at 15:17, Paul Wiseman <poal...@gmail.com> wrote: >> >> >> >> On 13 September 2012 13:26, Ronald Oussoren <ronaldousso...@mac.com> >> >> wrote: >> >>> >> >>> >> >>> On 13 Sep, 2012, at 14:17, Paul Wiseman <poal...@gmail.com> wrote: >> >>> >> >>> On 13 September 2012 12:13, Ronald Oussoren <ronaldousso...@mac.com> >> >>> wrote: >> >>>>>> >> >>>>>> >> >>>>> >> >>>>> I checked out the latest trunk >> >>>>> (http://svn.pythonmac.org/py2app/py2app/trunk/), installed that >> and the >> >>>>> problem has gone :) >> >>>>> >> >>>>> Not sure which version I had before, but I only built this mac a >> week >> >>>>> ago or so, so think it's maybe the current version available for >> download >> >>>>> >> >>>> >> >>>> Hm maybe I spoke too soon, it builds ok now but when I run the app I >> get >> >>>> a error dialog with Open console and Terminate options, and this >> stack trace >> >>>> in the console >> >>>> >> >>>> Traceback (most recent call last): >> >>>> File "/Applications/ZipCloud.app/Contents/Resources/__boot__.py", >> line >> >>>> 103, in <module> >> >>>> _argv_emulation() >> >>>> File "/Applications/ZipCloud.app/Contents/Resources/__boot__.py", >> line >> >>>> 101, in _argv_emulation >> >>>> _get_argvemulator().mainloop() >> >>>> File "/Applications/ZipCloud.app/Contents/Resources/__boot__.py", >> line >> >>>> 40, in mainloop >> >>>> stoptime = Evt.TickCount() + timeout >> >>>> AttributeError: 'module' object has no attribute 'TickCount' >> >>>> >> >>>> That's odd, that code is not present in the trunk. Have you removed >> the >> >>>> dist and build directories before testing the latest py2app? >> >>>> >> >>>> Ronald >> >>> >> >>> >> >>> Yea definitely, I removed them at the start of the build script. I >> >>> removed them myself and ran it again with the same outcome. How can I >> check >> >>> which version I'm running? I guess installing the current trunk hasn't >> >>> worked exactly >> >>> >> >>> >> >>> The easiest way to check the version is run "python -c 'import py2app; >> >>> print(py2app.__version__)'". >> >>> >> >>> Ronald >> >>> >> >> >> >> I've got 0.5.3 which I'm a bit confused at as I can get 0.6.4 from >> pypi. I >> >> just looked in the one I checked out from svn, and in the readme it >> says >> >> 0.5.3 - whats the address I can checkout the latest version? >> >> >> >> >> >> I should have noticed this before, but the py2app sources aren't at >> >> svn.pythonmac.org anymore. Py2app is currently hosted at >> >> <https://bitbucket.org/ronaldoussoren/py2app>, and you'll also have to >> >> install the sibling projects altgraph, modulegraph and macholib. >> >> >> >> I hope to have some time this weekend to push out new releases of these >> >> projects, >> >> >> >> Ronald >> > >> > >> > I tried with multiprocess but I had no joy, I didn't manage to see the >> > stderr but it definitely wasn't building the subapps so I believe it was >> > getting the same error. >> > >> > I've got a 10.7 macbook I'm putting devtools and sqlalchemy on which >> I'll >> > try tomorrow and see if it will build or not to get more evidence if >> it's a >> > problem with 10.6 or not >> > >> > > >
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG