Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 1 | /*********************************************************** |
Guido van Rossum | fd71b9e | 2000-06-30 23:50:40 +0000 | [diff] [blame] | 2 | Copyright (c) 2000, BeOpen.com. |
| 3 | Copyright (c) 1995-2000, Corporation for National Research Initiatives. |
| 4 | Copyright (c) 1990-1995, Stichting Mathematisch Centrum. |
| 5 | All rights reserved. |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 6 | |
Guido van Rossum | fd71b9e | 2000-06-30 23:50:40 +0000 | [diff] [blame] | 7 | See the file "Misc/COPYRIGHT" for information on usage and |
| 8 | redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 9 | ******************************************************************/ |
| 10 | |
| 11 | /* Newfangled version identification scheme. |
| 12 | |
| 13 | This scheme was added in Python 1.5.2b2; before that time, only PATCHLEVEL |
| 14 | was available. To test for presence of the scheme, test for |
| 15 | defined(PY_MAJOR_VERSION). |
| 16 | |
| 17 | When the major or minor version changes, the VERSION variable in |
| 18 | configure.in must also be changed. |
| 19 | |
| 20 | There is also (independent) API version information in modsupport.h. |
| 21 | */ |
| 22 | |
| 23 | /* Values for PY_RELEASE_LEVEL */ |
| 24 | #define PY_RELEASE_LEVEL_ALPHA 0xA |
| 25 | #define PY_RELEASE_LEVEL_BETA 0xB |
Guido van Rossum | bd341fa | 1999-04-07 16:00:20 +0000 | [diff] [blame] | 26 | #define PY_RELEASE_LEVEL_GAMMA 0xC |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 27 | #define PY_RELEASE_LEVEL_FINAL 0xF /* Serial should be 0 here */ |
Guido van Rossum | 9e47859 | 1999-04-13 14:47:26 +0000 | [diff] [blame] | 28 | /* Higher for patch releases */ |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 29 | |
| 30 | /* Version parsed out into numeric values */ |
Guido van Rossum | 632ea6e | 2000-06-29 22:29:24 +0000 | [diff] [blame] | 31 | #define PY_MAJOR_VERSION 2 |
| 32 | #define PY_MINOR_VERSION 0 |
Guido van Rossum | 21a50bd | 2000-03-29 01:46:45 +0000 | [diff] [blame] | 33 | #define PY_MICRO_VERSION 0 |
Guido van Rossum | 632ea6e | 2000-06-29 22:29:24 +0000 | [diff] [blame] | 34 | #define PY_RELEASE_LEVEL PY_RELEASE_LEVEL_BETA |
| 35 | #define PY_RELEASE_SERIAL 1 |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 36 | |
| 37 | /* Version as a string */ |
Guido van Rossum | 632ea6e | 2000-06-29 22:29:24 +0000 | [diff] [blame] | 38 | #define PY_VERSION "2.0b1" |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 39 | |
| 40 | /* Historic */ |
Guido van Rossum | 632ea6e | 2000-06-29 22:29:24 +0000 | [diff] [blame] | 41 | #define PATCHLEVEL "2.0b1" |
Guido van Rossum | f1176c4 | 1999-01-03 12:40:24 +0000 | [diff] [blame] | 42 | |
| 43 | /* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2. |
| 44 | Use this for numeric comparisons, e.g. #if PY_VERSION_HEX >= ... */ |
| 45 | #define PY_VERSION_HEX ((PY_MAJOR_VERSION << 24) | \ |
| 46 | (PY_MINOR_VERSION << 16) | \ |
| 47 | (PY_MICRO_VERSION << 8) | \ |
| 48 | (PY_RELEASE_LEVEL << 4) | \ |
| 49 | (PY_RELEASE_SERIAL << 0)) |