Re: [Pythonmac-SIG] py2app error

2018-02-21 Thread Barry


> On 19 Feb 2018, at 22:32, Kevin Walzer  wrote:
> 
> A Tkinter app I am building on 10.13 with py2app 0.14 is crashing with this 
> error:
> 
> Traceback (most recent call last):
>   File 
> "/Users/kevin/Programming/quickwho/dist/QuickWho.app/Contents/Resources/__boot__.py",
>  line 98, in 
> _run()
>   File 
> "/Users/kevin/Programming/quickwho/dist/QuickWho.app/Contents/Resources/__boot__.py",
>  line 82, in _run
> exec(compile(source, path, 'exec'), globals(), globals())
>   File 
> "/Users/kevin/Programming/quickwho/dist/QuickWho.app/Contents/Resources/QuickWho.py",
>  line 8, in 
> from tkinter import *
>   File "", line 961, in _find_and_load
>   File "", line 950, in _find_and_load_unlocked
>   File "", line 646, in _load_unlocked
>   File "", line 616, in _load_backward_compatible
>   File "tkinter/__init__.pyc", line 36, in 
> ValueError: character U+6573552f is not in range [U+; U+10]

Does the code work its not an app?

I nothice that 6573552f looks a lot like 4 ascii chars. Is __init__.py corrupt?

> 
> I am not certain of how to proceed. Please advise.
> 
> -- 
> Kevin Walzer
> Code by Kevin/Mobile Code by Kevin
> http://www.codebykevin.com
> http://www.wtmobilesoftware.com
> 
> ___
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> https://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
https://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG


[Pythonmac-SIG] py2app error

2018-02-19 Thread Kevin Walzer
A Tkinter app I am building on 10.13 with py2app 0.14 is crashing with 
this error:


Traceback (most recent call last):
  File 
"/Users/kevin/Programming/quickwho/dist/QuickWho.app/Contents/Resources/__boot__.py", 
line 98, in 

    _run()
  File 
"/Users/kevin/Programming/quickwho/dist/QuickWho.app/Contents/Resources/__boot__.py", 
line 82, in _run

    exec(compile(source, path, 'exec'), globals(), globals())
  File 
"/Users/kevin/Programming/quickwho/dist/QuickWho.app/Contents/Resources/QuickWho.py", 
line 8, in 

    from tkinter import *
  File "", line 961, in _find_and_load
  File "", line 950, in 
_find_and_load_unlocked

  File "", line 646, in _load_unlocked
  File "", line 616, in 
_load_backward_compatible

  File "tkinter/__init__.pyc", line 36, in 
ValueError: character U+6573552f is not in range [U+; U+10]

I am not certain of how to proceed. Please advise.

--
Kevin Walzer
Code by Kevin/Mobile Code by Kevin
http://www.codebykevin.com
http://www.wtmobilesoftware.com

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
https://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] py2app error when launching built app

2012-12-24 Thread Ronald Oussoren

On 11 Nov, 2012, at 23:26, Alex Honeywell alex.honeyw...@gmail.com wrote:

 I've got my app successfully bundled and built, but when I try to launch it 
 from Finder I get snakewatch: Error and nothing else except exited with 
 error: 255 in Console.
 
 When I run the binary from Terminal instead, I get
 
 Traceback (most recent call last):
   File 
 /Volumes/Data/Development/snakewatch/dist/snakewatch.app/Contents/Resources/__boot__.py,
  line 7, in module
 _reset_sys_path()
   File 
 /Volumes/Data/Development/snakewatch/dist/snakewatch.app/Contents/Resources/__boot__.py,
  line 4, in _reset_sys_path
 resources = os.environ['RESOURCEPATH']
   File UserDict.pyc, line 23, in __getitem__
 KeyError: 'RESOURCEPATH'
 2012-11-11 17:18:07.567 snakewatch[92013:707] snakewatch Error
 
 If I run RESOURCEPATH=$(pwd)/Resources MacOS/snakewatch I get
 
 Traceback (most recent call last):
   File 
 /Volumes/Data/Development/snakewatch/dist/snakewatch.app/Contents/Resources/__boot__.py,
  line 316, in module
 _run()
   File 
 /Volumes/Data/Development/snakewatch/dist/snakewatch.app/Contents/Resources/__boot__.py,
  line 304, in _run
 argv0 = os.path.basename(os.environ['ARGVZERO'])
   File UserDict.pyc, line 23, in __getitem__
 KeyError: 'ARGVZERO'
 
 and if I run RESOURCEPATH=$(pwd)/Resources ARGVZERO='' MacOS/snakewatch it 
 launches fine.

This appears to be the same problem as 
https://bitbucket.org/ronaldoussoren/py2app/issue/81/env-var-argvzero-resourcepath-not-defined.
  

Do you use a framework build of python or a basic shared library build 
(--enable-shared)?

Ronald
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


[Pythonmac-SIG] py2app error when launching built app

2012-12-21 Thread Alex Honeywell
I've got my app successfully bundled and built, but when I try to launch it
from Finder I get snakewatch: Error and nothing else except exited with
error: 255 in Console.

When I run the binary from Terminal instead, I get

Traceback (most recent call last):
  File
/Volumes/Data/Development/snakewatch/dist/snakewatch.app/Contents/Resources/__boot__.py,
line 7, in module
_reset_sys_path()
  File
/Volumes/Data/Development/snakewatch/dist/snakewatch.app/Contents/Resources/__boot__.py,
line 4, in _reset_sys_path
resources = os.environ['RESOURCEPATH']
  File UserDict.pyc, line 23, in __getitem__
KeyError: 'RESOURCEPATH'
2012-11-11 17:18:07.567 snakewatch[92013:707] snakewatch Error

If I run RESOURCEPATH=$(pwd)/Resources MacOS/snakewatch I get

Traceback (most recent call last):
  File
/Volumes/Data/Development/snakewatch/dist/snakewatch.app/Contents/Resources/__boot__.py,
line 316, in module
_run()
  File
/Volumes/Data/Development/snakewatch/dist/snakewatch.app/Contents/Resources/__boot__.py,
line 304, in _run
argv0 = os.path.basename(os.environ['ARGVZERO'])
  File UserDict.pyc, line 23, in __getitem__
KeyError: 'ARGVZERO'

and if I run RESOURCEPATH=$(pwd)/Resources ARGVZERO='' MacOS/snakewatch
it launches fine.

Any reason why those variables wouldn't be set when I launch the app from
Finder?

Running py2app under a manually built Python 2.7.3 installation on Mountain
Lion, and the same errors happen regardless of the argv_emulation value.

Thanks,
 - Alex
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Py2app error

2012-08-03 Thread Chris Barker
On Thu, Aug 2, 2012 at 8:32 PM, Ned Deily n...@acm.org wrote:

 These are what they seem to be -- though I think you got tripped up by
 for Mac OS X 10.3 through 10.6  -- actually, that should be 10.3 +
  -- 10.7 didn't exist when that was built.

 Actually, 10.3 through 10.6 is intentional.  If you need to build
 extension modules, the current 3.2.3 and 2.7.3 32-bit python.org Pythons
 do not work well with Xcode 4, the default for OS X 10.7 and 10.8 and
 optional for 10.6.

Indeed -- I had to go find and install XCode3.* -- Apple really wants
you to keep moving forward! But once I got XCode 3 going -- it works
fine.

Good to know that the INtel 32/64 bit python works with newer Xcodes though.

But if you're not building anything it will run fine on newer OS-X
systems, and if you want to be able to deploy on older systems, I
think you need to use it, yes?


  The upcoming Python 3.3 release has much better
 support for Xcode 4

Maybe I'll get there some day -- but it'll be 2.7 for a while yet.

 BTW, for Python 3.3, the 32-bit-only installer Python supports 10.5+
 systems (i386 and ppc).   More details on all of this forthcoming.

cool -- thanks for keeping this all up!

-Chris



-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Py2app error

2012-08-02 Thread Ronald Oussoren

On 2 Aug, 2012, at 7:39, Mark Livingstone livingstonem...@gmail.com wrote:

 Hi Guys,
 
 OK, taking Chris' advice, I installed on a Snow Leopard machine:
 
 cheyenne:dist marklivingstone$ ls ~/Downloads/
 About Downloads.lpdf
 numpy-1.6.2-py2.7-python.org-macosx10.3.dmg
 wxMac-2.8.12.tar
 matplotlib-1.1.0-py2.7-python.org-macosx10.3.dmg
 python-2.7.3-macosx10.6.dmg
 wxPython2.8-osx-docs-demos-2.8.12.1-universal-py2.7.dmg
 mercurial-2.2.3_20120707-py2.7-macosx10.7
 scipy-0.11.0rc1-py2.7-python.org-macosx10.6.dmg
 wxPython2.8-osx-unicode-2.8.12.1-universal-py2.7.dmg
 
 Then I went to Ronald's Bitbucket and built a current py2app setup.

The stub executables in the repository need to be updated, although the old 
ones should work fine (some of them are currently out of sync w.r.t. the source 
code).

 
 I tried a build but got this:
 
 python ../mac-setup/setup_py2app.py py2app
 Traceback (most recent call last):
  File ../mac-setup/setup_py2app.py, line 1, in module
import wx
  File 
 /usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/__init__.py,
 line 45, in module
from wx._core import *
  File 
 /usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core.py,
 line 4, in module
import _core_
 ImportError: 
 dlopen(/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core_.so,
 2): no suitable image found.  Did find:

 /usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core_.so:
 no matching architecture in universal wrapper
 cheyenne:src marklivingstone$

This looks like an installation of wx that's not in sync with Python. In 
particular, the python interpreter supports a different CPU architecture than 
wxPython.

The quickest solution based on the list of packages you installed is to 
download the 32-bit installer for Python (not the intel-only installer for OSX 
10.6 or later).

Ronald



smime.p7s
Description: S/MIME cryptographic signature
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Py2app error

2012-08-02 Thread Chris Barker
On Wed, Aug 1, 2012 at 10:39 PM, Mark Livingstone
livingstonem...@gmail.com wrote:

 OK, taking Chris' advice, I installed on a Snow Leopard machine:

now that you've named, me, I feel compelled to contiue to help.. ;-)

 cheyenne:dist marklivingstone$ ls ~/Downloads/
 About Downloads.lpdf
 numpy-1.6.2-py2.7-python.org-macosx10.3.dmg
 wxMac-2.8.12.tar
 matplotlib-1.1.0-py2.7-python.org-macosx10.3.dmg
 python-2.7.3-macosx10.6.dmg

Careful here: Thanks to Apple's fast-moving development ( 4!
architectures potentially in the wild -- PPC32+64bit, Intel 32+64 bit)
it's hard to have something for eveyting...

note that you have

numpy-1.6.2-py2.7-python.org-macosx10.3.dmg
but
python-2.7.3-macosx10.6.dmg

we put the really long name in the numpy installer to try to make this
clear, but it really gets complicated fast...

Anyway, on the pyton,org site, there are:

Python 3.2.3 Mac OS X 64-bit/32-bit x86-64/i386 Installer (for Mac OS
X 10.6 and 10.7)

and

Python 3.2.3 Mac OS X 32-bit i386/PPC Installer (for Mac OS X 10.3 through 10.6)

These are what they seem to be -- though I think you got tripped up by
for Mac OS X 10.3 through 10.6  -- actually, that should be 10.3 +
 -- 10.7 didn't exist when that was built.

The numpy and wx packages you have are built for the 10.3 installer.

The release version of wx doesn't support 64 bit Intel (though it does
support 32 bit intel).


 wxPython2.8-osx-docs-demos-2.8.12.1-universal-py2.7.dmg
 mercurial-2.2.3_20120707-py2.7-macosx10.7

this looks like it may be for the newer installer.

 scipy-0.11.0rc1-py2.7-python.org-macosx10.6.dmg

this also -- so your scipy and numpy are out of sync, too!

 wxPython2.8-osx-unicode-2.8.12.1-universal-py2.7.dmg

this is for the 10.3 32 bit binary.

What a mess!

You have two options:

1) Use the 10.6 python binary (intel 32+64 bit), then get all the
packages compatible with that. IN this case, the trick will be wx. You
can:

  a) Make sure you run the binary in 32 bit mode (Not 64), and it
should work, but it's a bit messy to make sure that all works right.

  b) Use a new development build of wx (wx2.9.*) -- there is a 64 bit
Cocoa build available - but it does a few changes, so will take a bit
of work to port to.


2) (probably the easiest) -- use the 32bit 10.3+ build of Python --
then make sure all your other packages are built for that -- hopefully
you can find a Mercurial package for it -- the rest are there. (it may
not be hard to build mercurial, either, does it have any
dependencies?)

Sorry for the mess -- blame Apple!

 I tried a build but got this:

  python ../mac-setup/setup_py2app.py py2app
 Traceback (most recent call last):
   File ../mac-setup/setup_py2app.py, line 1, in module
 import wx
   File 
 /usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/__init__.py,
 line 45, in module
 from wx._core import *
   File 
 /usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core.py,
 line 4, in module
 import _core_
 ImportError: 
 dlopen(/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core_.so,
 2): no suitable image found.  Did find:
 
 /usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core_.so:
 no matching architecture in universal wrapper

Well -- no ;point in going beyond this -- wx isn't working. What
you've got is a a 32 bit PPC+Intel wx, but you're running a 32+64 bit
Python -- and it defaults to 64 bit on a 64 bit machine -- so it's
looking for a 64bit Intel binary of wx -- which is not there.

 However, when I try to run the app, I get the following in the console log:
 ImportError: 
 dlopen(/Users/marklivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core_.so,
 2): no suitable image found.  Did find:

same error -- no surprise there -- if it doesn' work outside of
py2app, it won't work with it.

 Is it just not possible to use py2app to create an app for the Mac based on 
 wx?

indeed it is -- I'm doing it with most of the same stuff you are
(except Mercurial) (using the 32 bit build)


NOTE: I'm considering building a custom 32bit Intel (10.4+, maybe)
only distribution for the Mac -- it would run on any recent system,
and be smaller to bundle, etc.

Or maybe 64 bit -- how common are 32 bit only Intel Mac these days --
anyone know?

 Also, the final result turns in at 184MB in size. Are there any common
 things that may be being pulled in that I should exclude?

Well, that's a trick. It's going to be big -- you've got multiple
binaries in there for different architectures -- so all the binary
stuff is doubled. Then you've got packages that bring the world in
with them:

wx is big -- not much to be done about that though you may be able to
pull out an so or two.)

numpy default imports a bunch of stuff like ffts, lapack, etc that you
may or may not be 

Re: [Pythonmac-SIG] Py2app error

2012-08-02 Thread Ned Deily
In article 
CALGmxELzopN9OMAtpYM3eQ4LEBM1j6oBNZPAd=tytaq2z5r...@mail.gmail.com,
 Chris Barker chris.bar...@noaa.gov wrote:
[...]
 Anyway, on the pyton,org site, there are:
 
 Python 3.2.3 Mac OS X 64-bit/32-bit x86-64/i386 Installer (for Mac OS
 X 10.6 and 10.7)
 
 and
 
 Python 3.2.3 Mac OS X 32-bit i386/PPC Installer (for Mac OS X 10.3 through 
 10.6)
 
 These are what they seem to be -- though I think you got tripped up by
 for Mac OS X 10.3 through 10.6  -- actually, that should be 10.3 +
  -- 10.7 didn't exist when that was built.

Actually, 10.3 through 10.6 is intentional.  If you need to build 
extension modules, the current 3.2.3 and 2.7.3 32-bit python.org Pythons 
do not work well with Xcode 4, the default for OS X 10.7 and 10.8 and 
optional for 10.6.  The upcoming Python 3.3 release has much better 
support for Xcode 4 so that it is practical to use the 32-bit-only 
Python to build extension modules on newer releases.  Some of that 
support will be backported for upcoming 2.7.x and 3.2.x releases.

BTW, for Python 3.3, the 32-bit-only installer Python supports 10.5+ 
systems (i386 and ppc).   More details on all of this forthcoming.

-- 
 Ned Deily,
 n...@acm.org

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


[Pythonmac-SIG] Py2app error

2012-08-01 Thread Mark Livingstone
Hi Guys,

OK, taking Chris' advice, I installed on a Snow Leopard machine:

cheyenne:dist marklivingstone$ ls ~/Downloads/
About Downloads.lpdf
numpy-1.6.2-py2.7-python.org-macosx10.3.dmg
wxMac-2.8.12.tar
matplotlib-1.1.0-py2.7-python.org-macosx10.3.dmg
python-2.7.3-macosx10.6.dmg
wxPython2.8-osx-docs-demos-2.8.12.1-universal-py2.7.dmg
mercurial-2.2.3_20120707-py2.7-macosx10.7
scipy-0.11.0rc1-py2.7-python.org-macosx10.6.dmg
wxPython2.8-osx-unicode-2.8.12.1-universal-py2.7.dmg

Then I went to Ronald's Bitbucket and built a current py2app setup.

I tried a build but got this:

 python ../mac-setup/setup_py2app.py py2app
Traceback (most recent call last):
  File ../mac-setup/setup_py2app.py, line 1, in module
import wx
  File 
/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/__init__.py,
line 45, in module
from wx._core import *
  File 
/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core.py,
line 4, in module
import _core_
ImportError: 
dlopen(/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core_.so,
2): no suitable image found.  Did find:

/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core_.so:
no matching architecture in universal wrapper
cheyenne:src marklivingstone$

I then did python-32 ../mac-setup/setup_py2app.py py2app , and built
using py2app my Salstat.app which built fine and created a
dist/Salstat.app

However, when I try to run the app, I get the following in the console log:


2/08/12 12:06:23.340 PM [0x0-0x421421].com.SalStat.SalStat:
/Users/marklivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Resources/salstat.py:585:
SyntaxWarning: import * only allowed at module level
2/08/12 12:06:23.372 PM [0x0-0x421421].com.SalStat.SalStat:
argvemulator warning: fetching events failed
2/08/12 12:06:23.372 PM [0x0-0x421421].com.SalStat.SalStat: Traceback
(most recent call last):
2/08/12 12:06:23.372 PM [0x0-0x421421].com.SalStat.SalStat:   File
/Users/marklivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Resources/__boot__.py,
line 319, in module
2/08/12 12:06:23.373 PM [0x0-0x421421].com.SalStat.SalStat:
_run('salstat.py')
2/08/12 12:06:23.373 PM [0x0-0x421421].com.SalStat.SalStat:   File
/Users/marklivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Resources/__boot__.py,
line 311, in _run
2/08/12 12:06:23.374 PM [0x0-0x421421].com.SalStat.SalStat:
exec(compile(source, path, 'exec'), globals(), globals())
2/08/12 12:06:23.374 PM [0x0-0x421421].com.SalStat.SalStat:   File
/Users/marklivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Resources/salstat.py,
line 9, in module
2/08/12 12:06:23.374 PM [0x0-0x421421].com.SalStat.SalStat: import wx
2/08/12 12:06:23.374 PM [0x0-0x421421].com.SalStat.SalStat:   File
wx/__init__.pyc, line 45, in module
2/08/12 12:06:23.374 PM [0x0-0x421421].com.SalStat.SalStat:   File
wx/_core.pyc, line 4, in module
2/08/12 12:06:23.375 PM [0x0-0x421421].com.SalStat.SalStat:   File
wx/_core_.pyc, line 18, in module
2/08/12 12:06:23.375 PM [0x0-0x421421].com.SalStat.SalStat:   File
wx/_core_.pyc, line 11, in __load
2/08/12 12:06:23.375 PM [0x0-0x421421].com.SalStat.SalStat:
ImportError: 
dlopen(/Users/marklivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core_.so,
2): no suitable image found.  Did find:
2/08/12 12:06:23.375 PM [0x0-0x421421].com.SalStat.SalStat:

/Users/marklivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Resources/lib/python2.7/lib-dynload/wx/_core_.so:
no matching architecture in universal wrapper
2/08/12 12:06:23.479 PM SalStat: SalStat Error
2/08/12 12:06:25.919 PM com.apple.launchd.peruser.501:
([0x0-0x421421].com.SalStat.SalStat[76293]) Exited with code: 255

Is it just not possible to use py2app to create an app for the Mac based on wx?

Also, the final result turns in at 184MB in size. Are there any common
things that may be being pulled in that I should exclude?

Thanks in advance,

MarkL
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Py2app error

2012-07-18 Thread Ronald Oussoren

