[Python-checkins] python/dist/src/PC python_nt.rc,1.18,1.19

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Fri, 11 Oct 2002 11:25:54 -0700


Update of /cvsroot/python/python/dist/src/PC
In directory usw-pr-cvs1:/tmp/cvs-serv29153/python/PC

Modified Files:
	python_nt.rc 
Log Message:
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.


Index: python_nt.rc
===================================================================
RCS file: /cvsroot/python/python/dist/src/PC/python_nt.rc,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** python_nt.rc	11 Oct 2002 17:51:44 -0000	1.18
--- python_nt.rc	11 Oct 2002 18:25:52 -0000	1.19
***************
*** 20,26 ****
  
  /* Nothing below this should need to be changed except for copyright
!  * notices and company name.
   */
  
  /* e.g., 2.1a2
   * PY_VERSION comes from patchevel.h
--- 20,46 ----
  
  /* Nothing below this should need to be changed except for copyright
!  * 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
***************
*** 38,42 ****
  #   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
  
--- 58,61 ----