8000 get build info from elsewhere · python/cpython@554fa49 · GitHub
[go: up one dir, main page]

Skip to content

Commit 554fa49

Browse files
committed
get build info from elsewhere
1 parent 2fff2e6 commit 554fa49

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

Python/getversion.c

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,13 @@ PERFORMANCE OF THIS SOFTWARE.
3535

3636
#include "patchlevel.h"
3737

38-
#define VERSION "%s (%s) %s"
39-
40-
#ifdef __DATE__
41-
#define DATE __DATE__
42-
#else
43-
#define DATE "October 13 1995"
44-
#endif
45-
4638
extern const char *Py_GetCompiler();
39+
extern const char *Py_GetBuildInfo();
4740

4841
const char *
4942
Py_GetVersion()
5043
{
5144
static char version[80];
52-
sprintf(version, VERSION, PATCHLEVEL, DATE, Py_GetCompiler());
45+
sprintf(version, "%.10s (%.30s) %.30s", PATCHLEVEL, Py_GetBuildInfo(), Py_GetCompiler());
5346
return version;
5447
}

0 commit comments

Comments
 (0)
0