On 18 Jul, 2012, at 4:48, Mark Livingstone wrote:

 Hi Ronald,
 
 I Played a but further…
 
 With a bit of terminal foo, I changed to the Apple python. I blew away
 DIST  Build and tried again. What I found is that because the EPD
 directories were still at the beginning of my path, it still tried to
 access that Makefile instead of looking for the Apple Python related
 files :-(
 
 So I got rid of the EPD paths, and the MAc Port paths, and now it
 seems there is no wx module to import under Apple Python!
 
 I think I will have to play with MAc Ports, and see if I can get those
 ducks in a row and try again!

Fixing this in py2app should be fairly easy, I won't have time to look into 
this until later this week though.

Ronald



smime.p7s
Description: S/MIME cryptographic signature
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Py2app error

2012-07-17 Thread Chris Barker
On Mon, Jul 16, 2012 at 10:49 PM, Ronald Oussoren ronaldousso...@mac.com wrote

 I guess I'll have to download EPD to test this, but it looks like EPD has a 
 Python.framework where the framework version is different from the Python 
 version, and parts of py2app assume they are the same (which it why copying 
 pyconfig.h succeeds but copying Makefile fails).

Also -- check the license on the version(s) of EPD you are using --
you may not be free to re-distribute in this way anyway -- at least
that used to be the case.

-Chris



-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Py2app error

2012-07-17 Thread Mark Livingstone
Hi Chris,

In the latest couple of releases, they have brought out a cut down
EPD-Free which gets round that issue. It installs their python and
Numpy, Scipy, IPython, matplotlib, traits  chaco so you end up
getting wx / qt as well.

Cheers,

MArkL

On 18 July 2012 03:26, Chris Barker chris.bar...@noaa.gov wrote:
 On Mon, Jul 16, 2012 at 10:49 PM, Ronald Oussoren ronaldousso...@mac.com 
 wrote

 I guess I'll have to download EPD to test this, but it looks like EPD has a 
 Python.framework where the framework version is different from the Python 
 version, and parts of py2app assume they are the same (which it why copying 
 pyconfig.h succeeds but copying Makefile fails).

 Also -- check the license on the version(s) of EPD you are using --
 you may not be free to re-distribute in this way anyway -- at least
 that used to be the case.

 -Chris



 --

 Christopher Barker, Ph.D.
 Oceanographer

 Emergency Response Division
 NOAA/NOS/ORR(206) 526-6959   voice
 7600 Sand Point Way NE   (206) 526-6329   fax
 Seattle, WA  98115   (206) 526-6317   main reception

 chris.bar...@noaa.gov
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


[Pythonmac-SIG] Py2app error

2012-07-16 Thread Mark Livingstone
Hello,

Using both EPD 7.3 academic and free, I have tried to use py2app to
make an installer. This is the first time I have tried to do this. I
will ask on their mailing list as well.

My setup.py script looks like this:


import wx
import sys

# Application Information
APP = salstat.py
NAME = 'SalStat'
VERSION = '2.2'
PACKAGES = ['']
URL = 'http://code.google.com/p/salstat-statistics-package-2/'
LICENSE = 'GPL 2'
AUTHOR = 'Sebastian'
AUTHOR_EMAIL = 'sel...@gmail.com'
DESCRIPTION = 'Statistics Package'
YEAR = 2012
# End of Application Information


def BuildOSXApp():

Build the OSX Applet


from setuptools import setup

# py2app uses this to generate the plist xml for the applet
copyright = Copyright %s %s % (AUTHOR, YEAR)
appid = com.%s.%s % (NAME, NAME)
PLIST = dict(CFBundleName = NAME,
CFBundleIconFile = 'salstat.ico',
CFBundleShortVersionString = VERSION,
CFBundleGetInfoString = NAME +   + VERSION,
CFBundleExecutable = NAME,
CFBundleIdentifier = appid,
CFBundleTypeMIMETypes = ['text/plain'],
CFBundleDevelopmentRegion = 'English',
NSHumanReadableCopyright = copyright
)
PY2APP_OPTS = dict(iconfile = salstat.ico,
argv_emulation = True,
plist = PLIST)
setup(
app = [APP,],
version = VERSION,
options = dict( py2app = PY2APP_OPTS),
description = NAME,
author = AUTHOR,
author_email = AUTHOR_EMAIL,
url = URL,
setup_requires = ['py2app'],
)


if __name__ == '__main__':
if wx.Platform == '__WXMAC__':
# OS X
BuildOSXApp()
else:
print Unsupported platform: %s % wx.Platform


When I run it, it starts off fine and seems to work until it quits like this:

snip

creating 
/Users/mlivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Resources/lib/python2.7/lib-dynload/PIL
creating 
/Users/mlivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Resources/lib/python2.7/lib-dynload/wx
copying 
/Library/Frameworks/Python.framework/Versions/7.3/Resources/Python.app/Contents/MacOS/Python
- 
/Users/mlivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/MacOS/python
creating 
/Users/mlivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Frameworks/Python.framework
creating 
/Users/mlivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Frameworks/Python.framework/Versions
creating 
/Users/mlivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Frameworks/Python.framework/Versions/7.3
creating 
/Users/mlivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Frameworks/Python.framework/Versions/7.3/Resources
creating 
/Users/mlivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Frameworks/Python.framework/Versions/7.3/include
creating 
/Users/mlivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Frameworks/Python.framework/Versions/7.3/include/python2.7
creating 
/Users/mlivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Frameworks/Python.framework/Versions/7.3/lib
creating 
/Users/mlivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Frameworks/Python.framework/Versions/7.3/lib/python7.3
creating 
/Users/mlivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Frameworks/Python.framework/Versions/7.3/lib/python7.3/config
copying /Library/Frameworks/Python.framework/Versions/7.3/Python -
/Users/mlivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Frameworks/Python.framework/Versions/7.3
copying /Library/Frameworks/Python.framework/Versions/7.3/Resources/Info.plist
- 
/Users/mlivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Frameworks/Python.framework/Versions/7.3/Resources
copying 
/Library/Frameworks/Python.framework/Versions/7.3/include/python2.7/pyconfig.h
- 
/Users/mlivingstone/Documents/workspace/salstat-statistics-package-2/src/dist/SalStat.app/Contents/Frameworks/Python.framework/Versions/7.3/include/python2.7
error: can't copy
'/Library/Frameworks/Python.framework/Versions/7.3/lib/python7.3/config/Makefile':
doesn't exist or not a regular file


Looking back through the mile of screen space I have snipped, it seems
to have successfully found all the other dependencies like wx, numpy,
scipy etc. When I check, indeed that file (Makefile) does not exist at that
location.

Thanks in advance for any help!

MarkL
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: [Pythonmac-SIG] Py2app error

2012-07-16 Thread Ronald Oussoren

On 17 Jul, 2012, at 2:18, Mark Livingstone wrote:

 Hello,
 
 Using both EPD 7.3 academic and free, I have tried to use py2app to
 make an installer. This is the first time I have tried to do this. I
 will ask on their mailing list as well.

I guess I'll have to download EPD to test this, but it looks like EPD has a 
Python.framework where the framework version is different from the Python 
version, and parts of py2app assume they are the same (which it why copying 
pyconfig.h succeeds but copying Makefile fails).

Ronald

smime.p7s
Description: S/MIME cryptographic signature
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] [py2app] - error: argv-emulation is not supported for 64-bit executables

2011-10-18 Thread Ronald Oussoren

On 18 Oct, 2011, at 1:56, David Cortesi wrote:

 Thank you, that sounds good. I have downloaded it, and now have the
 folder py2app, but the relationship between that and setup.py is not
 clear to me. I was blindly following the instructions in the py2app
 doc, e.g. sudo easy_install -U py2app etc, but I can't find where
 that actually stashed py2app -- or how setup.py locates it for the
 command setup.py py2app... -- in order to replace it with this later
 one. Sorry to be such a noob.

py2app implements the extension mechanism of setuptools, if you use that (by 
importing setuptools or distribute in your setup.py file) the setuptools 
package knows how to find the py2app command in your site-packages directory. 
Otherwise you need to have 'import py2app' in your setup.py file and python 
looks on its search path for the py2app module.

sudo easy_install …. installs py2app in the site-packages folder of the 
Python  installation that's associated with the easy_install tool.  You can use 
sudo type easy_install to determine which copy of easy_install got used, if 
that refers to '/usr/bin/easy_install' you have installed py2app in the System 
installation of Python 
(/System/Library/Frameworks/Python.framework/Versions/Current).

Ronald
 
 On Mon, Oct 17, 2011 at 3:21 PM, Sean Robinson
 sean.robin...@sccmail.maricopa.edu wrote:
 
 I am using what should be the latest py2app (0.6.3), installed today.
 
  Try the 0.6.4 pre-release version from
 https://bitbucket.org/ronaldoussoren/py2app  In that version, argv_emulation
 has worked for me (and others on this list) in 64-bit.  I have recently
 (today) used argv_emulation with --argv-inject to quickly and easily create
 multiple app bundle versions from a single base.
 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig
 unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG



smime.p7s
Description: S/MIME cryptographic signature
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


[Pythonmac-SIG] [py2app] - error: argv-emulation is not supported for 64-bit executables

2011-10-17 Thread David Cortesi
This seems to be a rather FAsked question, based on googling that
error string. Not FAnswered, however, altho it is probably relevant
that on this list in August, Ronald Oussoren wrote, The py2app
repository contains a version of the argv emulator that works in
64-bit mode. I have to rebuild the executable stubs on a 10.6 system
with Xcode 3 before I can release that version, that should hopefully
happen later this week.

I am trying to package a PyQt4 app on snow leopard. There would seem
to be no way around needing argv emulation, as a QApplication is
necessary and it requires sys.argv.

I am using what should be the latest py2app (0.6.3), installed today.
I tried  arch -i386 python setup.py py2app but the same error message
appeared.

Any suggestions or comments appreciated.
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] [py2app] - error: argv-emulation is not supported for 64-bit executables

2011-10-17 Thread Sean Robinson

On 10/17/2011 02:15 PM, David Cortesi wrote:

This seems to be a rather FAsked question, based on googling that
error string. Not FAnswered, however, altho it is probably relevant
that on this list in August, Ronald Oussoren wrote, The py2app
repository contains a version of the argv emulator that works in
64-bit mode. I have to rebuild the executable stubs on a 10.6 system
with Xcode 3 before I can release that version, that should hopefully
happen later this week.

I am trying to package a PyQt4 app on snow leopard. There would seem
to be no way around needing argv emulation, as a QApplication is
necessary and it requires sys.argv.

I am using what should be the latest py2app (0.6.3), installed today.
I tried  arch -i386 python setup.py py2app but the same error message
appeared.

Any suggestions or comments appreciated.


  Try the 0.6.4 pre-release version from 
https://bitbucket.org/ronaldoussoren/py2app  In that version, 
argv_emulation has worked for me (and others on this list) in 64-bit.  I 
have recently (today) used argv_emulation with --argv-inject to quickly 
and easily create multiple app bundle versions from a single base.


  Please let us all know whether or not this version works for you.

--
Sean Robinson
Laboratory Technician
Physics Astronomy Geology
sean.robin...@sccmail.maricopa.edu
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] [py2app] - error: argv-emulation is not supported for 64-bit executables

2011-10-17 Thread David Cortesi
Thank you, that sounds good. I have downloaded it, and now have the
folder py2app, but the relationship between that and setup.py is not
clear to me. I was blindly following the instructions in the py2app
doc, e.g. sudo easy_install -U py2app etc, but I can't find where
that actually stashed py2app -- or how setup.py locates it for the
command setup.py py2app... -- in order to replace it with this later
one. Sorry to be such a noob.

On Mon, Oct 17, 2011 at 3:21 PM, Sean Robinson
sean.robin...@sccmail.maricopa.edu wrote:

 I am using what should be the latest py2app (0.6.3), installed today.

  Try the 0.6.4 pre-release version from
 https://bitbucket.org/ronaldoussoren/py2app  In that version, argv_emulation
 has worked for me (and others on this list) in 64-bit.  I have recently
 (today) used argv_emulation with --argv-inject to quickly and easily create
 multiple app bundle versions from a single base.
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] py2app error

2010-08-01 Thread Ronald Oussoren

On 31 Jul, 2010, at 23:02, Nathan Lemoine wrote:

 Running the testing application in the command line did confirm that the 
 pyglet module isn't being found:
 
  File /Users/Nate/dist/tester.app/Contents/Resources/__boot__.py, line 160, 
 in _run
execfile(path, globals(), globals())
  File /Users/Nate/Desktop/tester.py, line 1, in module
import pyglet
 ImportError: No module named pyglet
 
 Is there a way to manually add the path for pyglet to py2app's search or in 
 the setup.py file to force the module to be loaded?

This is very odd. Which version of Python do you use? And likewise for pyglet?

I've installed pyglet for python 2.6 using the 1.1.4 binary installer on their 
site, and used easy_install-2.7 pyglet to install the python parts for python 
2.7. Both result in a working application bundle.

