Kaydet (Commit) 8cd9a4fd authored tarafından Jack Jansen's avatar Jack Jansen

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.
üst 15ff0e93
...@@ -764,5 +764,18 @@ initMacOS(void) ...@@ -764,5 +764,18 @@ initMacOS(void)
if (PyDict_SetItemString(d, "runtimemodel", if (PyDict_SetItemString(d, "runtimemodel",
Py_BuildValue("s", PY_RUNTIMEMODEL)) != 0) Py_BuildValue("s", PY_RUNTIMEMODEL)) != 0)
return; 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;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment