diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-10-11 18:25:52 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-10-11 18:25:52 (GMT) |
commit | c78462fb94b15d71c0dbfa6f3dfc2fabd29f635f (patch) | |
tree | b91c95ae3b47f21193f141d7e20f3013863b07be /PC/python_nt.rc | |
parent | ce2f663c48eb41cd3ccb4ddad5d8b5398f5ccb46 (diff) | |
download | cpython-c78462fb94b15d71c0dbfa6f3dfc2fabd29f635f.zip cpython-c78462fb94b15d71c0dbfa6f3dfc2fabd29f635f.tar.gz cpython-c78462fb94b15d71c0dbfa6f3dfc2fabd29f635f.tar.bz2 |
The MS resource compiler simply cannot be convinced to do arithmetic
correctly. So field3.py is a Python program that can. This injects
another manual step into the Python release process for Windows; so
it goes.
Diffstat (limited to 'PC/python_nt.rc')
-rw-r--r-- | PC/python_nt.rc | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/PC/python_nt.rc b/PC/python_nt.rc index 8317435..a4e4849 100644 --- a/PC/python_nt.rc +++ b/PC/python_nt.rc @@ -19,9 +19,29 @@ #endif /* Nothing below this should need to be changed except for copyright - * notices and company name. + * notices, company name, and FIELD3. Unfortunately, all attempts + * to get the resource compiler to do arithmetic in macros have + * failed miserably -- it gives syntax errors, ignores operators, + * or does stuff that's simply bizarre. */ + +/* This is what we'd like FIELD3 to be: + * + * #define FIELD3 (PY_MICRO_VERSION*1000 + PY_RELEASE_LEVEL*10 + PY_RELEASE_SERIAL) + * + * but that neither gives an error nor comes anywhere close to working. The + * following comment and #define are output from PCbuild\field3.py: + * + * For 2.3a0, + * PY_MICRO_VERSION = 0 + * PY_RELEASE_LEVEL = 'alpha' = 0xa + * PY_RELEASE_SERIAL = 1 + * + * and 0*1000 + 10*10 + 1 = 101 + */ +#define FIELD3 101 + /* e.g., 2.1a2 * PY_VERSION comes from patchevel.h */ @@ -37,7 +57,6 @@ #if PY_RELEASE_SERIAL > 9 # error "PY_RELEASE_SERIAL > 9" #endif -#define FIELD3 (PY_MICRO_VERSION*1000 + PY_RELEASE_LEVEL*10 + PY_RELEASE_SERIAL) #define PYVERSION64 PY_MAJOR_VERSION, PY_MINOR_VERSION, FIELD3, PYTHON_API_VERSION // String Tables |