Am 30.04.2012, 18:59 Uhr, schrieb Chris Barker <chris.bar...@noaa.gov>:

darn...

Yeah, well I least I bumped the MacPorts port and that works like a charm. It'll even give you DMG if you ask nicely. Unfortunately the DMG contains symlinks to the libraries and binaries so it isn't redistributable.

I am hoping to build a standalone
app and package it as a DMG as the project author no longer
has access to Apple hardware.
thanks for contributing in this way!

although `bin/python setup.py py2app` should in theory be
sufficient.

it should, yes, though at times I've had to add explicte
most-processing code -- I usually do it in pyton in teh setup.py, but
in some ways makefile might be easier if you're more familiar with
shell scripting. I also use a shell script to build the dmg.

I'm happier with Python.

tried to break out the py2app part into a separate script.

and followed the py2app documentation it became clear that the script needs
to be updated to use setuptools, at least for the extensions.
I don't know that py2app reslies on setuptools for anything.

Maybe it doesn't but I got an error when I moved the relevant part of setup.py over to a new file generated by py2applet. It was complaining about the Extensions not being Extension instances. Turned out distutils.core.Extension instances are not welcome in setuptools.

LinkChecker is a QT project and needs Python-SIP. Unfortunately I haven't worked out how the recipe works. Does the py2app automatically detect the

dependency and build and package the shared libraries automatically?
it shoujld, yes -- the idea of recipies is that they "jsut work" for
the end user. If it's not, then it's a bug -- hopefully someone here
can help you find and fix it.
please post:
your setup.py

The original is here:

http://linkchecker.git.sourceforge.net/git/gitweb.cgi?p=linkchecker/linkchecker;a=blob_plain;f=setup.py;hb=HEAD

And my feeble attempt:

http://pastebin.com/ASzHipCe

the errors you get when running the .app

Bastian's done some fixing, although I've had to give my virtualenv access to my system site-packages because of Sip. We really need a pip compatible version of that.

When running the setup.py we're now down to:

Traceback (most recent call last):
  File "setup.py", line 833, in <module>
    setup(**args)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "setup.py", line 360, in run_commands
    super(MyDistribution, self).run_commands()
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 702, in run
    py2app_build.run(self)
File "/Users/charlieclark/Sites/LinkChecker/lib/python2.7/site-packages/py2app/build_app.py", line 480, in run
    self._run()
File "/Users/charlieclark/Sites/LinkChecker/lib/python2.7/site-packages/py2app/build_app.py", line 637, in _run
    self.run_normal()
File "/Users/charlieclark/Sites/LinkChecker/lib/python2.7/site-packages/py2app/build_app.py", line 723, in run_normal
    py_files, extensions = self.finalize_modulefinder(mf)
File "/Users/charlieclark/Sites/LinkChecker/lib/python2.7/site-packages/py2app/build_app.py", line 690, in finalize_modulefinder
    py_files, extensions = parse_mf_results(mf)
File "/Users/charlieclark/Sites/LinkChecker/lib/python2.7/site-packages/modulegraph/find_modules.py", line 93, in parse_mf_results
    raise TypeError("Don't know how to handle '%s'" % repr(src))
TypeError: Don't know how to handle ''/Users/charlieclark/Sites/LinkChecker/linkchecker-gui''

I think I've borked my virtualenv because I'm not getting that far when I run my modified setup

fuchsia:LinkChecker charlieclark$ bin/python app.py py2app
Traceback (most recent call last):
  File "app.py", line 69, in <module>
    include_dirs = include_dirs
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 112, in setup
    _setup_distribution = dist = klass(attrs)
File "/Users/charlieclark/Sites/LinkChecker/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 260, in __init__ File "/Users/charlieclark/Sites/LinkChecker/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 284, in fetch_build_eggs File "/Users/charlieclark/Sites/LinkChecker/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 563, in resolve
    to_activate = []
File "/Users/charlieclark/Sites/LinkChecker/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 799, in best_match
    dists = self._distmap.setdefault(dist.key,[])
File "/Users/charlieclark/Sites/LinkChecker/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 811, in obtain
    ``VersionConflict`` if an unsuitable version of the project is already
File "/Users/charlieclark/Sites/LinkChecker/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/dist.py", line 327, in fetch_build_egg File "/Users/charlieclark/Sites/LinkChecker/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 446, in easy_install

File "/Users/charlieclark/Sites/LinkChecker/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 476, in install_item

File "/Users/charlieclark/Sites/LinkChecker/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg/setuptools/command/easy_install.py", line 642, in install_eggs

distutils.errors.DistutilsError: Couldn't find a setup script in /var/folders/q0/r5j5dzp55p734_sdh1cblxn80000gn/T/easy_install-00i3bl/sip-4.13.3-snapshot-31ad477ff5ae.zip


Also, what I usually do is look inside the generated bundle and see
what's there -- if you find what's missing, you can often figure out
how to fix it.

Not getting that far.

I hope this makes more sense to you than it does to me!

Charlie
--
Charlie Clark
Managing Director
Clark Consulting & Research
German Office
Kronenstr. 27a
Düsseldorf
D- 40217
Tel: +49-211-600-3657
Mobile: +49-178-782-6226
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to