Skip to content
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

Improve Visual C++ 14.X support #1811

Merged
merged 1 commit into from Oct 27, 2019

Conversation

@JGoutin
Copy link
Contributor

JGoutin commented Aug 3, 2019

Summary of changes

  • Improve VC++14 support for VS 2017 and 2019.
  • Separate VC from VS version (Miss match starting VS15).
  • Improve docstrings args and returns information + fixe typos.
  • Fix coding style and minor coding issues.
  • Remove Microsoft "Windows SDK 7.0" dead link.

Tested on Windows 10 with Python 3.7.4 and "Visual Studio Build Tools 2019" with following setup cases:

  • VC++14.2 (VS 2019)
  • VC++14.1 (VS 2017)
  • VC++14.0 (VS 2015)

This setuptools file cover a wide variety of VS configurations that I cannot test easily. So any code review and other tests are really welcome.

There is no automated tests for this. This setuptools part did not really had tests before this PR, and it may be very hard to do real relevant automated tests for it.

Pull Request Checklist

  • Changes have tests
  • News fragment added in changelog.d. See documentation for details
Improve VC++14 support for VS 2017 and 2019.
Separate VC from VS version (Miss match starting VS15).
Improve docstrings args and returns information + fixe typos.
Fix coding style and minor coding issues.
Remove Microsoft "Windows SDK 7.0" dead link.
@JGoutin

This comment has been minimized.

Copy link
Contributor Author

JGoutin commented Sep 9, 2019

Concerning the evolution of this file (msvc.py):

The majority of the code was written to support some VC9 & VC10 old compilers that does not really had a vcvarsall.bat or had a messed up one. It was also done to add support for some early VC14 standalone compilers:

  • Since Python 3.4 is deprecated, the VC10 part is deprecated.
  • Once Python 2.7 is deprecated in setuptools, the VC9 part can also be deprecated.
  • Recent versions on Python does not need the VC14 fix. Only Python 3.5 will require help to detect VC 2017 or 2019 vcvarsall.bat.

So, in the end of this year, this file can be easily simplified to remove almost all its content and only keep a Python 3.5/VC compat part that will be kept until Python 3.5 deprecation.

@jaraco
jaraco approved these changes Oct 27, 2019
@jaraco jaraco merged commit 230d1f7 into pypa:master Oct 27, 2019
4 of 6 checks passed
4 of 6 checks passed
codecov/patch 51.36% of diff hit (target 84.71%)
Details
codecov/project 84.61% (-0.11%) compared to 5b128e8
Details
Summary 1 potential rule
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
@jaraco

This comment has been minimized.

Copy link
Member

jaraco commented Oct 27, 2019

Thanks for putting this together.

@jgsogo

This comment has been minimized.

Copy link

jgsogo commented Oct 28, 2019

Hi! There is a change in this PR that breaks Python 2: https://github.com/pypa/setuptools/pull/1811/files#diff-ebddaa1b649ef567c2534a012ba25913R627

with open(state_path, 'rt', encoding='utf-8') as state_file:

That encoding argument is only available for py3

Is it intentional?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.