There is misfeature in pyglet that makes this bundle not-quite-standalone 
though,  the pyglet sources explicitly load /usr/local/lib/libavbin.dylib using 
ctypes.  I could create a py2app recipe that copies libavbin.dylib into the 
application bundle, but that will probably not be used without patching the 
pyglet sources.

I've attached the scripts I used to test.

Ronald

from setuptools import setup

setup(
app=['runner.py'],
)
import pyglet

vidPath=/Library//Developer/Documentation/DocSets/com.apple.adc.documentation.AppleLegacy.CoreReference.docset/Contents/Resources/Documents/documentation/Hardware/Developer_Notes/Macintosh_CPUs-G3/original_iMac/imac.mov
window = pyglet.window.Window()
source = pyglet.media.StreamingSource()
MediaLoad = pyglet.media.load(vidPath)
player = pyglet.media.Player()
player.queue(MediaLoad)
player.play()

@window.event
def on_draw():
txt = player.get_texture()
if txt is None:
sys.exit(0)

txt.blit(0,0)

pyglet.app.run()
 
 On Jul 30, 2010, at 1:54 AM, Ronald Oussoren wrote:
 
 
 On 30 Jul, 2010, at 2:59, Nathan Lemoine wrote:
 
 I installed the 0.5.2 update, and I've tried making just a very simple 
 pyglet app to play a movie file so that you all could try it if you want on 
 your python distributions:
 
 import pyglet
 
 vidPath=video.avi ##put the path to a video file here
 window = pyglet.window.Window()
 source = pyglet.media.StreamingSource()
 MediaLoad = pyglet.media.load(vidPath)
 player = pyglet.media.Player()
 player.queue(MediaLoad)
 player.play()
 
 @window.event
 def on_draw():
 player.get_texture().blit(0,0)
 
 pyglet.app.run()
 
 Thanks for the demo, that will definitly help in reproducing and fixing the 
 problem.
 
 
 Executing python setup.py py2app still gives me the same error:
 
 Traceback (most recent call last):
 File 
 /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/py2app/build_app.py,
  line 604, in _run
  self.run_normal()
 File 
 /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/py2app/build_app.py,
  line 675, in run_normal
  self.create_binaries(py_files, pkgdirs, extensions, loader_files)
 File 
 /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/py2app/build_app.py,
  line 739, in create_binaries
  dry_run=self.dry_run)
 File 
 /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/py2app/util.py, 
 line 376, in byte_compile
  if force or newer(mod.filename, cfile):
 File 
 /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/py2app/util.py, 
 line 172, in newer
  msource = get_mtime(source)
 File 
 /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/py2app/util.py, 
 line 164, in get_mtime
  info = zf.getinfo(rest)
 File 
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/zipfile.py,
  line 462, in getinfo
  return self.NameToInfo[name]
 KeyError: 'pyglet/__init__.pyc'
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/zipfile.py(462)getinfo()
 - return self.NameToInfo[name]
 (Pdb)
 
 I ran it in alias mode as well and it bundled 'tester.app' successfully. 
 When I attempted to run the bundle, I just got a dialog box that said 
 'tester Error' and brought me to the MacPython website. I'm not sure how to 
 find out what the issue is with the aliased bundle.
 
 You can run the app from the command-line:  test.app/Contents/MacOS/tester
 
 When you do that you'll get error messages in your terminal window, and 
 those should explain what's going on.  I expect that pyglet cannot be found.
 
 
 Thanks for the help so far! I really appreciate it. I don't think I could 
 figure this out on my own
 
 I haven't had time to look into this issue specifically, I'll do so in the 
 near future.
 
 Ronald
 
 
 
 
 
 On Jul 29, 2010, at 2:34 AM, Ronald Oussoren wrote:
 
 
 On 29 Jul, 2010, at 8:09, Ronald Oussoren wrote:
 
 
 On 28 Jul, 2010, at 18:38, Nathan Lemoine wrote:
 
 
 Traceback (most recent call last):
 File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py,
  line 602, in _run
 self.run_alias()
 File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py,
  line 548, in run_alias
 

Re: [Pythonmac-SIG] py2app error

2010-08-01 Thread Christopher Barker

Ronald Oussoren wrote:

the pyglet sources explicitly load /usr/local/lib/libavbin.dylib using ctypes.  
I could create a py2app recipe that copies libavbin.dylib into the application 
bundle, but that will probably not be used without patching the pyglet sources.



This is a problem in general with all ctypes uses. In fact, ctypes 
reminds me a bit of py2app in the sense that it has some built-in 
algorithms for searching for dynamic libs, and that these fail fairly often.


As for py2app, maybe the ctypes recipe could patch ctypes to look in a 
particular place in teh bundle, and then the user could specify which 
libs ctypes used, and py2ap would put them in the bundle.


-Chris


--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] py2app error

2010-08-01 Thread Ronald Oussoren

On 1 Aug, 2010, at 19:08, Christopher Barker wrote:

 Ronald Oussoren wrote:
 the pyglet sources explicitly load /usr/local/lib/libavbin.dylib using 
 ctypes.  I could create a py2app recipe that copies libavbin.dylib into the 
 application bundle, but that will probably not be used without patching the 
 pyglet sources.
 
 
 This is a problem in general with all ctypes uses. In fact, ctypes reminds me 
 a bit of py2app in the sense that it has some built-in algorithms for 
 searching for dynamic libs, and that these fail fairly often.

Please file bugs for that, I'm pretty sure that ctypes is supposed to implement 
the same algoritms as the platform dynamic linker.

W.r.t. py2app: I consider cases where py2app doesn't find modules or shared 
libraries bugs and should be fixed, either by making the core smarter or by 
adding recipes.   Please post reports about issues, especially when you can 
reproduce them in smallish examples (or at least examples that you can share 
with the outside world).

 
 As for py2app, maybe the ctypes recipe could patch ctypes to look in a 
 particular place in teh bundle, and then the user could specify which libs 
 ctypes used, and py2ap would put them in the bundle.

Yes, but that will require some additional trickery to ensure that ctypes looks 
in this special location before looking at the full name specified by the 
caller.

Actually finding which libraries are loaded using ctypes will sadly enough be 
impossible in general, although recipes could be used for the popular libaries.

Ronald



smime.p7s
Description: S/MIME cryptographic signature
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] py2app error

2010-08-01 Thread Nathan Lemoine
I'm using the most recent 1.1.4 version of pyglet, which I installed  
from the binary and I'm using the 2.5.1 version of Python that shipped  
with OS X 10.5. Would updating python fix the problem?



On Aug 1, 2010, at 2:55 AM, Ronald Oussoren wrote:



On 31 Jul, 2010, at 23:02, Nathan Lemoine wrote:

Running the testing application in the command line did confirm  
that the pyglet module isn't being found:


File /Users/Nate/dist/tester.app/Contents/Resources/__boot__.py,  
line 160, in _run

  execfile(path, globals(), globals())
File /Users/Nate/Desktop/tester.py, line 1, in module
  import pyglet
ImportError: No module named pyglet

Is there a way to manually add the path for pyglet to py2app's  
search or in the setup.py file to force the module to be loaded?


This is very odd. Which version of Python do you use? And likewise  
for pyglet?


I've installed pyglet for python 2.6 using the 1.1.4 binary  
installer on their site, and used easy_install-2.7 pyglet to  
install the python parts for python 2.7. Both result in a working  
application bundle.


There is misfeature in pyglet that makes this bundle not-quite- 
standalone though,  the pyglet sources explicitly load /usr/local/ 
lib/libavbin.dylib using ctypes.  I could create a py2app recipe  
that copies libavbin.dylib into the application bundle, but that  
will probably not be used without patching the pyglet sources.


I've attached the scripts I used to test.

Ronald

setup.pyrunner.py



On Jul 30, 2010, at 1:54 AM, Ronald Oussoren wrote:



On 30 Jul, 2010, at 2:59, Nathan Lemoine wrote:

I installed the 0.5.2 update, and I've tried making just a very  
simple pyglet app to play a movie file so that you all could try  
it if you want on your python distributions:


import pyglet

vidPath=video.avi ##put the path to a video file here
window = pyglet.window.Window()
source = pyglet.media.StreamingSource()
MediaLoad = pyglet.media.load(vidPath)
player = pyglet.media.Player()
player.queue(MediaLoad)
player.play()

@window.event
def on_draw():
player.get_texture().blit(0,0)

pyglet.app.run()


Thanks for the demo, that will definitly help in reproducing and  
fixing the problem.




Executing python setup.py py2app still gives me the same error:

Traceback (most recent call last):
File /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/ 
py2app/build_app.py, line 604, in _run

self.run_normal()
File /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/ 
py2app/build_app.py, line 675, in run_normal

self.create_binaries(py_files, pkgdirs, extensions, loader_files)
File /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/ 
py2app/build_app.py, line 739, in create_binaries

dry_run=self.dry_run)
File /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/ 
py2app/util.py, line 376, in byte_compile

if force or newer(mod.filename, cfile):
File /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/ 
py2app/util.py, line 172, in newer

msource = get_mtime(source)
File /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/ 
py2app/util.py, line 164, in get_mtime

info = zf.getinfo(rest)
File /System/Library/Frameworks/Python.framework/Versions/2.5/ 
lib/python2.5/zipfile.py, line 462, in getinfo

return self.NameToInfo[name]
KeyError: 'pyglet/__init__.pyc'
/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/zipfile.py(462)getinfo()

- return self.NameToInfo[name]
(Pdb)

I ran it in alias mode as well and it bundled 'tester.app'  
successfully. When I attempted to run the bundle, I just got a  
dialog box that said 'tester Error' and brought me to the  
MacPython website. I'm not sure how to find out what the issue is  
with the aliased bundle.


You can run the app from the command-line:  test.app/Contents/ 
MacOS/tester


When you do that you'll get error messages in your terminal  
window, and those should explain what's going on.  I expect that  
pyglet cannot be found.




Thanks for the help so far! I really appreciate it. I don't think  
I could figure this out on my own


I haven't had time to look into this issue specifically, I'll do  
so in the near future.


Ronald






On Jul 29, 2010, at 2:34 AM, Ronald Oussoren wrote:



On 29 Jul, 2010, at 8:09, Ronald Oussoren wrote:



On 28 Jul, 2010, at 18:38, Nathan Lemoine wrote:



Traceback (most recent call last):
File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/ 
py2app/build_app.py, line 602, in _run

self.run_alias()
File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/ 
py2app/build_app.py, line 548, in run_alias

dst = self.build_alias_executable(target, target.script)
File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/ 
py2app/build_app.py, line 1145, in build_alias_executable

appdir, resdir, plist = self.create_bundle(target, script)
File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/ 
py2app/build_app.py, line 1131, in create_bundle

use_runtime_preference=use_runtime_preference
File 

Re: [Pythonmac-SIG] py2app error

2010-08-01 Thread Christopher Barker

Ronald Oussoren wrote:

This is a problem in general with all ctypes uses. In fact, ctypes
reminds me a bit of py2app in the sense that it has some built-in
algorithms for searching for dynamic libs, and that these fail fairly often.


Please file bugs for that, I'm pretty sure that ctypes is supposed to
implement the same algoritms as the platform dynamic linker.


IIUC, on OS-X, the full path to a dll is specified when linked -- it 
sure seems that way.


So there is no normal search path.  But anyway, what I've seen is 
pacakges that don't find macports stuff, etc.


I've had to patch the package to make it work at all -- I haven't tried 
to us py2app on any of those yet though. When I do, I'll post a bug 
report here, though.



W.r.t. py2app: I consider cases where py2app doesn't find modules or
shared libraries bugs and should be fixed, either by making the core
smarter or by adding recipes.   Please post reports about issues,
especially when you can reproduce them in smallish examples (or at
least examples that you can share with the outside world).


will do.

But there aer some cases where dynamic importing is simpily goign to 
fail, and you can get a lot of those covered with recipes that bring in 
big 'ol packages that aren't needed, but I'm not sure I always want that.


And if the dynamic import is part of your own code, then it shouldn't be 
a recipe anyway.


But yes, the mainstream packages should all just work.


As for py2app, maybe the ctypes recipe could patch ctypes to look
in a particular place in the bundle, and then the user could
specify which libs ctypes used, and py2ap would put them in the
bundle.


Yes, but that will require some additional trickery to ensure that
ctypes looks in this special location before looking at the full name
specified by the caller.


yup. Maybe not worth it.


Actually finding which libraries are loaded using ctypes will sadly
enough be impossible in general, although recipes could be used for
the popular libaries.


Agreed.

Thanks,

-Chris


--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/ORR(206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115   (206) 526-6317   main reception

chris.bar...@noaa.gov
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] py2app error

2010-07-31 Thread Nathan Lemoine
Running the testing application in the command line did confirm that  
the pyglet module isn't being found:


  File /Users/Nate/dist/tester.app/Contents/Resources/__boot__.py,  
line 160, in _run

execfile(path, globals(), globals())
  File /Users/Nate/Desktop/tester.py, line 1, in module
import pyglet
ImportError: No module named pyglet

Is there a way to manually add the path for pyglet to py2app's search  
or in the setup.py file to force the module to be loaded?


On Jul 30, 2010, at 1:54 AM, Ronald Oussoren wrote:



On 30 Jul, 2010, at 2:59, Nathan Lemoine wrote:

I installed the 0.5.2 update, and I've tried making just a very  
simple pyglet app to play a movie file so that you all could try it  
if you want on your python distributions:


import pyglet

vidPath=video.avi ##put the path to a video file here
window = pyglet.window.Window()
source = pyglet.media.StreamingSource()
MediaLoad = pyglet.media.load(vidPath)
player = pyglet.media.Player()
player.queue(MediaLoad)
player.play()

@window.event
def on_draw():
player.get_texture().blit(0,0)

pyglet.app.run()


Thanks for the demo, that will definitly help in reproducing and  
fixing the problem.




Executing python setup.py py2app still gives me the same error:

Traceback (most recent call last):
File /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/ 
py2app/build_app.py, line 604, in _run

  self.run_normal()
File /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/ 
py2app/build_app.py, line 675, in run_normal

  self.create_binaries(py_files, pkgdirs, extensions, loader_files)
File /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/ 
py2app/build_app.py, line 739, in create_binaries

  dry_run=self.dry_run)
File /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/ 
py2app/util.py, line 376, in byte_compile

  if force or newer(mod.filename, cfile):
File /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/ 
py2app/util.py, line 172, in newer

  msource = get_mtime(source)
File /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/ 
py2app/util.py, line 164, in get_mtime

  info = zf.getinfo(rest)
File /System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/zipfile.py, line 462, in getinfo

  return self.NameToInfo[name]
KeyError: 'pyglet/__init__.pyc'
/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/zipfile.py(462)getinfo()

- return self.NameToInfo[name]
(Pdb)

I ran it in alias mode as well and it bundled 'tester.app'  
successfully. When I attempted to run the bundle, I just got a  
dialog box that said 'tester Error' and brought me to the MacPython  
website. I'm not sure how to find out what the issue is with the  
aliased bundle.


You can run the app from the command-line:  test.app/Contents/MacOS/ 
tester


When you do that you'll get error messages in your terminal window,  
and those should explain what's going on.  I expect that pyglet  
cannot be found.




Thanks for the help so far! I really appreciate it. I don't think I  
could figure this out on my own


I haven't had time to look into this issue specifically, I'll do so  
in the near future.


Ronald






On Jul 29, 2010, at 2:34 AM, Ronald Oussoren wrote:



On 29 Jul, 2010, at 8:09, Ronald Oussoren wrote:



On 28 Jul, 2010, at 18:38, Nathan Lemoine wrote:



Traceback (most recent call last):
File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/ 
py2app/build_app.py, line 602, in _run

self.run_alias()
File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/ 
py2app/build_app.py, line 548, in run_alias

dst = self.build_alias_executable(target, target.script)
File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/ 
py2app/build_app.py, line 1145, in build_alias_executable

appdir, resdir, plist = self.create_bundle(target, script)
File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/ 
py2app/build_app.py, line 1131, in create_bundle

use_runtime_preference=use_runtime_preference
File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/ 
py2app/build_app.py, line 1120, in create_appbundle

extension=self.extension,
File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/ 
py2app/create_appbundle.py, line 34, in create_appbundle

copy(srcmain, destmain)
File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/ 
py2app/util.py, line 233, in mergecopy

return macholib.util.mergecopy(src, dest)
File build/bdist.macosx-10.5-i386/egg/macholib/util.py, line  
111, in mergecopy

copy2(src, dest)
File build/bdist.macosx-10.5-i386/egg/macholib/util.py, line  
43, in copy2

shutil.copy2(fsencoding(src), fsencoding(dst))
File /System/Library/Frameworks/Python.framework/Versions/2.5/ 
lib/python2.5/shutil.py, line 91, in copy2

copyfile(src, dst)
File /System/Library/Frameworks/Python.framework/Versions/2.5/ 
lib/python2.5/shutil.py, line 46, in copyfile

fsrc = open(src, 'rb')
IOError: [Errno 2] No such file or directory: '/Library/Python/ 

Re: [Pythonmac-SIG] py2app error

2010-07-29 Thread Ronald Oussoren

On 28 Jul, 2010, at 18:38, Nathan Lemoine wrote:

 Hey everyone,
 
 I've been trying to bundle my script into a standalone Mac application using 
 the most updated version of py2app and Python 2.5 on OSX 10.5.8. I'm getting 
 error messages during the compile procedure and I haven't come across a way 
 to fix it. So I can run the py2applet and generate the setup.py file easily.
 
 Here's the output when I attempt python setup.py py2app:
 
 Traceback (most recent call last):
  File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py, 
 line 604, in _run
self.run_normal()
  File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py, 
 line 675, in run_normal
self.create_binaries(py_files, pkgdirs, extensions, loader_files)
  File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py, 
 line 739, in create_binaries
dry_run=self.dry_run)
  File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/util.py, line 
 376, in byte_compile
if force or newer(mod.filename, cfile):
  File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/util.py, line 
 172, in newer
msource = get_mtime(source)
  File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/util.py, line 
 164, in get_mtime
info = zf.getinfo(rest)
  File 
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/zipfile.py,
  line 462, in getinfo
return self.NameToInfo[name]
 KeyError: 'pyglet/__init__.pyc'
  /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/zipfile.py(462)getinfo()
 - return self.NameToInfo[name]

Could you create a small pyglet program with a setup.py that demonstrates the 
problem?   py2app should be able to find packages used by your script, and even 
if it didn't find pyglet it shouldn't fail in this way. Is 
/Library/Python/2.5/site-packages/pyglet-1.1.4-py2.5.egg a file or a 
directory (both should work, but you never know)?

 
 
 So the KeyError would tell me that py2app does not have pyglet in its 
 dictionary, so that it doesn't know where to search to find pyglet, correct? 
 When I go into Python and find the path for the pyglet module 
 (pyglet.__path__), I receive 
 ['/Library/Python/2.5/site-packages/pyglet-1.1.4-py2.5.egg/pyglet'].
 
 Do I have to tell py2app specifically where to find the pyglet module? If so, 
 how do I do that.
 
 Also, whenever I run py2app in alias mode, I get a completely different error:
 
 sudo python py2app setup.py -A (sudo is run because I get a permission denied 
 error if I don't use it(
 
 Traceback (most recent call last):
  File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py, 
 line 602, in _run
self.run_alias()
  File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py, 
 line 548, in run_alias
dst = self.build_alias_executable(target, target.script)
  File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py, 
 line 1145, in build_alias_executable
appdir, resdir, plist = self.create_bundle(target, script)
  File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py, 
 line 1131, in create_bundle
use_runtime_preference=use_runtime_preference
  File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py, 
 line 1120, in create_appbundle
extension=self.extension,
  File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/create_appbundle.py,
  line 34, in create_appbundle
copy(srcmain, destmain)
  File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/util.py, line 
 233, in mergecopy
return macholib.util.mergecopy(src, dest)
  File build/bdist.macosx-10.5-i386/egg/macholib/util.py, line 111, in 
 mergecopy
copy2(src, dest)
  File build/bdist.macosx-10.5-i386/egg/macholib/util.py, line 43, in copy2
shutil.copy2(fsencoding(src), fsencoding(dst))
  File 
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/shutil.py,
  line 91, in copy2
copyfile(src, dst)
  File 
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/shutil.py,
  line 46, in copyfile
fsrc = open(src, 'rb')
 IOError: [Errno 2] No such file or directory: 
 '/Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/apptemplate/prebuilt/main-i386'
  /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/shutil.py(53)copyfile()
 - fsrc.close()
 
 I went into the Python Framework folder and the only prebuilt executeable in 
 there is 32bit one, there isn't a main-i386 file. Am I missing a file?

You aren't missing a file, py2app doesn't have a main-i386 file.  As a quick 
workaround you can copy 
/Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/apptemplate/prebuilt/main-fat
  to 
/Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/apptemplate/prebuilt/main-i386.

I will tweak py2app to better 

Re: [Pythonmac-SIG] py2app error

2010-07-29 Thread Ronald Oussoren

On 29 Jul, 2010, at 8:09, Ronald Oussoren wrote:

 
 On 28 Jul, 2010, at 18:38, Nathan Lemoine wrote:
 
 
 Traceback (most recent call last):
 File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py,
  line 602, in _run
   self.run_alias()
 File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py,
  line 548, in run_alias
   dst = self.build_alias_executable(target, target.script)
 File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py,
  line 1145, in build_alias_executable
   appdir, resdir, plist = self.create_bundle(target, script)
 File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py,
  line 1131, in create_bundle
   use_runtime_preference=use_runtime_preference
 File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py,
  line 1120, in create_appbundle
   extension=self.extension,
 File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/create_appbundle.py,
  line 34, in create_appbundle
   copy(srcmain, destmain)
 File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/util.py, 
 line 233, in mergecopy
   return macholib.util.mergecopy(src, dest)
 File build/bdist.macosx-10.5-i386/egg/macholib/util.py, line 111, in 
 mergecopy
   copy2(src, dest)
 File build/bdist.macosx-10.5-i386/egg/macholib/util.py, line 43, in copy2
   shutil.copy2(fsencoding(src), fsencoding(dst))
 File 
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/shutil.py,
  line 91, in copy2
   copyfile(src, dst)
 File 
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/shutil.py,
  line 46, in copyfile
   fsrc = open(src, 'rb')
 IOError: [Errno 2] No such file or directory: 
 '/Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/apptemplate/prebuilt/main-i386'
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/shutil.py(53)copyfile()
 - fsrc.close()
 
 I went into the Python Framework folder and the only prebuilt executeable in 
 there is 32bit one, there isn't a main-i386 file. Am I missing a file?
 
 You aren't missing a file, py2app doesn't have a main-i386 file.  As a quick 
 workaround you can copy 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/apptemplate/prebuilt/main-fat
   to 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/apptemplate/prebuilt/main-i386.
 
 I will tweak py2app to better handle this, that will be in the next release 
 (0.5.2, hopefully later this week).

I've upload py2app 0.5.2. With this version I can build a pyobjc application 
using python 2.5 (without the IOError exception), the pyglet error is not yet 
fixed.

Ronald



smime.p7s
Description: S/MIME cryptographic signature
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] py2app error

