2001-12-04 09:11:32 +08:00
|
|
|
#include "Python.h"
|
1997-05-21 06:40:26 +08:00
|
|
|
|
1999-08-28 04:39:37 +08:00
|
|
|
#ifndef DONT_HAVE_STDIO_H
|
1997-01-21 02:34:26 +08:00
|
|
|
#include <stdio.h>
|
1999-08-28 04:39:37 +08:00
|
|
|
#endif
|
1997-01-21 02:34:26 +08:00
|
|
|
|
|
|
|
#ifndef DATE
|
|
|
|
#ifdef __DATE__
|
|
|
|
#define DATE __DATE__
|
|
|
|
#else
|
|
|
|
#define DATE "xx/xx/xx"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef TIME
|
|
|
|
#ifdef __TIME__
|
|
|
|
#define TIME __TIME__
|
|
|
|
#else
|
|
|
|
#define TIME "xx:xx:xx"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2005-12-18 09:27:35 +08:00
|
|
|
const char *
|
2005-12-19 06:46:35 +08:00
|
|
|
Py_GetBuildInfo(void)
|
2005-12-18 09:27:35 +08:00
|
|
|
{
|
2005-12-19 06:46:35 +08:00
|
|
|
static char buildinfo[50];
|
2006-01-06 10:45:17 +08:00
|
|
|
const char *revision = Py_SubversionRevision();
|
|
|
|
const char *sep = *revision ? ":" : "";
|
|
|
|
const char *branch = Py_SubversionShortBranch();
|
2005-12-19 06:46:35 +08:00
|
|
|
PyOS_snprintf(buildinfo, sizeof(buildinfo),
|
2006-01-06 07:38:54 +08:00
|
|
|
"%s%s%s, %.20s, %.9s", branch, sep, revision,
|
|
|
|
DATE, TIME);
|
2005-12-19 06:46:35 +08:00
|
|
|
return buildinfo;
|
2005-12-18 09:27:35 +08:00
|
|
|
}
|
2005-12-19 22:43:44 +08:00
|
|
|
|
|
|
|
const char *
|
2006-01-06 07:38:54 +08:00
|
|
|
_Py_svnversion(void)
|
2005-12-19 22:43:44 +08:00
|
|
|
{
|
2006-01-06 07:38:54 +08:00
|
|
|
#ifdef SVNVERSION
|
|
|
|
return SVNVERSION;
|
|
|
|
#else
|
|
|
|
return "exported";
|
|
|
|
#endif
|
2005-12-19 22:43:44 +08:00
|
|
|
}
|