mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Pythonpath converted to Rez source, and vers resource removed from
bundle to its own Rez source file. With these changes various resources are all set automatically from .h files.
This commit is contained in:
parent
2eb07f0945
commit
d2d2b20e15
10 changed files with 119 additions and 0 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
89
Mac/Resources/pythonpath.r
Normal file
89
Mac/Resources/pythonpath.r
Normal file
|
@ -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)
|
||||
};
|
30
Mac/Resources/version.r
Normal file
30
Mac/Resources/version.r
Normal file
|
@ -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)
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue