summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2000-12-03 22:31:50 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2000-12-03 22:31:50 (GMT)
commit6c502d7a81ba169a2c034e0b0aa3633489657c70 (patch)
treea5f73c001aebccf10a1452eb7fa9ffa647887d2b
parentafb17fc7b2782bddd74ffcf4f5b51efc9a9b4545 (diff)
downloadcpython-6c502d7a81ba169a2c034e0b0aa3633489657c70.zip
cpython-6c502d7a81ba169a2c034e0b0aa3633489657c70.tar.gz
cpython-6c502d7a81ba169a2c034e0b0aa3633489657c70.tar.bz2
Got it working for all important plugins, and moved it from Build to scripts.
-rw-r--r--Mac/Build/genpluginprojects.py43
-rw-r--r--Mac/scripts/genpluginprojects.py108
2 files changed, 108 insertions, 43 deletions
diff --git a/Mac/Build/genpluginprojects.py b/Mac/Build/genpluginprojects.py
deleted file mode 100644
index c0022e2..0000000
--- a/Mac/Build/genpluginprojects.py
+++ /dev/null
@@ -1,43 +0,0 @@
-import mkcwproject
-import sys
-import os
-
-PROJECTDIR = os.path.join(sys.prefix, ":Mac:Build")
-MODULEDIRS = [ # Relative to projectdirs
- "::Modules:%s",
- "::Modules",
- ":::Modules",
-]
-
-def genpluginproject(module,
- project=None, projectdir=None,
- sources=[], sourcedirs=[],
- libraries=[], extradirs=[]):
- if not project:
- project = module + '.mcp'
- if not projectdir:
- projectdir = PROJECTDIR
- if not sources:
- sources = [module + 'module.c']
- if not sourcedirs:
- for moduledir in MODULEDIRS:
- if '%' in moduledir:
- moduledir = moduledir % module
- fn = os.path.join(projectdir, os.path.join(moduledir, sources[0]))
- if os.path.exists(fn):
- sourcedirs = [moduledir]
- break
- else:
- print "Warning: %s: sourcefile not found: %s"%(module, sources[0])
- sourcedirs = []
- dict = {
- "sysprefix" : sys.prefix,
- "sources" : sources,
- "extrasearchdirs" : sourcedirs + extradirs,
- "libraries": libraries,
- }
- mkcwproject.mkproject(os.path.join(projectdir, project), module, dict)
-
-genpluginproject("Cm", libraries=["QuickTimeLib"])
-genpluginproject("calldll", sources=["calldll.c"])
-genpluginproject("zlib", libraries=["zlib.ppc.Lib"], extradirs=["::::imglibs:zlib"])
diff --git a/Mac/scripts/genpluginprojects.py b/Mac/scripts/genpluginprojects.py
new file mode 100644
index 0000000..7351015
--- /dev/null
+++ b/Mac/scripts/genpluginprojects.py
@@ -0,0 +1,108 @@
+import mkcwproject
+import sys
+import os
+
+PROJECTDIR = os.path.join(sys.prefix, ":Mac:Build")
+MODULEDIRS = [ # Relative to projectdirs
+ "::Modules:%s",
+ "::Modules",
+ ":::Modules",
+]
+
+def genpluginproject(module,
+ project=None, projectdir=None,
+ sources=[], sourcedirs=[],
+ libraries=[], extradirs=[],
+ extraexportsymbols=[]):
+ if not project:
+ project = module + '.mcp'
+ if not projectdir:
+ projectdir = PROJECTDIR
+ if not sources:
+ sources = [module + 'module.c']
+ if not sourcedirs:
+ for moduledir in MODULEDIRS:
+ if '%' in moduledir:
+ moduledir = moduledir % module
+ fn = os.path.join(projectdir, os.path.join(moduledir, sources[0]))
+ if os.path.exists(fn):
+ moduledir, sourcefile = os.path.split(fn)
+ sourcedirs = [moduledir]
+ sources[0] = sourcefile
+ break
+ else:
+ print "Warning: %s: sourcefile not found: %s"%(module, sources[0])
+ sourcedirs = []
+ dict = {
+ "sysprefix" : sys.prefix,
+ "sources" : sources,
+ "extrasearchdirs" : sourcedirs + extradirs,
+ "libraries": libraries,
+ "mac_outputdir" : os.path.join(sys.prefix, ":Mac:Plugins"),
+ "extraexportsymbols" : extraexportsymbols,
+ }
+ mkcwproject.mkproject(os.path.join(projectdir, project), module, dict)
+
+def genallprojects():
+ # Standard Python modules
+ genpluginproject("ucnhash", sources=["ucnhash.c"])
+ genpluginproject("pyexpat",
+ sources=["pyexpat.c"],
+ libraries=["libexpat.ppc.lib"],
+ extradirs=["::::expat:mac"])
+ genpluginproject("zlib",
+ libraries=["zlib.ppc.Lib"],
+ extradirs=["::::imglibs:zlib:mac", "::::imglibs:zlib"])
+ genpluginproject("gdbm",
+ libraries=["gdbm.ppc.gusi.lib"],
+ extradirs=["::::gdbm:mac", "::::gdbm"])
+
+ # bgen-generated Toolbox modules
+ genpluginproject("App", libraries=["AppearanceLib"])
+ genpluginproject("Cm",
+ libraries=["QuickTimeLib"],
+ extraexportsymbols=[
+ "CmpObj_New",
+ "CmpObj_Convert",
+ "CmpInstObj_New",
+ "CmpInstObj_Convert",
+ ])
+ genpluginproject("Drag", libraries=["DragLib"])
+ genpluginproject("Fm")
+ genpluginproject("Help")
+ genpluginproject("Icn", libraries=["IconServicesLib"])
+ genpluginproject("List")
+ genpluginproject("Qt", libraries=["QuickTimeLib", "Cm.ppc.slb"], extradirs=["::Plugins"])
+ genpluginproject("Qdoffs")
+ genpluginproject("Scrap")
+ genpluginproject("Snd", libraries=["SoundLib"])
+ genpluginproject("Sndihooks", sources=[":snd:Sndihooks.c"])
+ genpluginproject("TE", libraries=["DragLib"])
+
+ # Other Mac modules
+ genpluginproject("calldll", sources=["calldll.c"])
+ genpluginproject("ColorPicker")
+ genpluginproject("Printing")
+ genpluginproject("waste",
+ sources=[
+ "wastemodule.c",
+ 'WEAccessors.c', 'WEBirthDeath.c', 'WEDebug.c',
+ 'WEDrawing.c', 'WEFontTables.c', 'WEHighLevelEditing.c',
+ 'WEICGlue.c', 'WEInlineInput.c', 'WELineLayout.c', 'WELongCoords.c',
+ 'WELowLevelEditing.c', 'WEMouse.c', 'WEObjects.c', 'WEScraps.c',
+ 'WESelecting.c', 'WESelectors.c', 'WEUserSelectors.c', 'WEUtilities.c',
+ 'WEObjectHandlers.c',
+ 'WETabs.c',
+ 'WETabHooks.c'],
+ libraries=['DragLib'],
+ extradirs=['::::Waste 1.3 Distribution:*']
+ )
+ genpluginproject("ctb")
+ genpluginproject("icglue", sources=["icgluemodule.c"],
+ libraries=["ICGlueCFM-PPC.lib"],
+ extradirs=["::::ICProgKit1.4:APIs"])
+ genpluginproject("macspeech", libraries=["SpeechLib"])
+
+if __name__ == '__main__':
+ genallprojects()
+