]> granicus.if.org Git - python/commitdiff
Pythonpath converted to Rez source, and vers resource removed from
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 29 Jan 1999 16:15:52 +0000 (16:15 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 29 Jan 1999 16:15:52 +0000 (16:15 +0000)
bundle to its own Rez source file. With these changes various resources
are all set automatically from .h files.

Mac/Build/Python.prj
Mac/Build/PythonApplet.prj
Mac/Build/PythonCore.prj
Mac/Build/PythonCoreCFM68K.prj
Mac/Build/PythonCorePPC.prj
Mac/Build/PythonStandSmall.prj
Mac/Build/PythonStandalone.prj
Mac/Resources/bundle.rsrc
Mac/Resources/pythonpath.r [new file with mode: 0644]
Mac/Resources/version.r [new file with mode: 0644]

index 2c4ff724cd77fa81f811045c21899e9a15c200e0..2407f3ae90b287acd4416b6008b3dad143321174 100644 (file)
Binary files a/Mac/Build/Python.prj and b/Mac/Build/Python.prj differ
index 735c9f481c1dd0e470dfc05265053bfb1a2c6f5f..c016798183b88d2a92ded6a11419bce701ebb521 100644 (file)
Binary files a/Mac/Build/PythonApplet.prj and b/Mac/Build/PythonApplet.prj differ
index 4749768ce3fa44f0cd63791a3163758bbff0e71d..e2ba3067f31fa61df00612c2c1e6dd2924fcfee0 100644 (file)
Binary files a/Mac/Build/PythonCore.prj and b/Mac/Build/PythonCore.prj differ
index 3402cc71b3ff9ef2a7ef9cab6d29aa524b1d995f..2302b7f5ca485ff5c781e5bbe031a2b61c29d87a 100644 (file)
Binary files a/Mac/Build/PythonCoreCFM68K.prj and b/Mac/Build/PythonCoreCFM68K.prj differ
index 9515eb34304b73ba93b54563a95449db471adc8e..e6853a6ef0b9e07e0bacfe17f75f8788365526fc 100644 (file)
Binary files a/Mac/Build/PythonCorePPC.prj and b/Mac/Build/PythonCorePPC.prj differ
index 009e897cfe2deb5c15577ec19f528fdd4171cfeb..46740e8b65733beac08d5c791ec9935fb40498fb 100644 (file)
Binary files a/Mac/Build/PythonStandSmall.prj and b/Mac/Build/PythonStandSmall.prj differ
index fe609cafad4dafdddf579ae02155eab11b6af39c..1e95ba62ade42fb14ece1f925863584950435e8e 100644 (file)
Binary files a/Mac/Build/PythonStandalone.prj and b/Mac/Build/PythonStandalone.prj differ
index 6006321af741098aaee2a303a231717db0f4133f..43a4702677c209ebe2a1454cd8ac3fb9903af796 100644 (file)
Binary files a/Mac/Resources/bundle.rsrc and b/Mac/Resources/bundle.rsrc differ
diff --git a/Mac/Resources/pythonpath.r b/Mac/Resources/pythonpath.r
new file mode 100644 (file)
index 0000000..288c5b4
--- /dev/null
@@ -0,0 +1,89 @@
+/*
+** Resources for the sys.path initialization, the Python options
+** and the preference filename
+*/
+#include "Types.r"
+#include "patchlevel.h"
+#include "pythonresources.h"
+
+/* A few resource type declarations */
+
+type 'Popt' {
+       literal byte version = POPT_VERSION_CURRENT;
+       byte noInspect = 0, inspect = 1;
+       byte noVerbose = 0, verbose = 1;
+       byte noOptimize = 0, optimize = 1;
+       byte noUnbuffered = 0, unbuffered = 1;
+       byte noDebugParser = 0, debugParser = 1;
+       byte closeOnNormalExit = 0, noCloseOnNormalExit = 1;
+       byte closeOnErrorExit = 0, noCloseOnErrorExit = 1;
+       byte interactiveOptions = 0, noInteractiveOptions = 1;
+       byte argcArgv = 0, noArgcArgv = 1;
+       byte newStandardExceptions = 0, oldStandardExceptions = 1;
+       byte sitePython = 0, noSitePython = 1;
+};
+
+type 'TMPL' {
+       wide array {
+               pstring;
+               literal longint;
+       };
+};
+
+/* The resources themselves */
+
+/* Popt template, for editing them in ResEdit */
+
+resource 'TMPL' (PYTHONOPTIONS_ID, "Popt") {
+       {
+               "preference version",                   'DBYT',
+               "Interactive after script",             'DBYT',
+               "Verbose import",                               'DBYT',
+               "Optimize",                                             'DBYT',
+               "Unbuffered stdio",                             'DBYT',
+               "Debug parser",                                 'DBYT',
+               "Keep window on normal exit",   'DBYT',
+               "Keep window on error exit",    'DBYT',
+               "No interactive option dialog", 'DBYT',
+               "No argc/argv emulation",               'DBYT',
+               "Old standard exceptions",              'DBYT',
+               "No site-python support",               'DBYT',
+       }
+};
+
+/* The default-default Python options */
+
+resource 'Popt' (PYTHONOPTIONS_ID, "Options") {
+       POPT_VERSION_CURRENT,
+       noInspect,
+       noVerbose,
+       noOptimize,
+       noUnbuffered,
+       noDebugParser,
+       closeOnNormalExit,
+       noCloseOnErrorExit,
+       interactiveOptions,
+       argcArgv,
+       newStandardExceptions,
+       sitePython,
+};
+
+/* The sys.path initializer */
+
+resource 'STR#' (PYTHONPATH_ID, "sys.path initialization") {
+       {
+               "$(PYTHON)",
+               "$(PYTHON):Lib",
+               "$(PYTHON):Mac:PlugIns",
+               "$(PYTHON):Mac:Lib",
+               "$(PYTHON):Mac:Lib:lib-toolbox",
+               "$(PYTHON):Mac:Lib:lib-scripting",
+               "$(PYTHON):Extensions:img:Lib"
+       }
+};
+
+/* The preferences filename */
+
+resource 'STR ' (PREFFILENAME_ID, PREFFILENAME_PASCAL_NAME) {
+       $$Format("Python %s Preferences", PY_VERSION)
+};
diff --git a/Mac/Resources/version.r b/Mac/Resources/version.r
new file mode 100644 (file)
index 0000000..4e52e6a
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+** Create the 'vers' version resource from information in the
+** Python include files.
+*/
+
+#include "Types.r"
+
+#include "patchlevel.h"
+
+/* Invent the Mac version from the Python version */
+#if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_ALPHA
+#define V_RELEASE alpha
+#endif
+#if PY_RELEASE_LEVEL == PY_RELEASE_LEVEL_BETA
+#define V_RELEASE beta
+#endif
+#ifndef V_RELEASE
+#define V_RELEASE final
+#endif
+
+resource 'vers' (1) {
+       PY_MAJOR_VERSION,
+       (PY_MINOR_VERSION<<4) | (PY_MICRO_VERSION),
+       V_RELEASE,
+       PY_RELEASE_SERIAL,
+       0,
+       PY_VERSION,
+       $$Format("%s, © Stichting Mathematisch Centrum %s",
+                       PY_VERSION, $$Date)
+};