Re: [Pyobjc-dev] py2app not picking up additional .py files
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2013-01-14 13:33:08
|
On 13 Jan, 2013, at 1:49, Frank Illenberger <ill...@me...> wrote: > Hi there, > > I am developing a plugin with py2app using the following setup.py file: > > from setuptools import setup > > plist = { > 'NSPrincipalClass':'MyClass', > 'CFBundleName':'MyPlugin', > 'CFBundleIdentifier':'net.test', > 'CFBundleGetInfoString':'MyPlugin 0.1', > 'CFBundleVersion':'0.1', > 'CFBundleShortVersionString':'0.1', > } > > setup( > name = "MyPlugin", > plugin = ["MyClass.py"], > data_files=[], > setup_requires=["py2app"], > options=dict(py2app=dict(extension='.myPlugin', plist=plist)), > ) > > > > > The MyClass.py file looks like this: > > import objc > from Foundation import * > import MyClass2 > > class MyClass(NSObject): > > def init(self): > self = super(MyClass, self).init() > print "I am a python object" > return self > > > > The compiled bundle contains the MyClass.py file but not the other python file "MyClass2.py" that resides in the same source directory although I explictly import it. Does the import work when you load the plugin bundle? Py2app currently stores the main python file as is in the resource folder, all other sources are stored in a site-packages.zip archive. A future version of py2app might store the main python file there as well. > > Do I have to explicitly name all files in the setup.py? No. Ronald |