ronaldoussoren / py2app Goto Github PK
View Code? Open in Web Editor NEWpy2app is a Python setuptools command which will allow you to make standalone Mac OS X application bundles and plugins from Python scripts.
License: Other
py2app is a Python setuptools command which will allow you to make standalone Mac OS X application bundles and plugins from Python scripts.
License: Other
Original report by Den Shabalin (Bitbucket: densh, GitHub: densh).
I've just tried packaging hello-world app with py2app with stock python (2.6) and official binary releases of pyside (1.1.0) [1] and py2app (0.6.4). It doesn't seem to work.
import sys
from PySide.QtGui import *
def main():
app = QApplication([])
w = QWidget()
w.show()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
According to log error happens in py2app generated wrapper of native binary. And that's really weird. py2app seem to copy appropriate binaries into the bundle and shared libraries links look ok to me too (as shown by otool -l).
Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
Application bundles have a minimal shell environment, and that is problematic for some use cases, where cross-platform scripts assume that they have access to the same shell environment as a command-line user.
Actions to get there:
All of this should be done in a bootstrap script (in py2app), and code should then be added to the distutils command to ensure that the script gets included when an option is specified (lets say, "--emulate-shell-environment")
Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
py2app fails to build an application bundle when the current filesystem does not support symlinks.
Found while trying to run the py2app tests from a Shared Folder in a Parallels VM.
Original report by Autobot (Bitbucket: acidjunk, GitHub: acidjunk).
When using py2app 0.63 everything works OK (building a 64 bit app for 10.6 & 10.7). With py2app 0.64 I'm getting this error when trying to build my app.
I'm running OS X 10.7 with python and qt from homebrew. I tried the py2app 0.63 version because that's what I used on my old builder mac (OSX 10.6). I describe the old build environment here: http://www.renedohmen.nl/blog/2011/11/installing-pyqt4-on-mac-osx/
Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
It would be nice if py2app had an option that caused the stdout/stderr of the application (and any child process started by the app) to be redirected to a GUI widget for inspection.
Doing this will be non-trivial.
(Feature request on the pythonmac-sig mailinglist)
Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
Something in 3.2rc2 breaks building (application) bundles, both with and without the workaround for the encodings issue we encountered earlier (issue #9)
Original report by Georgios Panagiotou (Bitbucket: neogeop, GitHub: neogeop).
I build an app where I use the wx package, using os version 10.6.8 and system python 2.6. Although the package gets copied over to:
.app/Contents/Resources/lib/python2.6/wx
the same path is not present in sys.path at runtime
For the time being I have to insert the path to wx in the sys.path at runtime. I got the same behavior when trying to include the pycurl extension (pycurl.so) in lib-dynload, so I guess (?) it affects py2app 0.6.3 in general.
Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
The attached file is a basic project that fails when bundled using py2app, as reported on the pythonmac-sig list.
The reason is that the main script file has the same name as a package that's used by the script. Py2app copies both the script and the package in the site-package archive, and includes the script before the package which means the package isn't seen by the import statement.
Py2app shouldn't include top-level scripts in the zip-file, those are already located in the Resources folder.
Original report by Anonymous.
from [email protected]:
see build_alias_executable. then see build_executable. the copy files generated by iter_data_files step is missing.
Original report by Андрей Барышников (Bitbucket: AndreyB, GitHub: AndreyB).
I setuped my envirovment like this :
port install python27 py27-bdist_mpkg py2-py2app py27-enchant py27-pyqt4 python_select
Used this script to build app bundle
https://github.com/shuge/Enjoy-Qt-Python-Binding/blob/master/package_maker/py2app/simple/setup.py
and when i want to load my app with spell-checking.. enchant cant find dictionaries (see this thread http://stackoverflow.com/questions/9514148/what-is-going-on-with-py2app-and-pyenchant )
Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
py2app currently doesn't look at egg metadata at all, and therefore doesn't copy that metadata into the resulting application/plugin bundles.
This means that applications or libraries that use egg metadata (such as entry-points) won't work in an bundle created by py2app
Original report by Laurence Laurence (Bitbucket: lrowe, GitHub: lrowe).
Running the .app built from https://github.com/eerne/pyside-py2app-test crashes on close. When running with python2.7 test.py
no crash occurs on close.
Platform: Mac OS 10.6 with Python 2.7.2 from python.org, Qt 4.7.4 and PySide 1.0.7 binaries.
Versions: py2app 0.6.4, altgraph 0.9, macholib 1.4.2, modulegraph 0.9.1 (py2app from bitbucket changeset: 179:5e27e7b0b17d, others easy_install ...==dev)
Full error log attached
Original report by koszta5 (Bitbucket: koszta5, GitHub: koszta5).
There is a bug in 0.6.4 with scipy recipe (dont know if it affects others as well)
App builds fine, but fails to find ANY packages outside of site_packages.zip file and dies on import error. The solution is following:
In boot.py add this line below line " sys.frozen = 'macosx_app' "
sys.path = [os.path.join(os.environ['RESOURCEPATH'], 'lib', 'python2.7', 'lib-dynload')] + sys.path + [os.path.join(os.environ['RESOURCEPATH'], 'lib', 'python2.7', 'scipy')] + [os.path.join(os.environ['RESOURCEPATH'], 'lib', 'python2.7')]
The first is for PyQt to work, second is for scipy explicitely, last one is for any other packages that might be included...I saw this (the PyQt issue) repored on some web page out there
Bug is present on Mac OS 10.7 (stock apple python2.7) + py2app 0.6.4
Original report by David Catmull (Bitbucket: Uncommon, GitHub: Uncommon).
When the "optimize" option is specified, it only gets used to compile files. It does get written to PyOptions.optimize in Info.plist, but that value is never read when the app runs. As a result, __debug__
remains true and my asserts are throwing.
Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
The argv emulation code doesn't work with python 3.x or with 64-bit binaries. These are separate issues, but with a simuar solution: the argv emulator needs to be rewritten using ctypes.
It doesn't work in 3.x because the Carbon package is no longer present.
It doesn't work in 2.x with 64-bit code because the code uses APIs that aren't available in 64-bit code (in particular the event loop code).
Original report by dbrnz (Bitbucket: dbrnz, GitHub: dbrnz).
The following patch enables the name of the stub executable to determine the Python script to run. This allows multiple scripts to use a common runtime. Required manual steps are to make copies of the stub in ./MacOS and to copy the actual Python scripts into ./Resources.
diff --git a/py2app/apptemplate/src/main.c b/py2app/apptemplate/src/main.c
--- a/py2app/apptemplate/src/main.c
+++ b/py2app/apptemplate/src/main.c
@@ -1017,8 +1017,9 @@
argv_new = alloca((argc + 1) * sizeof(char *));
argv_new[argc] = NULL;
- argv_new[0] = c_mainScript;
- memcpy(&argv_new[1], &argv[1], (argc - 1) * sizeof(char *));
+ //argv_new[0] = c_mainScript;
+ //memcpy(&argv_new[1], &argv[1], (argc - 1) * sizeof(char *));
+ memcpy(argv_new, argv, argc * sizeof(char *));
py2app_PySys_SetArgv(argc, argv_new);
diff --git a/py2app/bootstrap/boot_app.py b/py2app/bootstrap/boot_app.py
--- a/py2app/bootstrap/boot_app.py
+++ b/py2app/bootstrap/boot_app.py
@@ -7,7 +7,7 @@
site.addsitedir(os.path.join(base, 'Python', 'site-packages'))
if not scripts:
import __main__
- for script in scripts:
- path = os.path.join(base, script)
- sys.argv[0] = __file__ = path
- execfile(path, globals(), globals())
+ script = sys.argv[0].split('/')[-1] + '.py'
+ path = os.path.join(base, script)
+ sys.argv[0] = __file__ = path
+ execfile(path, globals(), globals())
Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
The recipe for numpy includes the entire package, including all tests, in the output. Numpy is a large package and most programs don't use all of it, look into cleaning up.
Original report by Virgil Dupras (Bitbucket: hsoft, GitHub: hsoft).
See http://bugs.python.org/issue9910
It seems to me that it could greatly simplify the whole path manipulation code. I doubt that many py2app users switched to py3k yet, so it would be acceptable to drop support for python 3.1 (so the only legacy code we have to keep is for python 2.x)
Original report by miheld (Bitbucket: miheld, GitHub: miheld).
the new argv_emulation of py2app 0.6.4 (taken from hg today) causes my app to crash when tested on MacOS 10.5
I am trying to build a 64bit app on MacOS 10.6 Python 2.7.2 (intel build)
turning the argv_emulation off the app is running fine.
Original report by skurylo (Bitbucket: skurylo, GitHub: skurylo).
If I make a mistake in setup.py, then path_to_zip is passed '' and util.py will loop forever.
I've attached a fix. I'm using osx 10.4 with macports py26-py2app @0.5.2.
Thanks.
Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
unzip -t .../Resources/lib/python32.zip says:
...
testing: encodings/utf_8.pyc OK
testing: encodings/utf_8_sig.pyc OK
testing: encodings/__pycache__/utf_8.cpython-32.pyc OK
testing: encodings/__pycache__/utf_8.cpython-32.pyo OK
testing: encodings/__pycache__/utf_8_sig.cpython-32.pyc OK
testing: encodings/__pycache__/utf_8_sig.cpython-32.pyo OK
...
This indicates that two copies of compiled modules get included, and that's is a waste of space.
Original report by Anonymous.
I'm use MacPorts install following packages
py26-sip 4.12.1
py26-pyqt4 4.8.3
py2app 0.5.2
I do what as http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html said
get first exception is
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app/apptemplate/prebuilt/main-x86_64 not found
I copy one from /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app/apptemplate/prebuilt/main-universal to /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app/apptemplate/prebuilt/main-x86_64
then build package successfully.
However it doesn't works !
It show alert "xxx error" with "visit the MacPython website" and "terminate" button after open foo.app.
Have you test it ?
I checkout your latest source and build example, they get the same result, they don't work.
Original report by Anonymous.
run python3.2 setup.py install fail, please see attachment for details.
Original report by corwin_of_amber (Bitbucket: corwin_of_amber, ).
In py2app/apptemplate/src/main.c:517 :
if (!_NSGetExecutablePath(executable_path, &bufsize)) {
executable_path[bufsize] = '\0';
According to official Apple docs (man 3 dyld), the function _NSGetExecutablePath sets 'bufsize' only when it fails, which means that inside the "then" clause, bufsize==PATH_MAX and this assignment violates array bounds.
Luckily, it appears _NSGetExecutablePath puts the null terminator correctly so this line can be removed.
Original report by briank_in_la (Bitbucket: briank_in_la, ).
When using py2app to create a PyQt application, the sip recipe (sip.py) sets self.warn to True if pyqtconfig.Configuration().qt_edition == 'free'.
qt_edition refers to the distribution of Qt, not PyQt.
Qt is distributed under LGPL, PyQt is distributed under GPL, so whereas one likely can distribute open source Qt under most circumstances, one cannot distribute open source PyQt unless one's project falls completely under GPL.
If self.warn is set (which is the case when using open source Qt), the warning message that is generated reads:
== PyQt Free Edition GPL warning ==
Your application is including PyQt Free Edition!
Please read the terms of the GPL license before
distributing this application!
... regardless of the edition of PyQt. In my case, I'm using commercial PyQt with LGPL Qt, but still got this message. I'm not certain how to determine if the version of PyQt one is using is commercial or not, but I don't believe the way that it's done currently is correct.
Original report by Virgil Dupras (Bitbucket: hsoft, GitHub: hsoft).
I hadn't noticed this bug because I've been using my own for of py2app for a while now, but the "--alias" build for bundletemplate is broken because PYTHONHOME is always set to resourcePath, regardless of whether it's an alias build or not (when it's an alias build, there's nothing in resourcePath). So trying to execute the app results in:
Fatal Python error: Py_Initialize: can't initialize sys standard streams
ImportError: No module named encodings.utf_8
Abort trap
I'm working on it.
Original report by gcewing (Bitbucket: gcewing, GitHub: gcewing).
The version of the main program stub seems to be chosen based on what os.uname() says, but this is not always correct. For example, on my MacOSX 10.6 system, uname reports the architecture as x86_64. However, I have deliberately built and installed Python as 32 bit, so that it can use some libraries that are not available in 64 bit. As a result, py2app builds an app that does not work.
IMO it would be better to choose stub based on the architecture of the Python interpreter that is being incorporated into the bundle.
Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
Given
#!python
setup(
version=VERSION
)
When VERSION
is a list or tuple the application will crash.
Py2app should instead print an error message when VERSION
is not a string. Also check distutils/packaging to check the valid types for version, all other types should be converted to a string before creating the Info.plist
file.
Original report by C.Y. Pang (Bitbucket: [Shuge Lee](https://bitbucket.org/Shuge Lee), ).
if create setup.py by py2applet, argv_emulation is auto set to True.
I think py2app should be smarter
and auto set it to False.
Original report by Michael McCracken (Bitbucket: mikemccracken, GitHub: mikemccracken).
One of my packages has a .ods spreadsheet in its directory*, and it confuses copy_package_data, which tries to copy it as a directory because it's not a python file, causing an exception.
I think it should instead just ignore a non-python file, possibly printing a warning.
I stage the dependencies into a separate directory before calling py2app, so I have an easy workaround, but if I didn't have to do that extra step, this would be annoying.
-* I didn't put it there :)
Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
In the current copy of setup.py we have:
setup(
...
zip_save=False,
...
)
This is needed because the bootstrap code uses functionality that doesn't work when py2app is inside a zipfile.
This code needs to be changed.
Original report by Virgil Dupras (Bitbucket: hsoft, GitHub: hsoft).
Since Python3.2rc1 is out, I tried building out my own stuff with it, and py2app doesn't work because pyconfig.h as well as the makefile don't live simply in folders like 'include/python{version}' anymore. Fortunately, a new module, sysconfig has been added and lets you easily determine these paths. The changeset at https://bitbucket.org/hsoft/py2app/changeset/90ae7db16faf makes py2app use sysconfig.
Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
If you add a sub package (such as "wx.lib.plugin" to the "packages" list in the py2app options those sub packages get copied into the top-level library directory instead of at the right location.
Original report by Mate Adamkovics (Bitbucket: adamkovics, GitHub: adamkovics).
I have a problem with a complicated application built using the Enthought distribution with Traits, but I seem to have reproduced the problem with a simpler bit of code:
py2app works fine in alias mode (-A), but when building the app for distribution it has problems finding backends.
To reproduce the problem on simpler code, I tried to create a standalone app from //slider_demo.py// at the end of this post. I run into the following error:
Traceback (most recent call last):
File "/Users/mate/python/sandbox/apptest/dist/slider_demo.app/Contents/Resources/boot.py", line 338, in
_run('slider_demo.py')
File "/Users/mate/python/sandbox/apptest/dist/slider_demo.app/Contents/Resources/boot.py", line 306, in _run
execfile(path, globals(), globals())
File "/Users/mate/python/sandbox/apptest/dist/slider_demo.app/Contents/Resources/slider_demo.py", line 1, in
from pylab import *
File "pylab.pyc", line 1, in
File "matplotlib/pylab.pyc", line 264, in
File "matplotlib/pyplot.pyc", line 95, in
File "matplotlib/backends/init.pyc", line 25, in pylab_setup
ImportError: No module named backend_wxagg
2012-05-11 15:50:56.980 slider_demo[28581:903] slider_demo Error
I'm running 10.6.8 and here is the example code I try to build:
#!python
from pylab import *
from matplotlib.widgets import Slider, Button, RadioButtons
ax = subplot(111)
subplots_adjust(left=0.25, bottom=0.25)
t = arange(0.0, 1.0, 0.001)
a0 = 5
f0 = 3
s = a0*sin(2*pi*f0*t)
l, = plot(t,s, lw=2, color='red')
axis([0, 1, -10, 10])
axcolor = 'lightgoldenrodyellow'
axfreq = axes([0.25, 0.1, 0.65, 0.03], axisbg=axcolor)
axamp = axes([0.25, 0.15, 0.65, 0.03], axisbg=axcolor)
sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=f0)
samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=a0)
def update(val):
amp = samp.val
freq = sfreq.val
l.set_ydata(amp*sin(2*pi*freq*t))
draw()
sfreq.on_changed(update)
samp.on_changed(update)
resetax = axes([0.8, 0.025, 0.1, 0.04])
button = Button(resetax, 'Reset', color=axcolor, hovercolor='0.975')
def reset(event):
sfreq.reset()
samp.reset()
button.on_clicked(reset)
rax = axes([0.025, 0.5, 0.15, 0.15], axisbg=axcolor)
radio = RadioButtons(rax, ('red', 'blue', 'green'), active=0)
def colorfunc(label):
l.set_color(label)
draw()
radio.on_clicked(colorfunc)
show()
Original report by Anonymous.
I'm using 0.6.3.
I was running py2app with the eggs in my local dir (not installed in site-packages). This worked without optimization but if O1 or O2 then build fails with the error below.
If I install to site-packages then everything works.
====
*** byte compile python files ***
writing byte-compilation script '/var/folders/fD/fD7kmk1zHSy-4wj-UI-9-U+++TU/-Tmp-/tmpPf0BB4.py'
/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -O /var/folders/fD/fD7kmk1zHSy-4wj-UI-9-U+++TU/-Tmp-/tmpPf0BB4.py
Traceback (most recent call last):
File "/var/folders/fD/fD7kmk1zHSy-4wj-UI-9-U+++TU/-Tmp-/tmpPf0BB4.py", line 2, in <module>
from py2app.util import byte_compile
ImportError: No module named py2app.util
error: command '/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python' failed with exit status 1
Original report by Anonymous.
Running version 0.5.3 I got the following error:
Traceback (most recent call last):
File "setup.py", line 18, in <module>
setup_requires=['py2app'],
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup
dist.run_commands()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 987, in run_commands
self.run_command(cmd)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 1007, in run_command
cmd_obj.run()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.5.3-py2.6.egg/py2app/build_app.py", line 462, in run
self._run()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.5.3-py2.6.egg/py2app/build_app.py", line 618, in _run
self.run_normal()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.5.3-py2.6.egg/py2app/build_app.py", line 702, in run_normal
self.create_binaries(py_files, pkgdirs, extensions, loader_files)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.5.3-py2.6.egg/py2app/build_app.py", line 800, in create_binaries
target, arcname, pkgexts, copyexts, target.script)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/py2app-0.5.3-py2.6.egg/py2app/build_app.py", line 1271, in build_executable
includedir = 'python%s'%(info['version'])
NameError: global name 'info' is not defined
Changing py2app/build_app.py line 2171:
includedir = 'python%s'% info['version'])
to
includedir = 'python%d.%d'%sys.version_info[0:2]
solves the problem.
Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
From a report by Robert Klep on pyobjc-dev:
When you start a PyObjC application that was bundled with py2app from a plugin bundle the PyObjC application crashes.
Adding "os.delenv('PYOBJC_BUNDLE_ADDRESS')" before launching the PyObjC application removes the crash.
The py2app bootstrap code should itself clear this variable for application bundles.
Original report by David Golub (Bitbucket: dgolub, GitHub: dgolub).
When I build py2app with the latest source code, it fails to properly build an application that uses PyQt, causing most of the toolbar and tree view icons to not appear when I run the built app bundle. The problem does not occur when I use the py2app 0.6.3 released version, indicating a new bug since py2app 0.6.3 was released. The application that I'm attempting to build is the TortoiseHg client for Mercurial, using the preliminary build system available at https://developers.kilnhg.com/Repo/Kiln/Group/TortoiseHg-Macbuild.
Original report by kollivier (Bitbucket: kollivier, GitHub: kollivier).
Environment: Python 2.7 from python.org, Mac OS X 10.6 w/ and w/out virtualenv, py2app 0.6.3
Description:
When called, the python executable located at Contents/MacOS/python attempts to execute @executable_path/../Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/python, however, Python.app is not copied into the bundle, so this call fails. Copying the bundle into the app doesn't seem to address the problem, at least when command line arguments are passed to python, as it appears to have trouble finding bundled modules.
Since we are already in an app bundle, I don't think the bundled python interpreter should be redirecting to Python.app, even if it could be made to work. I think if possible, the copied python interpreter should either be the stock one from inside the bundle, or one setup similarly to the bundle's main executable, just not running the bootstrap code.
Please let me know if you need further information, etc. about this problem.
Original report by RajeshVaidheeswarran (Bitbucket: RajeshVaidheeswarran, ).
Hello,
I am looking at creating an app that parses a config file and does stuff..
When I run the app directly, it works well, but when I create a binary using py2app, the configparser doesn't parse anymore. The solution to this problem eludes me.
I have a very distilled down version of this problem with just a single script.
The script:
import ConfigParser
a = ConfigParser.ConfigParser()
r = a.read("foo.cfg")
print r
print a
print a.sections()
for s in a.sections():
print s
for i in a.items(s):
print "\t", i
The file:
[main]
hello=world
[section1]
cup=cake
[section2]
tom=jerry
Output:
Rajesh-Vaidheeswarrans-MacBook-Pro:scratch rvaidhee$ python foo.py
['foo.cfg']
<ConfigParser.ConfigParser instance at 0x10997af38>
['main', 'section1', 'section2']
main
('hello', 'world')
section1
('cup', 'cake')
section2
('tom', 'jerry')
python setup.py py2app --includes ConfigParser --argv-emulation -a
I tried not including the ConfigParser first, and then tried including it. Both produce the same result.
Rajesh-Vaidheeswarrans-MacBook-Pro:scratch rvaidhee$ ./dist/foo.app/Contents/MacOS/foo
[]
<ConfigParser.ConfigParser instance at 0x102c5a3f8>
[]
As you can see above, the sections and file list are both empty
Source:
"""
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
APP = ['foo.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True}
setup(
app=APP,
data_files=DATA_FILES,
options={'py2app': OPTIONS},
setup_requires=['py2app'],
)
Original report by Anonymous.
the new argv_emulation of py2app 0.6.4 (taken from hg today) causes my app to crash when tested on MacOS 10.5
I am trying to build a 64bit app on MacOS 10.6 Python 2.7.2 (intel build)
turning the argv_emulation off the app is running fine.
------------------------------------------------------------------------------------------------------
Process: CecogAnalyzer [463]
Path: /Users/analyzer/Desktop/CecogAnalyzer.app/Contents/MacOS/CecogAnalyzer
Identifier: org.pythonmac.unspecified.CecogAnalyzer
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: launchd [227]
Interval Since Last Report: 1240 sec
Crashes Since Last Report: 5
Per-App Interval Since Last Report: 0 sec
Per-App Crashes Since Last Report: 5
Date/Time: 2011-09-01 11:37:32.773 +0200
OS Version: Mac OS X 10.5.8 (9L31a)
Report Version: 6
Anonymous UUID: 0220A235-99D2-4D12-824B-0F928AED9596
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Crashed Thread: 0
Thread 0 Crashed:
0 ??? 000000000000000000 0 + 0
1 com.apple.HIToolbox 0x00007fff81d96b12 HIObjectClass::Lookup(__CFString const*, unsigned char) + 98
2 com.apple.HIToolbox 0x00007fff81d9697c HIObject::Create(__CFString const*, OpaqueEventRef*, HIObject**) + 58
3 com.apple.HIToolbox 0x00007fff81d96916 HIObjectCreate + 90
4 com.apple.HIToolbox 0x00007fff81dfaab5 RunApplicationEventLoop + 81
5 _ctypes.so 0x00000001000ef19c ffi_call_unix64 + 76
6 _ctypes.so 0x00000001000efc72 ffi_call + 477
7 _ctypes.so 0x00000001000ea6f2 _ctypes_callproc + 1187
8 _ctypes.so 0x00000001000e275c PyCData_FromBaseObj + 799
9 org.python.python 0x0000000100308d71 PyObject_Call + 87
10 org.python.python 0x00000001003b29f9 PyEval_EvalFrameEx + 10313
11 org.python.python 0x00000001003b73d5 PyEval_EvalCodeEx + 2245
12 org.python.python 0x00000001003b490c PyEval_EvalFrameEx + 18268
13 org.python.python 0x00000001003b5543 PyEval_EvalFrameEx + 21395
14 org.python.python 0x00000001003b73d5 PyEval_EvalCodeEx + 2245
15 org.python.python 0x00000001003b7497 PyEval_EvalCode + 54
16 org.python.python 0x00000001003db12b PyRun_FileExFlags + 143
17 org.python.python 0x00000001003db3a1 PyRun_SimpleFileExFlags + 475
18 ...c.unspecified.CecogAnalyzer 0x0000000100004477 start + 12823
19 ...c.unspecified.CecogAnalyzer 0x0000000100004a97 main + 1465
20 ...c.unspecified.CecogAnalyzer 0x0000000100001294 start + 52
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x00007fff70317bc0 rcx: 0x0000000000000003 rdx: 0x0000000800000000
rdi: 0x00007fff7008fca0 rsi: 0x0000000000000000 rbp: 0x00007fff5fbfcb60 rsp: 0x00007fff5fbfca28
r8: 0x0000000000000004 r9: 0x0000000000000000 r10: 0x0000000100143000 r11: 0x0000000000000000
r12: 0x00007fff820647e8 r13: 0x00007fff70317bf0 r14: 0x0000000000000000 r15: 0x00007fff5fbfcc08
rip: 0x0000000000000000 rfl: 0x0000000000010246 cr2: 0x0000000000000000
Binary Images:
0x100000000 - 0x100005ff7 +org.pythonmac.unspecified.CecogAnalyzer 1.2.4 (1.2.4) <088bc15c6162ab7e05729eafa0af48d2> /Users/analyzer/Desktop/CecogAnalyzer.app/Contents/MacOS/CecogAnalyzer
0x100071000 - 0x100075ff7 +_struct.so ??? (???) <8ce040b5de8898ca4bac26fe2674fe1f> /Users/analyzer/Desktop/CecogAnalyzer.app/Contents/Resources/lib/python2.7/lib-dynload/_struct.so
0x1000c9000 - 0x1000ccff7 +zlib.so ??? (???) <49430e3b04cca481c758ec7b7cbab9a0> /Users/analyzer/Desktop/CecogAnalyzer.app/Contents/Resources/lib/python2.7/lib-dynload/zlib.so
0x1000d0000 - 0x1000dcfb1 +libgcc_s.1.dylib ??? (???) <bbb4eaffd7ec4b7a9aedc5bb3003bde0> /Users/analyzer/Desktop/CecogAnalyzer.app/Contents/Frameworks/libgcc_s.1.dylib
0x1000e0000 - 0x1000f5ff7 +_ctypes.so ??? (???) <7be02541c3aa13740d827a594dc0c928> /Users/analyzer/Desktop/CecogAnalyzer.app/Contents/Resources/lib/python2.7/lib-dynload/_ctypes.so
0x100300000 - 0x10045cff7 +org.python.python 2.7.2, (c) 2004-2011 Python Software Foundation. (2.7.2) <8f85f6d7bcb0e20086ac1f5c1a0bf37d> /Users/analyzer/Desktop/CecogAnalyzer.app/Contents/Frameworks/Python.framework/Versions/2.7/Python
0x7fff5fc00000 - 0x7fff5fc2e643 dyld 97.1 (???) <1d1ba42c89e77cfe2558a3c66129fff6> /usr/lib/dyld
0x7fff80003000 - 0x7fff80003ffa com.apple.CoreServices 32 (32) <f1ae7e34fb008524b502ed0185b32794> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
0x7fff8009d000 - 0x7fff8009dffb com.apple.installserver.framework 1.0 (8) /System/Library/PrivateFrameworks/InstallServer.framework/Versions/A/InstallServer
0x7fff801e2000 - 0x7fff80245fef libGLU.dylib ??? (???) <f67da5b01d66550356e36ab111d403ac> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
0x7fff80246000 - 0x7fff8030afe2 com.apple.vImage 3.0 (3.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
0x7fff8030b000 - 0x7fff80496ffb libSystem.B.dylib ??? (???) <f78131260c5dde2afd54e7bbe1efa161> /usr/lib/libSystem.B.dylib
0x7fff80497000 - 0x7fff804befff libxslt.1.dylib ??? (???) <1c1ac552c03c667789eecb3d9a6e998f> /usr/lib/libxslt.1.dylib
0x7fff804bf000 - 0x7fff80c7cfef libBLAS.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
0x7fff80c7d000 - 0x7fff80e86feb com.apple.security 5.0.7 (1) <8277f726dbcf75bea6e19db6d4f41577> /System/Library/Frameworks/Security.framework/Versions/A/Security
0x7fff80e87000 - 0x7fff80e89fff com.apple.NavigationServices 3.5.2 (163) <a4de34598614036eafa22998ae0ac26f> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices
0x7fff80e8a000 - 0x7fff80f7efff libobjc.A.dylib ??? (???) <efc7ebdfe5ea8b723ebdb322ce775ddf> /usr/lib/libobjc.A.dylib
0x7fff80f7f000 - 0x7fff80f82ffb com.apple.help 1.1 (36) <625c2d6bb29ee822f9dce6322d08df47> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help
0x7fff80f83000 - 0x7fff80f9dfff libvDSP.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
0x7fff80fa8000 - 0x7fff814c8f6e libGLProgrammability.dylib ??? (???) <dfe7bb0409f4a83d28818fd40452d013> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgrammability.dylib
0x7fff814c9000 - 0x7fff81544ff3 com.apple.CoreText 2.0.5 (???) <21c92ca8838402adc16d0ffdb2a2ada2> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText
0x7fff81545000 - 0x7fff81549fff libGIF.dylib ??? (???) <81b7cce54846bc3f815eeffe62dd11a8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
0x7fff8154a000 - 0x7fff816b9fff libicucore.A.dylib ??? (???) <d69c6c54ddbf4ef58ea94d733de685b9> /usr/lib/libicucore.A.dylib
0x7fff816eb000 - 0x7fff816edfff com.apple.print.framework.Print 218.0.3 (220.2) <b61026a1ec74657ef632c870614c97ff> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print
0x7fff816ee000 - 0x7fff816eefff com.apple.Carbon 136 (136) <03d8b56572c45d8e6de756bc2fb86187> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon
0x7fff816ef000 - 0x7fff81711fff libJPEG.dylib ??? (???) <6fdc1a2794f35c40ae924921aad64434> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
0x7fff81819000 - 0x7fff81888ff9 com.apple.print.framework.PrintCore 5.5.4 (245.6) <2b6cfbd8f24b002757d418e0f2a901ea> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
0x7fff81889000 - 0x7fff8196afff libcrypto.0.9.7.dylib ??? (???) <752f9db6e46f8d48fe3a6663d97acc34> /usr/lib/libcrypto.0.9.7.dylib
0x7fff819b1000 - 0x7fff819edff7 libGLImage.dylib ??? (???) <ce54e54e6f98a7c024e72a15434eba78> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
0x7fff819ee000 - 0x7fff819f2fff libmathCommon.A.dylib ??? (???) /usr/lib/system/libmathCommon.A.dylib
0x7fff819f3000 - 0x7fff81ac6ffc com.apple.CFNetwork 438.16 (438.16) <f1f217a1490efc3b8850f4ee6d2c26e8> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
0x7fff81ac7000 - 0x7fff81ad1fff com.apple.speech.recognition.framework 3.7.24 (3.7.24) <a49d89814bff9aff6d477c00e426e158> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition
0x7fff81ad2000 - 0x7fff81ae6ff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
0x7fff81ae7000 - 0x7fff81d82fe3 com.apple.Foundation 6.5.9 (677.26) <d7c197fec4d7c3097be95ae742a47c22> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
0x7fff81d92000 - 0x7fff81d94ff9 libRadiance.dylib ??? (???) <d2f1311dd67cf8cd55deebd24fc325cc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
0x7fff81d95000 - 0x7fff8207cffb com.apple.HIToolbox 1.5.6 (???) <54f8e0b178ed377fb279ba48fa1aa88b> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox
0x7fff8207d000 - 0x7fff820f3fef libvMisc.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
0x7fff82143000 - 0x7fff82281fe9 com.apple.ImageIO.framework 2.0.9 (2.0.9) <4f60c1cbfcaa3f37e8b05bbbb5f8ab10> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO
0x7fff82282000 - 0x7fff8229cfff com.apple.openscripting 1.2.8 (???) <a05b9d0ca893061d44b492d7c7169e0a> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting
0x7fff8229d000 - 0x7fff8229dff8 com.apple.ApplicationServices 34 (34) <29a6f07deb1ef821735e2c18ef1e9fa5> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
0x7fff8229e000 - 0x7fff82393fff libxml2.2.dylib ??? (???) <7f8ff78b4e85fbd963287356a7e3d817> /usr/lib/libxml2.2.dylib
0x7fff82394000 - 0x7fff823e9fe3 com.apple.HIServices 1.7.1 (???) <8c601c198e138905743161674f558fcc> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
0x7fff823ea000 - 0x7fff823f0fff com.apple.DiskArbitration 2.2.1 (2.2.1) <177d27ab3079b3bfc41c0318dbc781da> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
0x7fff823f2000 - 0x7fff82403fff com.apple.speech.synthesis.framework 3.7.1 (3.7.1) <106879bf44e44dbfad90830d86076d0b> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
0x7fff82404000 - 0x7fff8248cfef libsqlite3.0.dylib ??? (???) <a12c5f54fbe808e8b0751931bf75e5f1> /usr/lib/libsqlite3.0.dylib
0x7fff8248d000 - 0x7fff82492fff com.apple.CommonPanels 1.2.4 (85) <8f5631ff238ad1bad2e031fe5e7442d2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels
0x7fff82493000 - 0x7fff82544fef com.apple.CoreServices.OSServices 228.1 (228.1) <1489551e96f1faf3d92ccdf13e789d26> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
0x7fff82545000 - 0x7fff8254dffa libbsm.dylib ??? (???) <a870a8e515e1a6407c81ddeebba21793> /usr/lib/libbsm.dylib
0x7fff8254e000 - 0x7fff825e4ffb com.apple.LaunchServices 292 (292) <d6750e4efb1986b3ffd2bc037223a3ad> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
0x7fff825e5000 - 0x7fff82602fff libPng.dylib ??? (???) <9dd5bf64f354332720309183cb6aa983> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
0x7fff82603000 - 0x7fff82646fef com.apple.QD 3.11.57 (???) <8b866ad370ea1d63dac867d4d857a30b> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
0x7fff82647000 - 0x7fff826e2fe7 com.apple.ink.framework 101.3 (86) <03096cd083a6e70bc7a18ad1b81feb15> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink
0x7fff826e3000 - 0x7fff82a9bfff libLAPACK.dylib ??? (???) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
0x7fff82a9c000 - 0x7fff82abffff com.apple.CoreVideo 1.6.1 (48.6) <1d4f4d03977bb1bbf518f08da71a4d2e> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
0x7fff82ac0000 - 0x7fff82b34fe7 libstdc++.6.dylib ??? (???) <379a6a2dc6e21ba77310b3d2d9ea30ac> /usr/lib/libstdc++.6.dylib
0x7fff82b35000 - 0x7fff82c00ff7 com.apple.ColorSync 4.5.4 (4.5.4) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
0x7fff82c01000 - 0x7fff82cbffff edu.mit.Kerberos 6.0.15 (6.0.15) <332e58bc00db238784e92ab8fe0fdfa6> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
0x7fff82cc0000 - 0x7fff82cfbfff com.apple.AE 402.3 (402.3) <02920492662a2afd9329814761de7625> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
0x7fff82cfd000 - 0x7fff82d09ff1 libgcc_s.1.dylib ??? (???) <6fc905606335f261db4da9529c7e2711> /usr/lib/libgcc_s.1.dylib
0x7fff82d0a000 - 0x7fff82d22fff com.apple.DictionaryServices 1.0.0 (1.0.0) <ce7135044e951deaa2b687bc8537809a> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
0x7fff82d23000 - 0x7fff82d25ff7 libffi.dylib ??? (???) <5ccd57a3de7db7f7bffa1b6ef2217b0c> /usr/lib/libffi.dylib
0x7fff82ea7000 - 0x7fff82ee8fef com.apple.framework.IOKit 1.5.2 (???) <ebadf76b05d974c057871f79d1155160> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x7fff82ee9000 - 0x7fff82f26ff7 com.apple.SystemConfiguration 1.9.2 (1.9.2) <adbf2cf79d4ca56a6aaf282758342368> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
0x7fff82f27000 - 0x7fff82f64fe7 com.apple.coreui 1.2 (62) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI
0x7fff82f74000 - 0x7fff82f95fff libresolv.9.dylib ??? (???) <8ab980fcb57ab0bac63ca2302ca86ca9> /usr/lib/libresolv.9.dylib
0x7fff82f96000 - 0x7fff82fd9fef libTIFF.dylib ??? (???) <08b2cb3c4c267ecf4961e9a03a92b52d> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
0x7fff82fda000 - 0x7fff82febffd libz.1.dylib ??? (???) <2022cc8950afdf485ba1df76364ba725> /usr/lib/libz.1.dylib
0x7fff82fec000 - 0x7fff83016fff libcups.2.dylib ??? (???) <04f408feb95d60907e9c958ef9fb2c2d> /usr/lib/libcups.2.dylib
0x7fff83017000 - 0x7fff83067fe7 com.apple.Metadata 10.5.8 (398.26) <c6f33c64966aceb08eeea18e29609c26> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
0x7fff83068000 - 0x7fff8306bfff com.apple.securityhi 3.0 (30817) <1112cafa6d76e27196cd0579b589d8df> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI
0x7fff8306c000 - 0x7fff83638fff com.apple.CoreGraphics 1.409.8 (???) <853a61b783f5b6c427a52a6594c0ad5c> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
0x7fff83639000 - 0x7fff83648fe7 com.apple.opengl 1.5.10 (1.5.10) <6e90aef2d19eb54c80487b063655fcbc> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
0x7fff83649000 - 0x7fff836e9fe3 com.apple.ApplicationServices.ATS 3.8 (???) <d0fa98ea4500d9d03c291bbe29f6cada> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
0x7fff836ea000 - 0x7fff83acafef com.apple.QuartzCore 1.5.8 (1.5.8) <fa8e35e6d3005eea6cd3215757d8f1d1> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
0x7fff83c3f000 - 0x7fff83c71ff7 libauto.dylib ??? (???) <1da77fa850921678e8e37611578b8f68> /usr/lib/libauto.dylib
0x7fff83c72000 - 0x7fff83c72ffd com.apple.Accelerate 1.4.2 (Accelerate 1.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
0x7fff83c73000 - 0x7fff83d04fff com.apple.SearchKit 1.2.2 (1.2.2) <87379484090b910fd05c027b66d1228f> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
0x7fff83d8d000 - 0x7fff83da3ff9 com.apple.ImageCapture 5.0.2 (5.0.2) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture
0x7fff846ce000 - 0x7fff849cafe3 com.apple.CoreServices.CarbonCore 786.16 (786.16) <fa93dadc88f56c42d75a32d9d8d1e983> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
0x7fff84d53000 - 0x7fff84e06fef com.apple.DesktopServices 1.4.9 (1.4.9) <5f0496e25a01c3f56c30c5038890697a> /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv
0x7fff84e07000 - 0x7fff84f3ffef com.apple.CoreFoundation 6.5.7 (476.19) <d7aea66b6a0d43c717a9d974d4b3e2de> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff84f40000 - 0x7fff84f40ffd com.apple.Accelerate.vecLib 3.4.2 (vecLib 3.4.2) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
0x7fffffe00000 - 0x7fffffe01780 libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib
0xfffffffffffec000 - 0xfffffffffffeffff libobjc.A.dylib ??? (???) /usr/lib/libobjc.A.dylib
Original report by Mick O'Donnell (Bitbucket: micko, GitHub: micko).
Using: ActivePython 3.2.2.3 (ActiveState Software Inc.) based on
Python 3.2.2 (default, Sep 8 2011, 12:20:30)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Run on Macosx 10.7.4 (Lion)
Packaging a simple tkinter app I get:
Traceback (most recent call last):
File "/Users/micko/Desktop/py2AppPy3test/MakeMacBuild.py", line 15, in
setup_requires=['py2app'])
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/core.py", line 109, in setup
_setup_distribution = dist = klass(attrs)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools/dist.py", line 221, in init
self.fetch_build_eggs(attrs.pop('setup_requires'))
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools/dist.py", line 245, in fetch_build_eggs
parse_requirements(requires), installer=self.fetch_build_egg
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/pkg_resources.py", line 576, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/pkg_resources.py", line 822, in best_match
return self.obtain(req, installer) # try and download/install
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/pkg_resources.py", line 834, in obtain
return installer(requirement)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools/dist.py", line 294, in fetch_build_egg
return cmd.easy_install(req)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools/command/easy_install.py", line 585, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools/command/easy_install.py", line 615, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools/command/easy_install.py", line 805, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools/command/easy_install.py", line 1082, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools/command/easy_install.py", line 1071, in run_setup
run_setup(setup_script, args)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools/sandbox.py", line 31, in run_setup
lambda: exec(compile(open(
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools/sandbox.py", line 73, in run
return func()
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools/sandbox.py", line 34, in
{'file':setup_script, 'name':'main'})
File "setup.py", line 309, in
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/core.py", line 148, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 917, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 936, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools/command/bdist_egg.py", line 172, in run
self.run_command("egg_info")
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 936, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools/command/egg_info.py", line 179, in run
self.find_sources()
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools/command/egg_info.py", line 254, in find_sources
mm.run()
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools/command/egg_info.py", line 310, in run
self.read_template()
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/setuptools/command/sdist.py", line 209, in read_template
sys.exc_info()[2].tb_next.tb_frame.f_locals['template'].close()
File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/text_file.py", line 121, in close
self.file.close()
AttributeError: 'NoneType' object has no attribute 'close'
Original report by onidaito (Bitbucket: onidaito, GitHub: onidaito).
Extremely simple python script built as a distributed application, fails to run with the error
26/02/2012 11:24:49 [0x0-0x3c03c].org.pythonmac.unspecified.imagestopdf[502] distutils.errors.DistutilsPlatformError: invalid Python installation: unable to open /usr/include/python2.6/pyconfig.h (No such file or directory)
This occurs with both the easy_install version and the current bitbucket version built from source. I suspect a distutils problem with Apple's stock install on snowleopard
Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
The Mac App store requires that embedded frameworks have a "Current" symlink in the Versions directory.
Py2app currently does not create that symlink when copying a framework into the application bundle, but should do so.
Don't add an option that selects whether or not the symlink gets created, adding the symlink is harmless for apps that don't get submitted to the app store and the symlink adds minimal size to the application.
Original report by C.Y. Pang (Bitbucket: [Shuge Lee](https://bitbucket.org/Shuge Lee), ).
I'm create a hello world PyQt app, it works well,
but it always crashes if I use QPixmap in it and pack it with py2app, is it a bug ?
Attached is my code and setup.py file.
Original report by zozs (Bitbucket: zozs, GitHub: zozs).
In argv_emulation.py there are some lines that has a tab as indentation instead of spaces. These are the following lines, from the code in the latest commit:
$ grep -Pn '\t' argv_emulation.py
128: return 0
181: return 0
224: return 0
231: del sys.argv[1]
Using Python 3 this causes the 2to3 script to fail during installation of py2app.
Original report by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren).
py2app should support the use_2to3 option that was introduced by distribute.
Original report by Arturo Filastò (Bitbucket: hellais, GitHub: hellais).
There are problems in building psutil on OSX 10.7. It appears to copy the dynlibs to the appropriate directory, but it then fails to import it.
This is the script I am trying to build:
$ cat helloworld.py
import psutil
print psutil.cpu_times()
This is my setup.py:
$ cat setup.py
from distutils.core import setup
import py2app
setup(
app=["helloworld.py"],
)
$ python setup.py py2app
$ ./dist/helloworld.app/Contents/MacOS/helloworld
Traceback (most recent call last):
File "/Users/y/Documents/code/building/osx/dist/helloworld.app/Contents/Resources/__boot__.py", line 50, in <module>
_run('helloworld.py')
File "/Users/y/Documents/code/building/osx/dist/helloworld.app/Contents/Resources/__boot__.py", line 47, in _run
execfile(path, globals(), globals())
File "/Users/y/Documents/code/building/osx/dist/helloworld.app/Contents/Resources/helloworld.py", line 9, in <module>
import psutil
File "psutil/__init__.pyc", line 77, in <module>
File "psutil/_psosx.pyc", line 14, in <module>
ImportError: No module named _psutil_osx
If I look inside of the lib-dynload directory I see it there though:
$ ls dist/helloworld.app/Contents/Resources/lib/python2.7/lib-dynload/
_psutil_osx.so _psutil_posix.so
cc @maker
Original report by Gerard Escalante (Bitbucket: gerarde, GitHub: gerarde).
I hope I'm not using py2app and/or "open" incorrectly, but opening any py2app bundle with "open" and multiple arguments causes the application to crash. Example crash report excerpt below.
Also attached is a test case which can be added to test_argv_emulation.py which demonstrates the crash. It works with the latest revision of py2app in the hg repo.
Example crash report excerpt:
Process: BasicApp [81086]
Path: /Users/USER/*/BasicApp.app/Contents/MacOS/BasicApp
Identifier: com.myurl
Version: 0.0.0 (0.0.0)
Code Type: X86-64 (Native)
Parent Process: launchd [123]
Date/Time: 2012-04-24 17:25:55.114 -0700
OS Version: Mac OS X 10.7.3 (11D50)
Report Version: 9
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Application Specific Information:
abort() called
objc[81086]: garbage collection is OFF
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff93bd9ce2 __pthread_kill + 10
1 libsystem_c.dylib 0x00007fff8ab527d2 pthread_kill + 95
2 libsystem_c.dylib 0x00007fff8ab43a7a abort + 143
3 org.python.python 0x00000001019d7f92 Py_FatalError + 66
4 org.python.python 0x00000001019e0a46 PySys_SetArgvEx + 198
5 com.myurl 0x000000010000436a start + 13290
6 com.myurl 0x00000001000049c8 main + 1496
7 com.myurl 0x0000000100000fb4 start + 52
Test case:
def test_start_with_two_args(self):
self.maxDiff = None
path = os.path.join( self.app_dir, 'dist/BasicApp.app')
p = subprocess.Popen(["/usr/bin/open",
'-a', path, "--args", "one", "two", "three"])
exit = p.wait()
self.assertEqual(exit, 0)
path = os.path.join( self.app_dir, 'dist/argv.txt')
for x in range(70): # Argv emulation can take up-to 60 seconds
time.sleep(1)
if os.path.exists(path):
break
self.assertTrue(os.path.isfile(path))
fp = open(path, 'r')
data = fp.read().strip()
fp.close()
self.assertEqual(data.strip(), repr([os.path.join(self.app_dir, 'dist/BasicApp.app/Contents/Resources/main.py'), "one", "two", "three"]))
Original report by Anonymous.
pyapp-0.5.2 has only 4 prebuilt apptemplates: main-fat, main-fat3, intel, and universal, with no single-platform templates. Also, "intel" is i386+ppc+x86_64 instead of i386+x86_64.
I probably wouldn't have noticed this, except that MacPorts defaults to x86_64-only on 10.6, so when I switched from Fink to MacPorts, I ended up with an x86_64-only version of py2app, and can no longer build any apps.
It looks like this has been fixed in BitBucket for 5 months, and the fix should be in the 0.5.3 mentioned on the wiki (http://wiki.python.org/moin/MacPython/py2app), but PyPI doesn't have an 0.5.3.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.