diff --git a/IPython/frontend/cocoa/plugin/FrontendLoader.py b/IPython/frontend/cocoa/plugin/FrontendLoader.py new file mode 100644 index 0000000..2c32f37 --- /dev/null +++ b/IPython/frontend/cocoa/plugin/FrontendLoader.py @@ -0,0 +1,17 @@ +# encoding: utf-8 +""" +Provides a namespace for loading the Cocoa frontend via a Cocoa plugin. + +Author: Barry Wark +""" +__docformat__ = "restructuredtext en" + +#----------------------------------------------------------------------------- +# Copyright (C) 2008 The IPython Development Team +# +# Distributed under the terms of the BSD License. The full license is in +# the file COPYING, distributed as part of this software. +#----------------------------------------------------------------------------- + +from Foundation import NSObject +from IPython.frontend.cocoa.cocoa_frontend import IPythonCocoaController \ No newline at end of file diff --git a/IPython/frontend/cocoa/plugin/Makefile b/IPython/frontend/cocoa/plugin/Makefile new file mode 100644 index 0000000..66ddc3b --- /dev/null +++ b/IPython/frontend/cocoa/plugin/Makefile @@ -0,0 +1,5 @@ +include ./plugins.mk + +all : dist/IPythonCocoaController.plugin + +dist/IPythonCocoaController.plugin : ./FrontendLoader.py ./setup.py \ No newline at end of file diff --git a/IPython/frontend/cocoa/plugin/plugins.mk b/IPython/frontend/cocoa/plugin/plugins.mk new file mode 100644 index 0000000..af5d0e9 --- /dev/null +++ b/IPython/frontend/cocoa/plugin/plugins.mk @@ -0,0 +1,22 @@ +%.plugin:: + mkdir -p plugin + rm -rf dist/$(notdir $@) + rm -rf build dist && \ + python setup.py py2app -s + +%.py: + @echo "test -f $@" + @test -f %@ + +%.nib: + @echo "test -f $@" + @test -f %@ + +.DEFAULT_GOAL := all + +.PHONY : all clean + +clean : + rm -rf build dist + + diff --git a/IPython/frontend/cocoa/plugin/setup.py b/IPython/frontend/cocoa/plugin/setup.py new file mode 100644 index 0000000..984e9cc --- /dev/null +++ b/IPython/frontend/cocoa/plugin/setup.py @@ -0,0 +1,34 @@ +# encoding: utf-8 +""" +setup.py + +Setuptools installer script for generating a Cocoa plugin for the +IPython cocoa frontend + +Author: Barry Wark +""" +__docformat__ = "restructuredtext en" + +#----------------------------------------------------------------------------- +# Copyright (C) 2008 The IPython Development Team +# +# Distributed under the terms of the BSD License. The full license is in +# the file COPYING, distributed as part of this software. +#----------------------------------------------------------------------------- + +from setuptools import setup + +infoPlist = dict( + CFBundleDevelopmentRegion='English', + CFBundleIdentifier='org.scipy.ipython.cocoa_frontend', + NSPrincipalClass='IPythonCocoaController', +) + +setup( + plugin=['FrontendLoader.py'], + setup_requires=['py2app'], + options=dict(py2app=dict( + plist=infoPlist, + excludes=['IPython'] + )), +) \ No newline at end of file