2010-07-29 Thread Ronald Oussoren

On 30 Jul, 2010, at 2:59, Nathan Lemoine wrote:

 I installed the 0.5.2 update, and I've tried making just a very simple pyglet 
 app to play a movie file so that you all could try it if you want on your 
 python distributions:
 
 import pyglet
 
 vidPath=video.avi ##put the path to a video file here
 window = pyglet.window.Window()
 source = pyglet.media.StreamingSource()
 MediaLoad = pyglet.media.load(vidPath)
 player = pyglet.media.Player()
 player.queue(MediaLoad)
 player.play()
 
 @window.event
 def on_draw():
   player.get_texture().blit(0,0)
 
 pyglet.app.run()

Thanks for the demo, that will definitly help in reproducing and fixing the 
problem.

 
 Executing python setup.py py2app still gives me the same error:
 
 Traceback (most recent call last):
  File 
 /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/py2app/build_app.py,
  line 604, in _run
self.run_normal()
  File 
 /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/py2app/build_app.py,
  line 675, in run_normal
self.create_binaries(py_files, pkgdirs, extensions, loader_files)
  File 
 /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/py2app/build_app.py,
  line 739, in create_binaries
dry_run=self.dry_run)
  File 
 /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/py2app/util.py, 
 line 376, in byte_compile
if force or newer(mod.filename, cfile):
  File 
 /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/py2app/util.py, 
 line 172, in newer
msource = get_mtime(source)
  File 
 /Library/Python/2.5/site-packages/py2app-0.5.2-py2.5.egg/py2app/util.py, 
 line 164, in get_mtime
info = zf.getinfo(rest)
  File 
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/zipfile.py,
  line 462, in getinfo
return self.NameToInfo[name]
 KeyError: 'pyglet/__init__.pyc'
  /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/zipfile.py(462)getinfo()
 - return self.NameToInfo[name]
 (Pdb)
 
 I ran it in alias mode as well and it bundled 'tester.app' successfully. When 
 I attempted to run the bundle, I just got a dialog box that said 'tester 
 Error' and brought me to the MacPython website. I'm not sure how to find out 
 what the issue is with the aliased bundle.

You can run the app from the command-line:  test.app/Contents/MacOS/tester

When you do that you'll get error messages in your terminal window, and those 
should explain what's going on.  I expect that pyglet cannot be found.

 
 Thanks for the help so far! I really appreciate it. I don't think I could 
 figure this out on my own

I haven't had time to look into this issue specifically, I'll do so in the near 
future.

Ronald


 
 
 
 On Jul 29, 2010, at 2:34 AM, Ronald Oussoren wrote:
 
 
 On 29 Jul, 2010, at 8:09, Ronald Oussoren wrote:
 
 
 On 28 Jul, 2010, at 18:38, Nathan Lemoine wrote:
 
 
 Traceback (most recent call last):
 File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py,
  line 602, in _run
 self.run_alias()
 File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py,
  line 548, in run_alias
 dst = self.build_alias_executable(target, target.script)
 File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py,
  line 1145, in build_alias_executable
 appdir, resdir, plist = self.create_bundle(target, script)
 File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py,
  line 1131, in create_bundle
 use_runtime_preference=use_runtime_preference
 File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/build_app.py,
  line 1120, in create_appbundle
 extension=self.extension,
 File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/create_appbundle.py,
  line 34, in create_appbundle
 copy(srcmain, destmain)
 File 
 /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/util.py, 
 line 233, in mergecopy
 return macholib.util.mergecopy(src, dest)
 File build/bdist.macosx-10.5-i386/egg/macholib/util.py, line 111, in 
 mergecopy
 copy2(src, dest)
 File build/bdist.macosx-10.5-i386/egg/macholib/util.py, line 43, in copy2
 shutil.copy2(fsencoding(src), fsencoding(dst))
 File 
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/shutil.py,
  line 91, in copy2
 copyfile(src, dst)
 File 
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/shutil.py,
  line 46, in copyfile
 fsrc = open(src, 'rb')
 IOError: [Errno 2] No such file or directory: 
 '/Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/apptemplate/prebuilt/main-i386'
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/shutil.py(53)copyfile()
 - fsrc.close()
 
 I went into the Python Framework folder and the only prebuilt executeable 
 in there is 32bit one, there isn't a main-i386 file. Am I missing a file?
 
 You aren't missing a file, py2app doesn't have a main-i386 file.  As a 
 quick workaround you can copy 
 

[Pythonmac-SIG] py2app error

2010-07-28 Thread Nathan Lemoine

Hey everyone,

I've been trying to bundle my script into a standalone Mac application  
using the most updated version of py2app and Python 2.5 on OSX 10.5.8.  
I'm getting error messages during the compile procedure and I haven't  
come across a way to fix it. So I can run the py2applet and generate  
the setup.py file easily.


Here's the output when I attempt python setup.py py2app:

Traceback (most recent call last):
  File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/ 
build_app.py, line 604, in _run

self.run_normal()
  File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/ 
build_app.py, line 675, in run_normal

self.create_binaries(py_files, pkgdirs, extensions, loader_files)
  File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/ 
build_app.py, line 739, in create_binaries

dry_run=self.dry_run)
  File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/ 
util.py, line 376, in byte_compile

if force or newer(mod.filename, cfile):
  File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/ 
util.py, line 172, in newer

msource = get_mtime(source)
  File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/ 
util.py, line 164, in get_mtime

info = zf.getinfo(rest)
  File /System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/zipfile.py, line 462, in getinfo

return self.NameToInfo[name]
KeyError: 'pyglet/__init__.pyc'
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/zipfile.py(462)getinfo()

- return self.NameToInfo[name]


So the KeyError would tell me that py2app does not have pyglet in its  
dictionary, so that it doesn't know where to search to find pyglet,  
correct? When I go into Python and find the path for the pyglet module  
(pyglet.__path__), I receive ['/Library/Python/2.5/site-packages/ 
pyglet-1.1.4-py2.5.egg/pyglet'].


Do I have to tell py2app specifically where to find the pyglet module?  
If so, how do I do that.


Also, whenever I run py2app in alias mode, I get a completely  
different error:


sudo python py2app setup.py -A (sudo is run because I get a permission  
denied error if I don't use it(


Traceback (most recent call last):
  File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/ 
build_app.py, line 602, in _run

self.run_alias()
  File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/ 
build_app.py, line 548, in run_alias

dst = self.build_alias_executable(target, target.script)
  File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/ 
build_app.py, line 1145, in build_alias_executable

appdir, resdir, plist = self.create_bundle(target, script)
  File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/ 
build_app.py, line 1131, in create_bundle

use_runtime_preference=use_runtime_preference
  File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/ 
build_app.py, line 1120, in create_appbundle

extension=self.extension,
  File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/ 
create_appbundle.py, line 34, in create_appbundle

copy(srcmain, destmain)
  File /Library/Python/2.5/site-packages/py2app-0.5-py2.5.egg/py2app/ 
util.py, line 233, in mergecopy

return macholib.util.mergecopy(src, dest)
  File build/bdist.macosx-10.5-i386/egg/macholib/util.py, line 111,  
in mergecopy

copy2(src, dest)
  File build/bdist.macosx-10.5-i386/egg/macholib/util.py, line 43,  
in copy2

shutil.copy2(fsencoding(src), fsencoding(dst))
  File /System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/shutil.py, line 91, in copy2

copyfile(src, dst)
  File /System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/shutil.py, line 46, in copyfile

fsrc = open(src, 'rb')
IOError: [Errno 2] No such file or directory: '/Library/Python/2.5/ 
site-packages/py2app-0.5-py2.5.egg/py2app/apptemplate/prebuilt/main- 
i386'
 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/ 
python2.5/shutil.py(53)copyfile()

- fsrc.close()

I went into the Python Framework folder and the only prebuilt  
executeable in there is 32bit one, there isn't a main-i386 file. Am I  
missing a file?


Any help is appreciated

Nathan Lemoine

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG


Re: [Pythonmac-SIG] Py2app error with libpng

2009-11-24 Thread Ronald Oussoren

On 6 Nov, 2009, at 23:55, Kevin Walzer wrote:

 On 11/6/09 11:27 AM, Brian Zambrano wrote:
 Hi there,
 
 I'm building an app with py2app and it runs successfully both on my
 computer and a friends.  We both have the developer tools installed.  On
 two other Macs, the application would die when loading one of the
 matplotlib .so files.  The problem is that the .so, matplotlib/_png.so,
 is linking to:
 
 /usr/X11/lib/libpng12.0.dylib
 
 ...which doesn't exist on the two machines where the crash is occurring.
 
 My understanding is that py2app (or, macholib?) tries to resolve these
 dependencies and copy over the necessary dylibs.
 
 I've tried adding /usr/X11/lib/libpng12.0.dylib to the build with the
 'frameworks' argument, but that doesn't seem to do anything.  Now, I'm
 thinking of doing a manual copy of that file into the Framework
 directory, along with using install_name_tool.
 
 What's the best way to handle this?
 
 
 py2app typically doesn't include system files. I think /usr/lib is considered 
 a system directory, which may explain why it's not bundling the files.

That's correct. /usr/lib is a system directory, and hence anything in it is 
assumed to be a file owned by Apple. That's why those files are not copied into 
the application bundle.

Ronald
 
 --Kevin
 
 -- 
 Kevin Walzer
 Code by Kevin
 http://www.codebykevin.com
 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig



smime.p7s
Description: S/MIME cryptographic signature
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] py2app error with pygraphviz module

2008-02-19 Thread hexsprite

I am using py2app to create an application that has a dependency on
pygraphviz module.

It builds fine but when I run it I get the following error in the console:

-

19/02/08 11:18:14 AM PPM[7521] PPM Error
An unexpected error has occurred during execution of the main script
ImportError:
'/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/pygraphviz/_graphviz.so'
not found



I checked that the library was copied and sure it enough here it is:

--
total 240
drwxr-xr-x  3 jordan  jordan 102 19 Feb 11:11 .
drwxr-xr-x  4 jordan  jordan 136 19 Feb 11:11 ..
-rw-r--r--  1 jordan  jordan  120996 19 Feb 11:11 _graphviz.so
[EMAIL PROTECTED] pygraphviz $ pwd
/Users/jordan/Code/willppm/dist/PPM.app/Contents/Resources/lib/python2.5/lib-dynload/pygraphviz
[EMAIL PROTECTED] pygraphviz $ 
---

For some reason it is not using the packaged version of this SO.

Any ideas why?

Thanks

-hex.


-- 
View this message in context: 
http://www.nabble.com/py2app-error-with-pygraphviz-module-tp15561550p15561550.html
Sent from the Python - pythonmac-sig mailing list archive at Nabble.com.

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] py2app error with /usr/bin/strip

