-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
[2.7] bpo-30342: Fix sysconfig.is_python_build() on VS9.0 #1544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Lib/sysconfig.py
Outdated
# PC/VS9.0/amd64 | ||
if (os.name == "nt" | ||
and os.path.basename(os.path.dirname(os.path.dirname(_PROJECT_BASE))).lower() == "pc" | ||
and os.path.basename(os.path.dirname(_PROJECT_BASE)).lower().startswith("vs")): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about the .startswith("vs") part, maybe I should replace it with == "vs9.0". What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not indent it under the previous check and just do "\\pc\\vs9.0" in _PROJECT_BASE[-10:].lower()
(double check that, but I'm assuming the previous condition is okay).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to do exactly that, but it's wrong :-) It seems like VS7.1 used python(d_).exe in PC/VS7.1/python(_d).exe, whereas VS 9.0 uses python(_d).exe in PC/VS9.0/{amd64,x86}/python(_d).exe: one more subdirectory!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. This is fine then - I have very little interest in doing much work to support the old build files (as they are explicitly unsupported).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"I have very little interest in doing much work to support the old build files (as they are explicitly unsupported)."
Wait wait wait... I fail to follow progress on the Windows build system, so I rely on the devguide which I expect to be up to date, and the guide says:
https://docs.python.org/devguide/setup.html#windows-compiling
"Python 2.7 uses Microsoft Visual Studio 2008, which is most easily obtained through an MSDN subscription."
I have a MSDN account, but after 30 min, I failed to get my MSDN number and I don't know my subscription is still valid or not (well, I guess that, it's expired). It took me 1 hour to find an old ISO of Visual Studio 2008, and not from microsoft.com :-(
I didn't want to install VS 2008, but I just followed the devguide.
... Do you mean that VS 2010 must now be used and the devguide is just outdated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, moreover: we do have a buildbot using VS 2008. I'm now trying to fix all buildbots, so I had to fix issues on this VS 2008 buildbot too: http://bugs.python.org/issue30313
But I guess that it's ok to have a buildbot on a system not officially fully supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created http://bugs.python.org/issue30350 to discuss the devguide.
cc @jkloth |
Fix sysconfig.is_python_build() if Python is built with Visual Studio 2008 (VS 9.0).
I replaced .startswith("vs") with == "vs9.0" to only modify the behaviour on VS 2008 since I'm unable to test older VS versions. I only care of VS 2008. |
Fix sysconfig.is_python_build() if Python is built with Visual Studio 2008 (VS 9.0).