[Idle-dev] CVS: idle buildapp.py,NONE,1.1 INSTALL.txt,1.6,1.7 PyShell.py,1.62,1.63 macosx_main.py,1.8,NONE

Tony Lownds tonylownds@users.sourceforge.net
Tue, 13 May 2003 08:28:23 -0700


Update of /cvsroot/idlefork/idle
In directory sc8-pr-cvs1:/tmp/cvs-serv17129

Modified Files:
	INSTALL.txt PyShell.py 
Added Files:
	buildapp.py 
Removed Files:
	macosx_main.py 
Log Message:
1. The command-line arguments for subprocesses no longer need to be
specialized for Mac OS X.

2. buildapp.py - a new file for building an application icon for IDLE on Mac
OS X. See INSTALL.txt



--- NEW FILE: buildapp.py ---
#
# After running python setup.py install, run this program from the command 
# line like so:
#
# % python2.3 buildapp.py build
#
# A double-clickable IDLE application will be created in the build/ directory.
#

from bundlebuilder import buildapp

buildapp(
	name="IDLE",
	mainprogram="idle.py",
	argv_emulation=1,
)

Index: INSTALL.txt
===================================================================
RCS file: /cvsroot/idlefork/idle/INSTALL.txt,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** INSTALL.txt	25 Apr 2003 16:37:31 -0000	1.6
--- INSTALL.txt	13 May 2003 15:28:21 -0000	1.7
***************
*** 42,45 ****
--- 42,56 ----
  	script to read:
  	       !# /usr/bin/python2.2
+ 
+ 	On Mac OS X, /usr/bin/python may be pointing at the OS-installed
+ 	python, which does not have GUI support. Change the first line of
+ 	/usr/bin/idle to read:
+ 		#! /usr/bin/env pythonw
+ 
+ 	Also, to build an IDLE application that can be used from the Finder
+ 	on Mac OS X, run:
+ 		pythonw buildapp.py build
+ 		open build
+ 	You will see an IDLE application.
  	       
  See README.txt for more details on this version of IDLEfork. 

Index: PyShell.py
===================================================================
RCS file: /cvsroot/idlefork/idle/PyShell.py,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -r1.62 -r1.63
*** PyShell.py	12 May 2003 02:33:47 -0000	1.62
--- PyShell.py	13 May 2003 15:28:21 -0000	1.63
***************
*** 312,338 ****
  
      def build_subprocess_arglist(self):
!         if sys.platform == 'darwin' and sys.argv[0].count('.app'):
!             # We need to avoid using sys.executable because it fails on some
!             # of the applet architectures On Mac OS X.
!             #
!             # here are the applet architectures tried:
!             #
!             # framework applet: sys.executable + -p is correct
!             # python 2.2 + pure python main applet:
!             #                   sys.executable + -p is correct
!             # pythonw idle.py:  sys.executable + -c is correct
!             #
!             # XXX what about warnoptions?
!             return [sys.executable, '-p', str(self.port)]
          else:
!             w = ['-W' + s for s in sys.warnoptions]
!             # Maybe IDLE is installed and is being accessed via sys.path,
!             # or maybe it's not installed and the idle.py script is being
!             # run from the IDLE source directory.
!             if __name__ == 'idlelib.PyShell':
!                 command = "__import__('idlelib.run').run.main()"
!             else:
!                 command = "__import__('run').main()"
!             return [sys.executable] + w + ["-c", command, str(self.port)]
  
      def start_subprocess(self):
--- 312,324 ----
  
      def build_subprocess_arglist(self):
!         w = ['-W' + s for s in sys.warnoptions]
!         # Maybe IDLE is installed and is being accessed via sys.path,
!         # or maybe it's not installed and the idle.py script is being
!         # run from the IDLE source directory.
!         if __name__ == 'idlelib.PyShell':
!             command = "__import__('idlelib.run').run.main()"
          else:
!             command = "__import__('run').main()"
!         return [sys.executable] + w + ["-c", command, str(self.port)]
  
      def start_subprocess(self):

--- macosx_main.py DELETED ---