[New-bugs-announce] [issue25759] Python 2.7.11rc1 not building with Visual Studio 2015

Kovid Goyal report at bugs.python.org
Sat Nov 28 15:10:41 EST 2015


New submission from Kovid Goyal:

The Pcbuild/readme.txt file implies that it is possible to build python 2.7.11rc1 with Visual Studio 2015 (although it is not officially supported). However, there are at least a couple of problems, that I have encountered so far:

1) timemodule.c uses timezone, tzname and daylight which are no longer defined in visual studio, as a quick hackish workaround, one can do
#if defined _MSC_VER && MSC_VER >= 1900
#define timezone _timezone
#define tzname _tzname
#define daylight _daylight
#endif

2) More serious, the code in posixmodule.c to check if file descriptors are valid no longer links, since it relies on an internal structure from microsoft ddls, __pioinfo that no longer exists. See
https://bugs.python.org/issue23524 for discussion about this in the python 3.x branch

As a quick and dirty fix one could just replace _PyVerify_fd with a stub implementation that does nothing for _MSC_VER >= 1900

However, a proper fix should probably be made.

----------
components: Interpreter Core
messages: 255550
nosy: kovidgoyal
priority: normal
severity: normal
status: open
title: Python 2.7.11rc1 not building with Visual Studio 2015
type: compile error
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25759>
_______________________________________


More information about the New-bugs-announce mailing list