Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 1 | |
Guido van Rossum | 45aecf4 | 2006-03-15 04:58:47 +0000 | [diff] [blame] | 2 | /* Python version identification scheme. |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 3 | |
| 4 | When the major or minor version changes, the VERSION variable in |
Matthias Klose | 0f4c16e | 2012-03-14 23:10:15 +0100 | [diff] [blame] | 5 | configure.ac must also be changed. |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 6 | |
| 7 | There is also (independent) API version information in modsupport.h. |
| 8 | */ |
| 9 | |
| 10 | /* Values for PY_RELEASE_LEVEL */ |
| 11 | #define PY_RELEASE_LEVEL_ALPHA 0xA |
| 12 | #define PY_RELEASE_LEVEL_BETA 0xB |
Anthony Baxter | 49d4213 | 2004-11-15 15:03:25 +0000 | [diff] [blame] | 13 | #define PY_RELEASE_LEVEL_GAMMA 0xC /* For release candidates */ |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 14 | #define PY_RELEASE_LEVEL_FINAL 0xF /* Serial should be 0 here */ |
Guido van Rossum | 9e47859 | 1999-04-13 14:47:26 +0000 | [diff] [blame] | 15 | /* Higher for patch releases */ |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 16 | |
| 17 | /* Version parsed out into numeric values */ |
Barry Warsaw | bb5cd08 | 2008-04-02 23:33:27 +0000 | [diff] [blame] | 18 | /*--start constants--*/ |
Neal Norwitz | ade612b | 2006-03-17 08:27:50 +0000 | [diff] [blame] | 19 | #define PY_MAJOR_VERSION 3 |
Georg Brandl | 08a9012 | 2012-09-29 09:34:13 +0200 | [diff] [blame] | 20 | #define PY_MINOR_VERSION 4 |
Guido van Rossum | 21a50bd | 2000-03-29 01:46:45 +0000 | [diff] [blame] | 21 | #define PY_MICRO_VERSION 0 |
Larry Hastings | cf1a3cd | 2014-03-15 22:34:24 -0700 | [diff] [blame] | 22 | #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_FINAL |
| 23 | #define PY_RELEASE_SERIAL 0 |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 24 | |
| 25 | /* Version as a string */ |
Larry Hastings | e41b73c | 2014-03-16 20:13:07 -0700 | [diff] [blame] | 26 | #define PY_VERSION "3.4.0+" |
Barry Warsaw | bb5cd08 | 2008-04-02 23:33:27 +0000 | [diff] [blame] | 27 | /*--end constants--*/ |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 28 | |
| 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) | \ |
| 32 | (PY_MINOR_VERSION << 16) | \ |
| 33 | (PY_MICRO_VERSION << 8) | \ |
| 34 | (PY_RELEASE_LEVEL << 4) | \ |
| 35 | (PY_RELEASE_SERIAL << 0)) |