diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-23 23:23:47 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-02-23 23:23:47 (GMT) |
commit | 8cd9a4fded8e6b7451e47c36585ef3d2a318dcc8 (patch) | |
tree | 34570462f824c09f7419e08cac3a0ed5a7f16e78 /Mac/Modules | |
parent | 15ff0e9342dbb93cec682fdc1d5a87de4377f602 (diff) | |
download | cpython-8cd9a4fded8e6b7451e47c36585ef3d2a318dcc8.zip cpython-8cd9a4fded8e6b7451e47c36585ef3d2a318dcc8.tar.gz cpython-8cd9a4fded8e6b7451e47c36585ef3d2a318dcc8.tar.bz2 |
Added a linkmodel attribute, showing how Python was built. This is so
packages can check that extension modules are built for the right type
of python. Current values can be static, framework, shared and cfm (for
completeness, for MacPyton-OS9).
Closes bug #691889. The reporter suggests backporting this to 2.2.3
and I think I agree.
Diffstat (limited to 'Mac/Modules')
-rw-r--r-- | Mac/Modules/macosmodule.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Mac/Modules/macosmodule.c b/Mac/Modules/macosmodule.c index 8018839..92d5452 100644 --- a/Mac/Modules/macosmodule.c +++ b/Mac/Modules/macosmodule.c @@ -764,5 +764,18 @@ initMacOS(void) if (PyDict_SetItemString(d, "runtimemodel", Py_BuildValue("s", PY_RUNTIMEMODEL)) != 0) return; +#if !TARGET_API_MAC_OSX +#define PY_LINKMODEL "cfm" +#elif defined(WITH_NEXT_FRAMEWORK) +#define PY_LINKMODEL "framework" +#elif defined(Py_ENABLE_SHARED) +#define PY_LINKMODEL "shared" +#else +#define PY_LINKMODEL "static" +#endif + if (PyDict_SetItemString(d, "linkmodel", + Py_BuildValue("s", PY_LINKMODEL)) != 0) + return; + } |