blob: 68c29f58ab418d50f744a850c0abd3e56685d5b2 [file] [log] [blame]
Guido van Rossumf1176c41999-01-03 12:40:24 +00001
Guido van Rossum45aecf42006-03-15 04:58:47 +00002/* Python version identification scheme.
Guido van Rossumf1176c41999-01-03 12:40:24 +00003
4 When the major or minor version changes, the VERSION variable in
Matthias Klose0f4c16e2012-03-14 23:10:15 +01005 configure.ac must also be changed.
Guido van Rossumf1176c41999-01-03 12:40:24 +00006
7 There is also (independent) API version information in modsupport.h.
8*/
9
10/* Values for PY_RELEASE_LEVEL */
Serhiy Storchaka598ceae2017-11-28 17:56:10 +020011#define PY_RELEASE_LEVEL_ALPHA 0xA
12#define PY_RELEASE_LEVEL_BETA 0xB
13#define PY_RELEASE_LEVEL_GAMMA 0xC /* For release candidates */
14#define PY_RELEASE_LEVEL_FINAL 0xF /* Serial should be 0 here */
15 /* Higher for patch releases */
Guido van Rossumf1176c41999-01-03 12:40:24 +000016
17/* Version parsed out into numeric values */
Barry Warsawbb5cd082008-04-02 23:33:27 +000018/*--start constants--*/
Serhiy Storchaka598ceae2017-11-28 17:56:10 +020019#define PY_MAJOR_VERSION 3
Ned Deily5489bda2018-01-31 17:44:09 -050020#define PY_MINOR_VERSION 8
Serhiy Storchaka598ceae2017-11-28 17:56:10 +020021#define PY_MICRO_VERSION 0
Ned Deily5489bda2018-01-31 17:44:09 -050022#define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_ALPHA
23#define PY_RELEASE_SERIAL 0
Guido van Rossumf1176c41999-01-03 12:40:24 +000024
25/* Version as a string */
Ned Deily5489bda2018-01-31 17:44:09 -050026#define PY_VERSION "3.8.0a0"
Barry Warsawbb5cd082008-04-02 23:33:27 +000027/*--end constants--*/
Guido van Rossumf1176c41999-01-03 12:40:24 +000028
29/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
30 Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */
31#define PY_VERSION_HEX ((PY_MAJOR_VERSION << 24) | \
Serhiy Storchaka598ceae2017-11-28 17:56:10 +020032 (PY_MINOR_VERSION << 16) | \
33 (PY_MICRO_VERSION << 8) | \
34 (PY_RELEASE_LEVEL << 4) | \
35 (PY_RELEASE_SERIAL << 0))