2

I have a problem/question about building apps on the MacOS 10.7.2 version. Ok so I have succesfully bundled my application on 10.5.8 but now we need a 64-bit distribution too so we are trying to build it on 10.7.2 . This comes from what I see with a default 64-bit python 2.7.1 and a py2app 0.5.3 as default.

First thing, I tried to run the same script, an error occured related to modulegraph:

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/modulegraph/modulegraph.py", line 352, in calc_setuptools_nspackages
for fn in os.listdir(entry):
OSError: [Errno 2] No such file or directory: '/WORK/TVB/tvb/build/bdist.macosx-10.7-intel/lib.macosx-10.7-intel-2.7'
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/modulegraph/modulegraph.py(352)calc_setuptools_nspackages()
for fn in os.listdir(entry):

Ok so next thing I try an addition check in that line of module graph to see if entry actually exists, that seems to fix the error and generate a package. Now the problem is we need to use the 'python' generated in

/Contents/MacOS/python

to spawn additional processes(again this seems to work in 10.5.8 generated packages), but now I get:

sudo ./tvb start web backend
Starting to modify  pythonpath
done
python: posix_spawn: /WORK/TVB/tvb/TVB_MacOS_dist/TVB_distribution/tvb.app/Contents/MacOS/python2.7: No such file or directory

Now the prints that worked let me see that a app was actually generated but the spawn new process failed, so I reverted all my changes and tried on a simple 'hello.py' on both 10.7.2 and 10.5.8.

The bundled application works on both, however the generated python doesn't:

So on 10.5.8:

            ./dist/hello.app/Contents/MacOS/hello

            <_Funct pt ...>

            Hello


            ./dist/hello.app.Contents/MacOS/python

            --starts a python 2.7.1 interpreter---


But on 10.7.2:

           ./dist/hello.app/Contents/MacOS/hello
           Hello

           ./dist/hello.app/Contents/MacOS/python
          python: posix_spawn: /WORK/TVB/TESt/dist/hello.app/Contents/MacOS/python2.7: No such file or directory

Any leads why this might be happening/ way to fix it?

mac
  • 42,153
  • 26
  • 121
  • 131
Bogdan
  • 8,017
  • 6
  • 48
  • 64

0 Answers0