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