2007-02-14 Thread Chris Van Bael
  What are the versions of py2app, macholib, altgraph, modulegraph on your
  machine? Likewise for python itself.
 
  Just in case this is important: what version of OSX are you using, is it
  an Intel or PPC system and do you have the Developer Tools installed?

 from my first mail:
  I am working on an old G3 ppc ibook, I am running OS 10.4.8 and python 
  2.4.4, Py2app version is 0.3.5 .

 and on top of that :
 i have Xcode tools for 10.4, macholib-1.1-py2.4, altgraph-0.6.7-py2.4,
 modulegraph-0.7-py2.4


Hi, I thought I had replied to the whole list, but apparently only to Enrike.

I have exactly the same software versions on my iBook G4.
I had the same Py2App on my Mini G4 where it worked after several
reinstallations.  Don't know about which versions of MachoLib,
AltGraph or ModuleGraph I had.
I'll archive my Python dir in case that's useful for you...

Ronald,
do you need anything else from us to be able to solve this problem?
Thanks again for the effort,

Chris
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] py2app error with /usr/bin/strip

2007-02-06 Thread altern
Ronald Oussoren wrote:
 
 On 5 Feb, 2007, at 22:04, altern wrote:
 
 Ronald Oussoren wrote:
 On 5 Feb, 2007, at 18:30, Chris Van Bael wrote:
 Hi,

 I'm getting essentially the same error for some time now.
 Could anybody please explain what is going wrong here exactly, because
 me and some other people are having the same error and re-installing
 py2app doesn't fix the problem.

 See:
 http://mail.python.org/pipermail/pythonmac-sig/2007-January/ 
 018645.html
 http://mail.python.org/pipermail/pythonmac-sig/2006-October/ 
 018390.html
 http://mail.python.org/pipermail/pythonmac-sig/2006-October/ 
 018391.html

 It would be a shame that I cannot provide a universal OS X version of
 our program because of this problem..
 Could you please try to provide an example that demonstrates te  
 problem? Without such an example there's little chance that I'll 
 look  into this unless I happen to run into this problem myself.

 in my computer something as simple as just

 while 1: print 'looping'

 causes the error when trying to create an app. I also tried with some 
 other basic scripts with same results
 
 What are the versions of py2app, macholib, altgraph, modulegraph on your 
 machine? Likewise for python itself.
 
 Just in case this is important: what version of OSX are you using, is it 
 an Intel or PPC system and do you have the Developer Tools installed?

from my first mail:
 I am working on an old G3 ppc ibook, I am running OS 10.4.8 and python 2.4.4, 
 Py2app version is 0.3.5 .

and on top of that :
i have Xcode tools for 10.4, macholib-1.1-py2.4, altgraph-0.6.7-py2.4, 
modulegraph-0.7-py2.4




 Ronald

 enrike


 Ronald
 Chris

 On 2/5/07, Bob Ippolito [EMAIL PROTECTED] wrote:
 When you see an error like that, it means there's a bug in macholib
 that caused it to produce a bogus file. Turning strip off doesn't
 really fix anything...

 -bob

 On 2/5/07, altern [EMAIL PROTECTED] wrote:
 hi again

 I solved the problem by doing
 $ python setup.py py2app --no-strip

 I read this about strip
 --strip (-S)strip debug and local symbols from output  
 (on by
  default, for compatibility)

 could anyone explain a bit more about what this is? or maybe  
 point to
 somewhere i can read about it. I am interested because last time  
 i used
 this machine i did not need to use this (only use it every now  
 and then
 for testing on OSX), so I am trying to find out what is the  
 difference
 from last time.

 thanks

 enrike


 altern wrote:
 Hi

 I am getting this error when trying to use py2app.

 $ py2applet --make-setup glut_opengl.py
 $ python setup.py py2app
 ...
 ...
 stripping bz2.so
 stripping zlib.so
 stripping _codecs_tw.so
 stripping umath.so
 stripping binascii.so
 /usr/bin/strip: for architecture i386 object:
 /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/python
 malformed object (unknown flavor for flavor number 0 in  
 LC_UNIXTHREAD
 command 13 can't byte swap it)
 /usr/bin/strip: for architecture i386 object:
 /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/ 
 glut_opengl
 malformed object (unknown flavor for flavor number 0 in  
 LC_UNIXTHREAD
 command 10 can't byte swap it)
 stripping saved 8991796 bytes (7898608 / 16890404)


 I also tried with
 $ python setup.py py2app --prefer-ppc
 but i got the same error. Because of the '/usr/bin/strip: for
 architecture i386 object' I thought it might be a problem with my
 processor, note that I am working on an old G3 ppc ibook, I am  
 running
 OS 10.4.8 and python 2.4.4, Py2app version is 0.3.5 .

 Later I tried with another script, one that does not use  
 pyOpengl, same
 error again.

 thanks

 enrike

 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig

 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig

 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig
 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig

 
 

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] py2app error with /usr/bin/strip

2007-02-05 Thread altern
Hi

I am getting this error when trying to use py2app.

$ py2applet --make-setup glut_opengl.py
$ python setup.py py2app
...
...
stripping bz2.so
stripping zlib.so
stripping _codecs_tw.so
stripping umath.so
stripping binascii.so
/usr/bin/strip: for architecture i386 object: 
/Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/python 
malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD 
command 13 can't byte swap it)
/usr/bin/strip: for architecture i386 object: 
/Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/glut_opengl 
malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD 
command 10 can't byte swap it)
stripping saved 8991796 bytes (7898608 / 16890404)


I also tried with
$ python setup.py py2app --prefer-ppc
but i got the same error. Because of the '/usr/bin/strip: for 
architecture i386 object' I thought it might be a problem with my 
processor, note that I am working on an old G3 ppc ibook, I am running 
OS 10.4.8 and python 2.4.4, Py2app version is 0.3.5 .

Later I tried with another script, one that does not use pyOpengl, same 
error again.

thanks

enrike
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] py2app error with /usr/bin/strip

2007-02-05 Thread altern
hi again

I solved the problem by doing
$ python setup.py py2app --no-strip

I read this about strip
--strip (-S)strip debug and local symbols from output (on by
 default, for compatibility)

could anyone explain a bit more about what this is? or maybe point to 
somewhere i can read about it. I am interested because last time i used 
this machine i did not need to use this (only use it every now and then 
for testing on OSX), so I am trying to find out what is the difference 
from last time.

thanks

enrike


altern wrote:
 Hi
 
 I am getting this error when trying to use py2app.
 
 $ py2applet --make-setup glut_opengl.py
 $ python setup.py py2app
 ...
 ...
 stripping bz2.so
 stripping zlib.so
 stripping _codecs_tw.so
 stripping umath.so
 stripping binascii.so
 /usr/bin/strip: for architecture i386 object: 
 /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/python 
 malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD 
 command 13 can't byte swap it)
 /usr/bin/strip: for architecture i386 object: 
 /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/glut_opengl 
 malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD 
 command 10 can't byte swap it)
 stripping saved 8991796 bytes (7898608 / 16890404)
 
 
 I also tried with
 $ python setup.py py2app --prefer-ppc
 but i got the same error. Because of the '/usr/bin/strip: for 
 architecture i386 object' I thought it might be a problem with my 
 processor, note that I am working on an old G3 ppc ibook, I am running 
 OS 10.4.8 and python 2.4.4, Py2app version is 0.3.5 .
 
 Later I tried with another script, one that does not use pyOpengl, same 
 error again.
 
 thanks
 
 enrike
 

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] py2app error with /usr/bin/strip

2007-02-05 Thread Bob Ippolito
When you see an error like that, it means there's a bug in macholib
that caused it to produce a bogus file. Turning strip off doesn't
really fix anything...

-bob

On 2/5/07, altern [EMAIL PROTECTED] wrote:
 hi again

 I solved the problem by doing
 $ python setup.py py2app --no-strip

 I read this about strip
 --strip (-S)strip debug and local symbols from output (on by
  default, for compatibility)

 could anyone explain a bit more about what this is? or maybe point to
 somewhere i can read about it. I am interested because last time i used
 this machine i did not need to use this (only use it every now and then
 for testing on OSX), so I am trying to find out what is the difference
 from last time.

 thanks

 enrike


 altern wrote:
  Hi
 
  I am getting this error when trying to use py2app.
 
  $ py2applet --make-setup glut_opengl.py
  $ python setup.py py2app
  ...
  ...
  stripping bz2.so
  stripping zlib.so
  stripping _codecs_tw.so
  stripping umath.so
  stripping binascii.so
  /usr/bin/strip: for architecture i386 object:
  /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/python
  malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD
  command 13 can't byte swap it)
  /usr/bin/strip: for architecture i386 object:
  /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/glut_opengl
  malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD
  command 10 can't byte swap it)
  stripping saved 8991796 bytes (7898608 / 16890404)
 
 
  I also tried with
  $ python setup.py py2app --prefer-ppc
  but i got the same error. Because of the '/usr/bin/strip: for
  architecture i386 object' I thought it might be a problem with my
  processor, note that I am working on an old G3 ppc ibook, I am running
  OS 10.4.8 and python 2.4.4, Py2app version is 0.3.5 .
 
  Later I tried with another script, one that does not use pyOpengl, same
  error again.
 
  thanks
 
  enrike
 

 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] py2app error with /usr/bin/strip

2007-02-05 Thread Chris Van Bael
Hi,

I'm getting essentially the same error for some time now.
Could anybody please explain what is going wrong here exactly, because
me and some other people are having the same error and re-installing
py2app doesn't fix the problem.

See:
http://mail.python.org/pipermail/pythonmac-sig/2007-January/018645.html
http://mail.python.org/pipermail/pythonmac-sig/2006-October/018390.html
http://mail.python.org/pipermail/pythonmac-sig/2006-October/018391.html

It would be a shame that I cannot provide a universal OS X version of
our program because of this problem..

Chris

On 2/5/07, Bob Ippolito [EMAIL PROTECTED] wrote:
 When you see an error like that, it means there's a bug in macholib
 that caused it to produce a bogus file. Turning strip off doesn't
 really fix anything...

 -bob

 On 2/5/07, altern [EMAIL PROTECTED] wrote:
  hi again
 
  I solved the problem by doing
  $ python setup.py py2app --no-strip
 
  I read this about strip
  --strip (-S)strip debug and local symbols from output (on by
   default, for compatibility)
 
  could anyone explain a bit more about what this is? or maybe point to
  somewhere i can read about it. I am interested because last time i used
  this machine i did not need to use this (only use it every now and then
  for testing on OSX), so I am trying to find out what is the difference
  from last time.
 
  thanks
 
  enrike
 
 
  altern wrote:
   Hi
  
   I am getting this error when trying to use py2app.
  
   $ py2applet --make-setup glut_opengl.py
   $ python setup.py py2app
   ...
   ...
   stripping bz2.so
   stripping zlib.so
   stripping _codecs_tw.so
   stripping umath.so
   stripping binascii.so
   /usr/bin/strip: for architecture i386 object:
   /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/python
   malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD
   command 13 can't byte swap it)
   /usr/bin/strip: for architecture i386 object:
   /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/glut_opengl
   malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD
   command 10 can't byte swap it)
   stripping saved 8991796 bytes (7898608 / 16890404)
  
  
   I also tried with
   $ python setup.py py2app --prefer-ppc
   but i got the same error. Because of the '/usr/bin/strip: for
   architecture i386 object' I thought it might be a problem with my
   processor, note that I am working on an old G3 ppc ibook, I am running
   OS 10.4.8 and python 2.4.4, Py2app version is 0.3.5 .
  
   Later I tried with another script, one that does not use pyOpengl, same
   error again.
  
   thanks
  
   enrike
  
 
  ___
  Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
  http://mail.python.org/mailman/listinfo/pythonmac-sig
 
 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] py2app error with /usr/bin/strip

2007-02-05 Thread Bob Ippolito
As I said, it's some bug in macholib that causes it to produce an
executable that isn't formed correctly. The fix for the problem is to
find and fix whatever bug this happens to be in macholib. Personally I
won't have time to look at this problem for a while.

-bob

On 2/5/07, Chris Van Bael [EMAIL PROTECTED] wrote:
 Hi,

 I'm getting essentially the same error for some time now.
 Could anybody please explain what is going wrong here exactly, because
 me and some other people are having the same error and re-installing
 py2app doesn't fix the problem.

 See:
 http://mail.python.org/pipermail/pythonmac-sig/2007-January/018645.html
 http://mail.python.org/pipermail/pythonmac-sig/2006-October/018390.html
 http://mail.python.org/pipermail/pythonmac-sig/2006-October/018391.html

 It would be a shame that I cannot provide a universal OS X version of
 our program because of this problem..

 Chris

 On 2/5/07, Bob Ippolito [EMAIL PROTECTED] wrote:
  When you see an error like that, it means there's a bug in macholib
  that caused it to produce a bogus file. Turning strip off doesn't
  really fix anything...
 
  -bob
 
  On 2/5/07, altern [EMAIL PROTECTED] wrote:
   hi again
  
   I solved the problem by doing
   $ python setup.py py2app --no-strip
  
   I read this about strip
   --strip (-S)strip debug and local symbols from output (on by
default, for compatibility)
  
   could anyone explain a bit more about what this is? or maybe point to
   somewhere i can read about it. I am interested because last time i used
   this machine i did not need to use this (only use it every now and then
   for testing on OSX), so I am trying to find out what is the difference
   from last time.
  
   thanks
  
   enrike
  
  
   altern wrote:
Hi
   
I am getting this error when trying to use py2app.
   
$ py2applet --make-setup glut_opengl.py
$ python setup.py py2app
...
...
stripping bz2.so
stripping zlib.so
stripping _codecs_tw.so
stripping umath.so
stripping binascii.so
/usr/bin/strip: for architecture i386 object:
/Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/python
malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD
command 13 can't byte swap it)
/usr/bin/strip: for architecture i386 object:
/Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/glut_opengl
malformed object (unknown flavor for flavor number 0 in LC_UNIXTHREAD
command 10 can't byte swap it)
stripping saved 8991796 bytes (7898608 / 16890404)
   
   
I also tried with
$ python setup.py py2app --prefer-ppc
but i got the same error. Because of the '/usr/bin/strip: for
architecture i386 object' I thought it might be a problem with my
processor, note that I am working on an old G3 ppc ibook, I am running
OS 10.4.8 and python 2.4.4, Py2app version is 0.3.5 .
   
Later I tried with another script, one that does not use pyOpengl, same
error again.
   
thanks
   
enrike
   
  
   ___
   Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
   http://mail.python.org/mailman/listinfo/pythonmac-sig
  
  ___
  Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
  http://mail.python.org/mailman/listinfo/pythonmac-sig
 

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] py2app error with /usr/bin/strip

2007-02-05 Thread Ronald Oussoren

On 5 Feb, 2007, at 18:30, Chris Van Bael wrote:

 Hi,

 I'm getting essentially the same error for some time now.
 Could anybody please explain what is going wrong here exactly, because
 me and some other people are having the same error and re-installing
 py2app doesn't fix the problem.

 See:
 http://mail.python.org/pipermail/pythonmac-sig/2007-January/ 
 018645.html
 http://mail.python.org/pipermail/pythonmac-sig/2006-October/ 
 018390.html
 http://mail.python.org/pipermail/pythonmac-sig/2006-October/ 
 018391.html

 It would be a shame that I cannot provide a universal OS X version of
 our program because of this problem..

Could you please try to provide an example that demonstrates te  
problem? Without such an example there's little chance that I'll look  
into this unless I happen to run into this problem myself.

Ronald


 Chris

 On 2/5/07, Bob Ippolito [EMAIL PROTECTED] wrote:
 When you see an error like that, it means there's a bug in macholib
 that caused it to produce a bogus file. Turning strip off doesn't
 really fix anything...

 -bob

 On 2/5/07, altern [EMAIL PROTECTED] wrote:
 hi again

 I solved the problem by doing
 $ python setup.py py2app --no-strip

 I read this about strip
 --strip (-S)strip debug and local symbols from output  
 (on by
  default, for compatibility)

 could anyone explain a bit more about what this is? or maybe  
 point to
 somewhere i can read about it. I am interested because last time  
 i used
 this machine i did not need to use this (only use it every now  
 and then
 for testing on OSX), so I am trying to find out what is the  
 difference
 from last time.

 thanks

 enrike


 altern wrote:
 Hi

 I am getting this error when trying to use py2app.

 $ py2applet --make-setup glut_opengl.py
 $ python setup.py py2app
 ...
 ...
 stripping bz2.so
 stripping zlib.so
 stripping _codecs_tw.so
 stripping umath.so
 stripping binascii.so
 /usr/bin/strip: for architecture i386 object:
 /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/python
 malformed object (unknown flavor for flavor number 0 in  
 LC_UNIXTHREAD
 command 13 can't byte swap it)
 /usr/bin/strip: for architecture i386 object:
 /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/ 
 glut_opengl
 malformed object (unknown flavor for flavor number 0 in  
 LC_UNIXTHREAD
 command 10 can't byte swap it)
 stripping saved 8991796 bytes (7898608 / 16890404)


 I also tried with
 $ python setup.py py2app --prefer-ppc
 but i got the same error. Because of the '/usr/bin/strip: for
 architecture i386 object' I thought it might be a problem with my
 processor, note that I am working on an old G3 ppc ibook, I am  
 running
 OS 10.4.8 and python 2.4.4, Py2app version is 0.3.5 .

 Later I tried with another script, one that does not use  
 pyOpengl, same
 error again.

 thanks

 enrike


 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig

 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig

 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] py2app error with /usr/bin/strip

2007-02-05 Thread Ronald Oussoren

On 5 Feb, 2007, at 22:04, altern wrote:

 Ronald Oussoren wrote:
 On 5 Feb, 2007, at 18:30, Chris Van Bael wrote:
 Hi,

 I'm getting essentially the same error for some time now.
 Could anybody please explain what is going wrong here exactly,  
 because
 me and some other people are having the same error and re-installing
 py2app doesn't fix the problem.

 See:
 http://mail.python.org/pipermail/pythonmac-sig/2007-January/  
 018645.html
 http://mail.python.org/pipermail/pythonmac-sig/2006-October/  
 018390.html
 http://mail.python.org/pipermail/pythonmac-sig/2006-October/  
 018391.html

 It would be a shame that I cannot provide a universal OS X  
 version of
 our program because of this problem..
 Could you please try to provide an example that demonstrates te   
 problem? Without such an example there's little chance that I'll  
 look  into this unless I happen to run into this problem myself.

 in my computer something as simple as just

 while 1: print 'looping'

 causes the error when trying to create an app. I also tried with  
 some other basic scripts with same results

What are the versions of py2app, macholib, altgraph, modulegraph on  
your machine? Likewise for python itself.

Just in case this is important: what version of OSX are you using, is  
it an Intel or PPC system and do you have the Developer Tools installed?

Ronald

 enrike


 Ronald
 Chris

 On 2/5/07, Bob Ippolito [EMAIL PROTECTED] wrote:
 When you see an error like that, it means there's a bug in macholib
 that caused it to produce a bogus file. Turning strip off doesn't
 really fix anything...

 -bob

 On 2/5/07, altern [EMAIL PROTECTED] wrote:
 hi again

 I solved the problem by doing
 $ python setup.py py2app --no-strip

 I read this about strip
 --strip (-S)strip debug and local symbols from  
 output  (on by
  default, for compatibility)

 could anyone explain a bit more about what this is? or maybe   
 point to
 somewhere i can read about it. I am interested because last  
 time  i used
 this machine i did not need to use this (only use it every now   
 and then
 for testing on OSX), so I am trying to find out what is the   
 difference
 from last time.

 thanks

 enrike


 altern wrote:
 Hi

 I am getting this error when trying to use py2app.

 $ py2applet --make-setup glut_opengl.py
 $ python setup.py py2app
 ...
 ...
 stripping bz2.so
 stripping zlib.so
 stripping _codecs_tw.so
 stripping umath.so
 stripping binascii.so
 /usr/bin/strip: for architecture i386 object:
 /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/python
 malformed object (unknown flavor for flavor number 0 in   
 LC_UNIXTHREAD
 command 13 can't byte swap it)
 /usr/bin/strip: for architecture i386 object:
 /Users/xxx/ixi/python/dist/glut_opengl.app/Contents/MacOS/  
 glut_opengl
 malformed object (unknown flavor for flavor number 0 in   
 LC_UNIXTHREAD
 command 10 can't byte swap it)
 stripping saved 8991796 bytes (7898608 / 16890404)


 I also tried with
 $ python setup.py py2app --prefer-ppc
 but i got the same error. Because of the '/usr/bin/strip: for
 architecture i386 object' I thought it might be a problem with my
 processor, note that I am working on an old G3 ppc ibook, I  
 am  running
 OS 10.4.8 and python 2.4.4, Py2app version is 0.3.5 .

 Later I tried with another script, one that does not use   
 pyOpengl, same
 error again.

 thanks

 enrike

 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig

 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig

 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig
 ___
 Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
 http://mail.python.org/mailman/listinfo/pythonmac-sig


___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] py2app error

2006-06-23 Thread robin meier
hello,

i installed pyobjc from here http://pyobjc.sourceforge.net/software/  
on my os 10.4.6
i then tried to run the py2app example simple which is in / 
developer/python/py2app/examples/simple by typing the command python  
setup.py py2app
it starts and seems to go well, but then stops with the following error:

/usr/bin/strip: for architecture i386 object: /Developer/Python/ 
py2app/Examples/simple/dist/hello.app/Contents/MacOS/hello malformed  
object (unknown flavor for flavor number 0 in LC_UNIXTHREAD command  
14 can't byte swap it)
stripping saved 2271688 bytes (2952104 / 5223792)

what's wrong? any help appreciated.
thanks in advance,

robin
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig