# HG changeset patch # User Steve Dower # Date 1416894950 28800 # Mon Nov 24 21:55:50 2014 -0800 # Branch Projects # Node ID f2554a7599ab30e8d13e91b49eebf15c5ca9d981 # Parent 85c8c8afbe0669b19b7c1b771769bf762f48c5ca Review feedback diff --git a/.gitignore b/.gitignore --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ Doc/tools/jinja2/ Doc/tools/pygments/ Doc/tools/sphinx/ +Lib/distutils/command/*.pdb Lib/lib2to3/*.pickle Lib/test/data/* Lib/_sysconfigdata.py diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -49,6 +49,7 @@ *.pyd *.cover *~ +Lib/distutils/command/*.pdb Lib/lib2to3/*.pickle Lib/test/data/* Misc/*.wpu diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -7,17 +7,6 @@ #include -#ifdef _MSC_VER -#if _MSC_VER >= 1900 -/* MSVC 14 redefines these names with a leading underscore, but they are - * otherwise identical. - */ -#define timezone _timezone -#define daylight _daylight -#define tzname _tzname -#endif -#endif - /* Differentiate between building the core module and building extension * modules. */ diff --git a/Modules/timemodule.c b/Modules/timemodule.c --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -30,15 +30,6 @@ #endif /* MS_WINDOWS */ #endif /* !__WATCOMC__ || __QNX__ */ -#if defined(_MSC_VER) && _MSC_VER >= 1900 -/* MSVC 14 redefines these names with a leading underscore, but they are -* otherwise identical. -*/ -#define timezone _timezone -#define daylight _daylight -#define tzname _tzname -#endif - /* Forward declarations */ static int floatsleep(double); static PyObject* floattime(_Py_clock_info_t *info); diff --git a/PC/pyconfig.h b/PC/pyconfig.h --- a/PC/pyconfig.h +++ b/PC/pyconfig.h @@ -213,6 +213,13 @@ #define hypot _hypot #endif +/* VS 2015 defines these names with a leading underscore */ +#if _MSC_VER >= 1900 && defined(Py_BUILD_CORE) +#define timezone _timezone +#define daylight _daylight +#define tzname _tzname +#endif + /* Side by Side assemblies supported in VS 2005 and VS 2008 but not 2010*/ #if _MSC_VER >= 1400 && _MSC_VER < 1600 #define HAVE_SXS 1 diff --git a/PCbuild/_tkinter.vcxproj b/PCbuild/_tkinter.vcxproj --- a/PCbuild/_tkinter.vcxproj +++ b/PCbuild/_tkinter.vcxproj @@ -80,9 +80,6 @@ {b5fd6f1d-129e-4bff-9340-03606fac7283} - - {c5a3e7fb-9695-4b2e-960b-1d9f43f1e555} - {7e85eccf-a72c-4da4-9e52-884508e80ba1} diff --git a/PCbuild/libeay.vcxproj b/PCbuild/libeay.vcxproj --- a/PCbuild/libeay.vcxproj +++ b/PCbuild/libeay.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -45,6 +45,8 @@ StaticLibrary + $(opensslDir)tmp32\libeay\ + $(opensslDir)tmp64\libeay\ @@ -398,8 +400,8 @@ + --> - diff --git a/PCbuild/make_buildinfo.c b/PCbuild/make_buildinfo.c deleted file mode 100644 --- a/PCbuild/make_buildinfo.c +++ /dev/null @@ -1,194 +0,0 @@ -#include -#include -#include -#include -#include - -#define CMD_SIZE 500 - -/* This file creates the getbuildinfo.o object, by first - invoking subwcrev.exe (if found), and then invoking cl.exe. - As a side effect, it might generate PCBuild\getbuildinfo2.c - also. If this isn't a subversion checkout, or subwcrev isn't - found, it compiles ..\\Modules\\getbuildinfo.c instead. - - Currently, subwcrev.exe is found from the registry entries - of TortoiseSVN. - - No attempt is made to place getbuildinfo.o into the proper - binary directory. This isn't necessary, as this tool is - invoked as a pre-link step for pythoncore, so that overwrites - any previous getbuildinfo.o. - - However, if a second argument is provided, this will be used - as a temporary directory where any getbuildinfo2.c and - getbuildinfo.o files are put. This is useful if multiple - configurations are being built in parallel, to avoid them - trampling each other's files. - -*/ - -int make_buildinfo2(const char *tmppath) -{ - struct _stat st; - HKEY hTortoise; - char command[CMD_SIZE+1]; - DWORD type, size; - if (_stat(".svn", &st) < 0) - return 0; - /* Allow suppression of subwcrev.exe invocation if a no_subwcrev file is present. */ - if (_stat("no_subwcrev", &st) == 0) - return 0; - if (RegOpenKey(HKEY_LOCAL_MACHINE, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS && - RegOpenKey(HKEY_CURRENT_USER, "Software\\TortoiseSVN", &hTortoise) != ERROR_SUCCESS) - /* Tortoise not installed */ - return 0; - command[0] = '"'; /* quote the path to the executable */ - size = sizeof(command) - 1; - if (RegQueryValueEx(hTortoise, "Directory", 0, &type, command+1, &size) != ERROR_SUCCESS || - type != REG_SZ) - /* Registry corrupted */ - return 0; - strcat_s(command, CMD_SIZE, "bin\\subwcrev.exe"); - if (_stat(command+1, &st) < 0) - /* subwcrev.exe not part of the release */ - return 0; - strcat_s(command, CMD_SIZE, "\" .. ..\\Modules\\getbuildinfo.c \""); - strcat_s(command, CMD_SIZE, tmppath); /* quoted tmppath */ - strcat_s(command, CMD_SIZE, "getbuildinfo2.c\""); - puts(command); fflush(stdout); - if (system(command) < 0) - return 0; - return 1; -} - -const char DELIMS[] = { " \n" }; - -int get_mercurial_info(char * hgbranch, char * hgtag, char * hgrev, int size) -{ - int result = 0; - char filename[CMD_SIZE]; - char cmdline[CMD_SIZE]; - - strcpy_s(filename, CMD_SIZE, "tmpXXXXXX"); - if (_mktemp_s(filename, CMD_SIZE) == 0) { - int rc; - - strcpy_s(cmdline, CMD_SIZE, "hg id -bit > "); - strcat_s(cmdline, CMD_SIZE, filename); - rc = system(cmdline); - if (rc == 0) { - FILE * fp; - - if (fopen_s(&fp, filename, "r") == 0) { - char * cp = fgets(cmdline, CMD_SIZE, fp); - - if (cp) { - char * context = NULL; - char * tp = strtok_s(cp, DELIMS, &context); - if (tp) { - strcpy_s(hgrev, size, tp); - tp = strtok_s(NULL, DELIMS, &context); - if (tp) { - strcpy_s(hgbranch, size, tp); - tp = strtok_s(NULL, DELIMS, &context); - if (tp) { - strcpy_s(hgtag, size, tp); - result = 1; - } - } - } - } - fclose(fp); - } - } - _unlink(filename); - } - return result; -} - -int main(int argc, char*argv[]) -{ - char command[CMD_SIZE] = "cl.exe -c -D_WIN32 -DUSE_DL_EXPORT -D_WINDOWS -DWIN32 -D_WINDLL "; - char tmppath[CMD_SIZE] = ""; - int do_unlink, result; - char *tmpdir = NULL; - if (argc <= 2 || argc > 3) { - fprintf(stderr, "make_buildinfo $(ConfigurationName) [tmpdir]\n"); - return EXIT_FAILURE; - } - if (strcmp(argv[1], "Release") == 0) { - strcat_s(command, CMD_SIZE, "-MD "); - } - else if (strcmp(argv[1], "Debug") == 0) { - strcat_s(command, CMD_SIZE, "-D_DEBUG -MDd "); - } - else if (strcmp(argv[1], "ReleaseItanium") == 0) { - strcat_s(command, CMD_SIZE, "-MD /USECL:MS_ITANIUM "); - } - else if (strcmp(argv[1], "ReleaseAMD64") == 0) { - strcat_s(command, CMD_SIZE, "-MD "); - strcat_s(command, CMD_SIZE, "-MD /USECL:MS_OPTERON "); - } - else { - fprintf(stderr, "unsupported configuration %s\n", argv[1]); - return EXIT_FAILURE; - } - if (argc > 2) { - tmpdir = argv[2]; - strcat_s(tmppath, _countof(tmppath), tmpdir); - /* Hack fix for bad command line: If the command is issued like this: - * $(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)" - * we will get a trailing quote because IntDir ends with a backslash that then - * escapes the final ". To simplify the life for developers, catch that problem - * here by cutting it off. - * The proper command line, btw is: - * $(SolutionDir)make_buildinfo.exe" Debug "$(IntDir)\" - * Hooray for command line parsing on windows. - */ - if (strlen(tmppath) > 0 && tmppath[strlen(tmppath)-1] == '"') - tmppath[strlen(tmppath)-1] = '\0'; - strcat_s(tmppath, _countof(tmppath), "\\"); - } - - if ((do_unlink = make_buildinfo2(tmppath))) { - strcat_s(command, CMD_SIZE, "\""); - strcat_s(command, CMD_SIZE, tmppath); - strcat_s(command, CMD_SIZE, "getbuildinfo2.c\" -DSUBWCREV "); - } - else { - char hgtag[CMD_SIZE]; - char hgbranch[CMD_SIZE]; - char hgrev[CMD_SIZE]; - - if (get_mercurial_info(hgbranch, hgtag, hgrev, CMD_SIZE)) { - strcat_s(command, CMD_SIZE, "-DHGBRANCH=\\\""); - strcat_s(command, CMD_SIZE, hgbranch); - strcat_s(command, CMD_SIZE, "\\\""); - - strcat_s(command, CMD_SIZE, " -DHGTAG=\\\""); - strcat_s(command, CMD_SIZE, hgtag); - strcat_s(command, CMD_SIZE, "\\\""); - - strcat_s(command, CMD_SIZE, " -DHGVERSION=\\\""); - strcat_s(command, CMD_SIZE, hgrev); - strcat_s(command, CMD_SIZE, "\\\" "); - } - strcat_s(command, CMD_SIZE, "..\\Modules\\getbuildinfo.c"); - } - strcat_s(command, CMD_SIZE, " -Fo\""); - strcat_s(command, CMD_SIZE, tmppath); - strcat_s(command, CMD_SIZE, "getbuildinfo.o\" -I..\\Include -I..\\PC"); - puts(command); fflush(stdout); - result = system(command); - if (do_unlink) { - command[0] = '\0'; - strcat_s(command, CMD_SIZE, "\""); - strcat_s(command, CMD_SIZE, tmppath); - strcat_s(command, CMD_SIZE, "getbuildinfo2.c\""); - _unlink(command); - } - if (result < 0) - return EXIT_FAILURE; - return 0; -} diff --git a/PCbuild/make_buildinfo.vcxproj b/PCbuild/make_buildinfo.vcxproj deleted file mode 100644 --- a/PCbuild/make_buildinfo.vcxproj +++ /dev/null @@ -1,70 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - PGInstrument - Win32 - - - PGInstrument - x64 - - - PGUpdate - Win32 - - - PGUpdate - x64 - - - Release - Win32 - - - Release - x64 - - - - {C73F0EC1-358B-4177-940F-0846AC8B04CD} - make_buildinfo - false - - - - - Application - NotSet - - - - - - - - - - - - _CONSOLE;%(PreprocessorDefinitions) - - - Console - - - - - - - - - \ No newline at end of file diff --git a/PCbuild/make_buildinfo.vcxproj.filters b/PCbuild/make_buildinfo.vcxproj.filters deleted file mode 100644 --- a/PCbuild/make_buildinfo.vcxproj.filters +++ /dev/null @@ -1,14 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx - - - - - Source Files - - - \ No newline at end of file diff --git a/PCbuild/pcbuild.sln b/PCbuild/pcbuild.sln --- a/PCbuild/pcbuild.sln +++ b/PCbuild/pcbuild.sln @@ -14,8 +14,6 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pythonw", "pythonw.vcxproj", "{F4229CC3-873C-49AE-9729-DD308ED4CD4A}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_buildinfo", "make_buildinfo.vcxproj", "{C73F0EC1-358B-4177-940F-0846AC8B04CD}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winsound", "winsound.vcxproj", "{28B5D777-DDF2-4B6B-B34F-31D938813856}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_decimal", "_decimal.vcxproj", "{0E9791DB-593A-465F-98BC-681011311617}" @@ -144,22 +142,6 @@ {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|Win32.Build.0 = Release|Win32 {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.ActiveCfg = Release|x64 {F4229CC3-873C-49AE-9729-DD308ED4CD4A}.Release|x64.Build.0 = Release|x64 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.ActiveCfg = Debug|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|Win32.Build.0 = Debug|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Debug|x64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGInstrument|x64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.PGUpdate|x64.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.ActiveCfg = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|Win32.Build.0 = Release|Win32 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.ActiveCfg = Release|x64 - {C73F0EC1-358B-4177-940F-0846AC8B04CD}.Release|x64.Build.0 = Release|x64 {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.ActiveCfg = Debug|Win32 {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|Win32.Build.0 = Debug|Win32 {28B5D777-DDF2-4B6B-B34F-31D938813856}.Debug|x64.ActiveCfg = Debug|x64 diff --git a/PCbuild/python.vcxproj b/PCbuild/python.vcxproj --- a/PCbuild/python.vcxproj +++ b/PCbuild/python.vcxproj @@ -84,4 +84,20 @@ + + + <_Content>@rem This script invokes the most recently built Python with all arguments +@rem passed through to the interpreter. This file is generated by the +@rem build process and any changes *will* be thrown away by the next +@rem rebuild. +@rem This is only meant as a convenience for developing CPython +@rem and using it outside of that context is ill-advised. +@echo Running $(Configuration)^^^|$(Platform) interpreter... +@"$(OutDir)python$(PyDebugExt).exe" %* + + <_ExistingContent Condition="Exists('$(PySourcePath)python.bat')">$([System.IO.File]::ReadAllText('$(PySourcePath)python.bat')) + + + + diff --git a/PCbuild/python3dll.vcxproj b/PCbuild/python3dll.vcxproj --- a/PCbuild/python3dll.vcxproj +++ b/PCbuild/python3dll.vcxproj @@ -70,7 +70,7 @@ DllMain - lib /def:"$(IntDir)python3stub.def" /out:"$(OutDir)$(TargetName)stub.lib" /MACHINE:$(_Machine) + lib /nologo /def:"$(IntDir)python3stub.def" /out:"$(OutDir)$(TargetName)stub.lib" /MACHINE:$(_Machine) Rebuilding $(TargetName)stub.lib $(OutDir)$(TargetName)stub.lib diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -70,16 +70,9 @@ _USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;%(PreprocessorDefinitions) - $(IntDir)getbuildinfo.o;ws2_32.lib;%(AdditionalDependencies) + ws2_32.lib;%(AdditionalDependencies) 0x1e000000 - - "$(OutDir)make_buildinfo$(PyDebugExt).exe" Debug "$(IntDir.TrimEnd(`\`))" - "$(OutDir)make_buildinfo$(PyDebugExt).exe" Release "$(IntDir.TrimEnd(`\`))" - Generate build information... - $(IntDir)getbuildinfo.o - false - @@ -396,13 +389,25 @@ - - - {c73f0ec1-358b-4177-940f-0846ac8b04cd} - false - - + + + + + + + + $([System.IO.File]::ReadAllText('$(IntDir)hgbranch.txt').Trim()) + $([System.IO.File]::ReadAllText('$(IntDir)hgversion.txt').Trim()) + $([System.IO.File]::ReadAllText('$(IntDir)hgtag.txt').Trim()) + + + + + HGVERSION="$(HgVersion)";HGTAG="$(HgTag)";HGBRANCH="$(HgBranch)";%(PreprocessorDefinitions) + + + \ No newline at end of file diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt --- a/PCbuild/readme.txt +++ b/PCbuild/readme.txt @@ -152,7 +152,7 @@ _freeze_importlib.exe, used to regenerate Python\importlib.h after changes have been made to Lib\importlib\_bootstrap.py bdist_wininst - ..\Lib\distutils\command\wininst-10.0[-amd64].exe, the base + ..\Lib\distutils\command\wininst-14.0[-amd64].exe, the base executable used by the distutils bdist_wininst command python3dll python3.dll, the PEP 384 Stable ABI dll @@ -319,7 +319,7 @@ Manager (View -> Other Windows -> Property Manager) but should be carefully modified by hand. -The property files used are (+-- = "also imports"): +The property files used are: * python (versions, directories and build names) * pyproject (base settings for all projects) * openssl (used by libeay and ssleay projects) diff --git a/PCbuild/ssleay.vcxproj b/PCbuild/ssleay.vcxproj --- a/PCbuild/ssleay.vcxproj +++ b/PCbuild/ssleay.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -45,6 +45,8 @@ StaticLibrary + $(opensslDir)tmp32\ssleay\ + $(opensslDir)tmp64\ssleay\ diff --git a/PCbuild/tcl.vcxproj b/PCbuild/tcl.vcxproj --- a/PCbuild/tcl.vcxproj +++ b/PCbuild/tcl.vcxproj @@ -71,15 +71,20 @@ :build set VCINSTALLDIR=$(VCInstallDir) cd /D "$(tclDir)win" -nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(TclVersions) $(DebugFlags) core shell dlls -nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(TclVersions) $(DebugFlags) install-binaries install-libraries +nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(DebugFlags) core shell dlls +nmake -f makefile.vc MACHINE=$(TclMachine) OPTS=$(TclOpts) $(TclDirs) $(DebugFlags) install-binaries install-libraries + + + + + - + \ No newline at end of file diff --git a/PCbuild/tcltk.props b/PCbuild/tcltk.props --- a/PCbuild/tcltk.props +++ b/PCbuild/tcltk.props @@ -5,15 +5,17 @@ 8 6 1 - 8 - 6 - 1 + 0 + $(TclMajorVersion) + $(TclMinorVersion) + $(TclPatchLevel) + $(TclRevision) 8 4 3 4 - $(ExternalsDir)tcl-$(TclMajorVersion).$(TclMinorVersion).$(TclPatchLevel).0\ - $(ExternalsDir)tk-$(TkMajorVersion).$(TkMinorVersion).$(TkPatchLevel).0\ + $(ExternalsDir)tcl-$(TclMajorVersion).$(TclMinorVersion).$(TclPatchLevel).$(TclRevision)\ + $(ExternalsDir)tk-$(TkMajorVersion).$(TkMinorVersion).$(TkPatchLevel).$(TkRevision)\ $(ExternalsDir)tix-$(TixMajorVersion).$(TixMinorVersion).$(TixPatchLevel).$(TixRevision)\ $(ExternalsDir)tcltk\ $(ExternalsDir)tcltk64\ diff --git a/PCbuild/tk.vcxproj b/PCbuild/tk.vcxproj --- a/PCbuild/tk.vcxproj +++ b/PCbuild/tk.vcxproj @@ -71,8 +71,8 @@ :build set VCINSTALLDIR=$(VCInstallDir) cd /D "$(tkDir)win" -nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs) $(TkVersions) $(DebugFlags) all -nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs) $(TkVersions) $(DebugFlags) install-binaries install-libraries +nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs) $(DebugFlags) all +nmake /nologo -f makefile.vc RC=rc MACHINE=$(TclMachine) OPTS=$(TkOpts) $(TkDirs) $(DebugFlags) install-binaries install-libraries @@ -83,9 +83,13 @@ + + + + - + \ No newline at end of file diff --git a/Tools/buildbot/build-amd64.bat b/Tools/buildbot/build-amd64.bat --- a/Tools/buildbot/build-amd64.bat +++ b/Tools/buildbot/build-amd64.bat @@ -1,7 +1,7 @@ @rem Used by the buildbot "compile" step. @rem Clean up -call "%~dp0clean.bat" x64 +call "%~dp0clean-amd64.bat" @rem If you need the buildbots to start fresh (such as when upgrading to @rem a new version of an external library, especially Tcl/Tk): diff --git a/Tools/ssl/sslspeed.vcxproj b/Tools/ssl/sslspeed.vcxproj --- a/Tools/ssl/sslspeed.vcxproj +++ b/Tools/ssl/sslspeed.vcxproj @@ -1,5 +1,5 @@  - + Debug