Skip to content

Commit 909bc1c

Browse files
committed
SF bug #131225: sys.winver is still '2.0' in python 2.1a2.
SF patch #103683: Alternative dll version resources. Changes similar to the patch. MarkH should review. File version and Product version text strings now 2.1a2. 64-bit file and product version numbers are now PY_MAJOR_VERSION, PY_MINOR_VERSION, messy, PYTHON_API_VERSION where messy = PY_MICRO_VERSION*1000 + PY_RELEASE_LEVEL*10 + PY_RELEASE_SERIAL Updated company name to "Digital Creations 2". Copyright now lists Guido; "C in a circle" symbol used instead of (C). Comments added so this is less likely to get flubbed again, and #if/#error guys added to trigger if the version number manipulations above overflow.
1 parent b9c24fb commit 909bc1c

File tree

2 files changed

+34
-11
lines changed

2 files changed

+34
-11
lines changed

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ Nadav Horesh
179179
Ken Howard
180180
Brad Howes
181181
Chih-Hao Huang
182+
Lawrence Hudson
182183
Michael Hudson
183184
Jim Hugunin
184185
Greg Humphreys

PC/python_nt.rc

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,42 @@
88
#include "modsupport.h"
99
#include "patchlevel.h"
1010

11-
#define MS_DLL_ID "2.0"
12-
13-
#define PYTHON_VERSION MS_DLL_ID "." PYTHON_API_STRING "\0"
11+
/* Across releases, change:
12+
* MS_DLL_ID if the minor version number changes.
13+
* PYTHON_DLL_NAME ditto.
14+
*/
15+
#define MS_DLL_ID "2.1"
1416

1517
#ifndef PYTHON_DLL_NAME
16-
#define PYTHON_DLL_NAME "Python21.dll"
18+
#define PYTHON_DLL_NAME "python21.dll"
1719
#endif
1820

21+
/* Nothing below this should need to be changed except for copyright
22+
* notices and company name.
23+
*/
24+
25+
/* e.g., 2.1a2
26+
* PY_VERSION comes from patchevel.h
27+
*/
28+
#define PYTHON_VERSION PY_VERSION "\0"
29+
30+
/* 64-bit version number as comma-separated list of 4 16-bit ints */
31+
#if PY_MICRO_VERSION > 64
32+
# error "PY_MICRO_VERSION > 64"
33+
#endif
34+
#if PY_RELEASE_LEVEL > 99
35+
# error "PY_RELEASE_LEVEL > 99"
36+
#endif
37+
#if PY_RELEASE_SERIAL > 9
38+
# error "PY_RELEASE_SERIAL > 9"
39+
#endif
40+
#define FIELD3 (PY_MICRO_VERSION*1000 + PY_RELEASE_LEVEL*10 + PY_RELEASE_SERIAL)
41+
#define PYVERSION64 PY_MAJOR_VERSION, PY_MINOR_VERSION, FIELD3, PYTHON_API_VERSION
42+
1943
// String Tables
2044
STRINGTABLE DISCARDABLE
2145
BEGIN
22-
1000, MS_DLL_ID
46+
1000, MS_DLL_ID
2347
END
2448

2549
/////////////////////////////////////////////////////////////////////////////
@@ -28,8 +52,8 @@ END
2852
//
2953

3054
VS_VERSION_INFO VERSIONINFO
31-
FILEVERSION 1,6,0,0
32-
PRODUCTVERSION 1,6,0,0
55+
FILEVERSION PYVERSION64
56+
PRODUCTVERSION PYVERSION64
3357
FILEFLAGSMASK 0x3fL
3458
#ifdef _DEBUG
3559
FILEFLAGS 0x1L
@@ -44,11 +68,11 @@ BEGIN
4468
BEGIN
4569
BLOCK "000004b0"
4670
BEGIN
47-
VALUE "CompanyName", "BeOpen.com\0"
71+
VALUE "CompanyName", "Digital Creations 2\0"
4872
VALUE "FileDescription", "Python Core\0"
4973
VALUE "FileVersion", PYTHON_VERSION
5074
VALUE "InternalName", "Python DLL\0"
51-
VALUE "LegalCopyright", "Copyright (c) 2000 BeOpen.com. Copyright (c) 1995-2000 CNRI. Copyright (c) 1990-1995 SMC.\0"
75+
VALUE "LegalCopyright", "Copyright 2000, 2001 Guido van Rossum. Copyright � 2000 BeOpen.com. Copyright 1995-2000 CNRI. Copyright � 1991-1995 SMC.\0"
5276
VALUE "OriginalFilename", PYTHON_DLL_NAME "\0"
5377
VALUE "ProductName", "Python\0"
5478
VALUE "ProductVersion", PYTHON_VERSION
@@ -59,5 +83,3 @@ BEGIN
5983
VALUE "Translation", 0x0, 1200
6084
END
6185
END
62-
63-
/////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)