| 1 | # Setup file for the NodeBox OS X application. |
|---|
| 2 | # |
|---|
| 3 | # You can create the application by running: |
|---|
| 4 | # |
|---|
| 5 | # python macsetup.py py2app -A |
|---|
| 6 | # |
|---|
| 7 | # This creates a linked distribution, so changes to the python files only require you to restart the application. |
|---|
| 8 | # This is the preferred way to develop. |
|---|
| 9 | # To create a full distribution, use the macbuild.sh shell script to pull in all the right files. |
|---|
| 10 | |
|---|
| 11 | from distutils.core import setup |
|---|
| 12 | import py2app |
|---|
| 13 | |
|---|
| 14 | from setup import * |
|---|
| 15 | |
|---|
| 16 | all_modules = ['__future__', '_LWPCookieJar', '_MozillaCookieJar', '_strptime', '_threading_local', 'aifc', 'asynchat', 'asyncore', 'atexit', 'audiodev', 'base64', 'BaseHTTPServer', 'Bastion', 'binhex', 'bisect', 'calendar', 'cgi', 'CGIHTTPServer', 'cgitb', 'chunk', 'cmd', 'code', 'codecs', 'codeop', 'colorsys', 'commands', 'compileall', 'ConfigParser', 'contextlib', 'Cookie', 'cookielib', 'copy', 'copy_reg', 'cProfile', 'csv', 'dbhash', 'decimal', 'difflib', 'dircache', 'dis', 'doctest', 'DocXMLRPCServer', 'dumbdbm', 'dummy_thread', 'dummy_threading', 'filecmp', 'fileinput', 'fnmatch', 'formatter', 'fpformat', 'ftplib', 'functools', 'getopt', 'getpass', 'gettext', 'glob', 'gopherlib', 'gzip', 'hashlib', 'heapq', 'hmac', 'htmlentitydefs', 'htmllib', 'HTMLParser', 'httplib', 'ihooks', 'imaplib', 'imghdr', 'imputil', 'inspect', 'keyword', 'linecache', 'locale', 'macpath', 'macurl2path', 'mailbox', 'mailcap', 'markupbase', 'md5', 'mhlib', 'mimetools', 'mimetypes', 'MimeWriter', 'mimify', 'modulefinder', 'multifile', 'mutex', 'netrc', 'new', 'nntplib', 'ntpath', 'nturl2path', 'opcode', 'optparse', 'os', 'os2emxpath', 'pdb', 'pickle', 'pickletools', 'pipes', 'pkgutil', 'platform', 'popen2', 'poplib', 'posixfile', 'posixpath', 'pprint', 'profile', 'pstats', 'pty', 'py_compile', 'pyclbr', 'pydoc', 'Queue', 'quopri', 'random', 're', 'repr', 'rexec', 'rfc822', 'rlcompleter', 'robotparser', 'runpy', 'sched', 'sets', 'sgmllib', 'sha', 'shelve', 'shlex', 'shutil', 'SimpleHTTPServer', 'SimpleXMLRPCServer', 'site', 'smtpd', 'smtplib', 'sndhdr', 'socket', 'SocketServer', 'sre', 'sre_compile', 'sre_constants', 'sre_parse', 'stat', 'statvfs', 'string', 'StringIO', 'stringold', 'stringprep', 'struct', 'subprocess', 'sunau', 'sunaudio', 'symbol', 'symtable', 'tabnanny', 'tarfile', 'telnetlib', 'tempfile', 'textwrap', 'this', 'threading', 'timeit', 'toaiff', 'token', 'tokenize', 'trace', 'traceback', 'tty', 'types', 'unittest', 'urllib', 'urllib2', 'urlparse', 'user', 'UserDict', 'UserList', 'UserString', 'uu', 'uuid', 'warnings', 'wave', 'weakref', 'webbrowser', 'whichdb', 'xdrlib', 'xmllib', 'xmlrpclib', 'zipfile'] |
|---|
| 17 | |
|---|
| 18 | all_packages = ['bsddb', 'compiler', 'ctypes', 'curses', 'distutils', 'email', 'encodings', 'idlelib', 'hotshot', 'hotshot', 'logging', 'sqlite3', 'wsgiref', 'xml'] |
|---|
| 19 | |
|---|
| 20 | # lib-dynload |
|---|
| 21 | all_modules += ['ColorPicker', 'MacOS', 'Nav', 'OSATerminology', '_AE', '_AH', '_App', '_CF', '_CG', '_CarbonEvt', '_Cm', '_Ctl', '_Dlg', '_Drag', '_Evt', '_File', '_Fm', '_Folder', '_Help', '_IBCarbon', '_Icn', '_Launch', '_List', '_Menu', '_Mlte', '_OSA', '_Qd', '_Qdoffs', '_Qt', '_Res', '_Scrap', '_Snd', '_TE', '_Win', '_bisect', '_bsddb', '_codecs_cn', '_codecs_hk', '_codecs_iso2022', '_codecs_jp', '_codecs_kr', '_codecs_tw', '_csv', '_ctypes', '_ctypes_test', '_curses', '_curses_panel', '_elementtree', '_functools', '_hashlib', '_heapq', '_hotshot', '_locale', '_lsprof', '_multibytecodec', '_random', '_sha256', '_sha512', '_socket', '_sqlite3', '_ssl', '_struct', '_testcapi', '_tkinter', '_weakref', 'array', 'audioop', 'autoGIL', 'binascii', 'bsddb185', 'bz2', 'cPickle', 'cStringIO', 'cmath', 'collections', 'crypt', 'datetime', 'dbm', 'dl', 'fcntl', 'gestalt', 'grp', 'icglue', 'imageop', 'itertools', 'math', 'mmap', 'nis', 'operator', 'parser', 'pyexpat', 'readline', 'resource', 'rgbimg', 'select', 'strop', 'syslog', 'termios', 'time', 'unicodedata', 'zlib'] |
|---|
| 22 | |
|---|
| 23 | # lib-tk |
|---|
| 24 | all_modules += ['Canvas', 'Dialog', 'FileDialog', 'FixTk', 'ScrolledText', 'SimpleDialog', 'Tix', 'Tkconstants', 'Tkdnd', 'Tkinter', 'tkColorChooser', 'tkCommonDialog', 'tkFileDialog', 'tkFont', 'tkMessageBox', 'tkSimpleDialog', 'turtle'] |
|---|
| 25 | |
|---|
| 26 | # plat-mac |
|---|
| 27 | all_modules += ['Audio_mac', 'EasyDialogs', 'FrameWork', 'MiniAEFrame', 'PixMapWrapper', 'aepack', 'aetools', 'aetypes', 'applesingle', 'appletrawmain', 'appletrunner', 'argvemulator', 'bgenlocations', 'buildtools', 'bundlebuilder', 'cfmfile', 'findertools', 'gensuitemodule', 'ic', 'icopen', 'macerrors', 'macfs', 'macostools', 'macresource', 'pimp', 'plistlib', 'terminalcommand', 'videoreader'] |
|---|
| 28 | all_packages += ['Carbon', 'CodeWarrior', 'Explorer', 'Finder', 'Netscape', 'StdSuites', 'SystemEvents', 'Terminal'] |
|---|
| 29 | |
|---|
| 30 | # psyco |
|---|
| 31 | all_modules += ['psyco'] |
|---|
| 32 | |
|---|
| 33 | # Numeric |
|---|
| 34 | all_modules += ['Numeric'] |
|---|
| 35 | |
|---|
| 36 | # Numpy |
|---|
| 37 | all_modules += ['numpy'] |
|---|
| 38 | |
|---|
| 39 | # NodeBox |
|---|
| 40 | all_modules += ['nodebox.geo', 'nodebox.console'] |
|---|
| 41 | |
|---|
| 42 | plist = dict( |
|---|
| 43 | CFBundleDocumentTypes = [ |
|---|
| 44 | dict( |
|---|
| 45 | CFBundleTypeExtensions = ["py"], |
|---|
| 46 | CFBundleTypeName = "Python Source File", |
|---|
| 47 | CFBundleTypeRole = "Editor", |
|---|
| 48 | NSDocumentClass = "NodeBoxDocument", |
|---|
| 49 | CFBundleTypeIconFile = "NodeBoxFile.icns", |
|---|
| 50 | ), |
|---|
| 51 | ], |
|---|
| 52 | CFBundleIconFile = NAME + '.icns', |
|---|
| 53 | CFBundleName = NAME, |
|---|
| 54 | CFBundleShortVersionString = VERSION, |
|---|
| 55 | CFBundleVersion='', |
|---|
| 56 | CFBundleGetInfoString= VERSION, |
|---|
| 57 | CFBundleExecutable = NAME, |
|---|
| 58 | LSMinimumSystemVersion = "10.4.0", |
|---|
| 59 | CFBundleIdentifier = 'net.nodebox.NodeBox', |
|---|
| 60 | CFBundleSignature = 'ndbx', |
|---|
| 61 | CFBundleInfoDictionaryVersion=VERSION, |
|---|
| 62 | NSHumanReadableCopyright= u'Copyright © 2003-2008 NodeBox. All Rights Reserved.', |
|---|
| 63 | CFBundleHelpBookFolder='NodeBox Help', |
|---|
| 64 | CFBundleHelpBookName='NodeBox Help', |
|---|
| 65 | ) |
|---|
| 66 | |
|---|
| 67 | if __name__=='__main__': |
|---|
| 68 | |
|---|
| 69 | setup(name = NAME, |
|---|
| 70 | version = VERSION, |
|---|
| 71 | data_files = [ |
|---|
| 72 | 'Resources/English.lproj', |
|---|
| 73 | 'Resources/Credits.rtf', |
|---|
| 74 | 'Resources/NodeBox.icns', |
|---|
| 75 | 'Resources/NodeBoxFile.icns', |
|---|
| 76 | 'Resources/zoombig.png', |
|---|
| 77 | 'Resources/zoomsmall.png', |
|---|
| 78 | ], |
|---|
| 79 | app = [dict(script='macboot.py', plist=plist)], |
|---|
| 80 | options = dict(py2app=dict( |
|---|
| 81 | includes = ['DrawingPrimitives'] + all_modules, |
|---|
| 82 | packages = all_packages, |
|---|
| 83 | site_packages = True, |
|---|
| 84 | optimize = 2, |
|---|
| 85 | )), |
|---|
| 86 | ) |
|---|