Commits

Ronald Oussoren  committed e669cf1

- Add Tools/mknibwrapper following a suggestion by Just van Rossum
- Removed Scripts/nibclasswrapper (and therefore the entire directory)
because it is no longer needed.

  • Participants
  • Parent commits 20216f8

Comments (0)

Files changed (6)

File pyobjc/ChangeLog

+2002-11-22 Ronald Oussoren <oussoren@cistron.nl>
+	* Examples/TableModel2/main.m: Set PYTHONPATH in the environment of
+	  the child
+	* Import bundlebuilder.py and plistlib.py from MacPython
+	* Remove Tools/mknibwrapper: It is no longer needed
+	* Added scripts/nibclassbuilder, as suggested by Just van Rossum
+
 2002-11-20 Ronald Oussoren <oussoren@cistron.nl>
 	Translated a number of names to a more Cocoa like syntax:
 	* objc.lookup_class -> objc.lookUpClass

File pyobjc/Scripts/README

-Reserved for PyObjC related scripts (for 'end-users')
+Reserved for PyObjC related scripts 

File pyobjc/Scripts/nibclassbuilder

+#!/usr/bin/env python
+from AppKit import NibClassBuilder
+NibClassBuilder.commandline()

File pyobjc/Tools/README

-Reserved for PyObjC related tools

File pyobjc/Tools/mknibwrapper

-#!/usr/bin/env python
-"""
-mknibwrapper [--module=nibwrapper] [--output-directory=.] [--help] file.nib...
-
-This tool can be used to generate the classes defined in a NIB file.
-"""
-import sys
-import getopt
-import os
-
-from AppKit.classnib import parse_classes_nib, generate_wrapper_module
-
-PRG=sys.argv[0]
-MODNAME='nibwrapper'
-BASEDIR='.'
-
-def usage(fp):
-	fp.write("Usage:\n")
-	fp.write("\t%s [--module=nibwrapper] [--output-directory=.] [--help] x.nib...\n", PRG)
-
-try:
-	opts, args = getopt.getopt(sys.argv[1:],
-		'm:h?o:', [ 'help', 'module=', 'output-directory=' ])
-except getopt.error, msg:
-	sys.stderr.write("%s: %s\n"%(PRG, msg))
-	usage(sys.stderr)
-	sys.exit(1)
-
-for key, value in opts:
-	if key in [ '-h', '-?', '--help' ]:
-		usage(sys.stdout)
-		sys.exit(0)
-	elif key in [ '-m', '--module' ]:
-		MODNAME = value
-	elif key in [ '-d', '--output-directory' ]:
-		BASEDIR = value
-	else:
-		raise InternalError, "Unhandled option: %s"%key
-
-if not args:
-	sys.stderr.write("%s: No NIB file specified\n"%PRG)
-	usage(sys.stderr)
-	sys.exit(1)
-
-class_data = [ parse_classes_nib(a) for a in args ]
-
-fname = os.path.join(BASEDIR, MODNAME.replace('.', '/')) + '.py'
-generate_wrapper_module(open(fname, 'w'), class_data)

File pyobjc/setup.py

 			 + AddressBookExtensions 
 			 ),
 	   packages = CorePackages + CocoaPackages + AddressBookPackages,
-	   package_dir = { '':'Lib' }
+	   package_dir = { '':'Lib' },
+           scripts = [ 'Scripts/nibclassbuilder', ],
            )
 
 except: