Re: py2app not picking up additional .py files
Ronald Oussoren <[email protected]> Mon, 14 Jan 2013 14:32:52 +0100
| Newsgroups | gmane.comp.python.pyobjc.devel |
|---|---|
| Message-ID | <[email protected]> |
On 13 Jan, 2013, at 1:49, Frank Illenberger <[email protected]> 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 ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122412 _______________________________________________ Pyobjc-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pyobjc-dev