[Pythonmac-SIG] python plugins in Cocoa app.

Georg Seifert georg.seifert at gmx.de
Fri Jul 2 16:41:46 CEST 2010


> 
>> Hi, 
>> 
>> Thanks a lot. This did the trick.
>> 
>> By the way. Is it save to use the "-A" option in my bundles if I ship the plugin to users?
> 
> 
> That is not safe, the "-A" option creates a bundle that uses aliases to refer to the resources and source code used. That means the bundle is rather specific to your machine.
> 
I would have replace the resource files manually...

> If you use the system version of Python you can use "--site-packages" and "--excludes" to include the system site packages and to ensure that py2app doesn't copy those files into the bundle.  BTW. Both options can be added to the setup.py file as well.

Can you give me an example ? I can’t find anything through Google.

I did this:
plist = dict( 
	NSPrincipalClass='GSToolTest',
	CFBundleIdentifier = "com.GlyphsTestPlugin.GlyphsExport",
	NSHumanReadableCopyright = "Copyright, Georg Seifert, 2010",
)
setup(
	plugin = ['GlyphsToolTest.py'],
	options=dict(py2app=dict( 
			  extension='.toolPlugin',
				  plist=plist,
			   excludes=["python"],
	)),
)


But I don’t know what to put in the excludes to not copy the python binaries.
Georg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20100702/54a74a04/attachment-0001.html>


More information about the Pythonmac-SIG mailing list