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

Add support for MSVC 14.X to cygwinccompiler #14

Closed
andrasm62 opened this issue Sep 2, 2020 · 6 comments
Closed

Add support for MSVC 14.X to cygwinccompiler #14

andrasm62 opened this issue Sep 2, 2020 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@andrasm62
Copy link

We are using mingw32 on Windows and we got this error message:

File "C:\Users\ANDRAS~1.MEN\AppData\Local\Temp\pip-build-env-vbdit7j6\overlay\Lib\site-packages\setuptools\_distutils\cygwinccompiler.py", line 84, in get_msvcr
raise ValueError("Unknown MS Compiler version %s " % msc_ver)
ValueError: Unknown MS Compiler version 1916

Adding the MSVC 14.X compilers to the conditions would solve the problem.

We also use Anaconda. It seems like they know about this and they have inserted a hack into their distutils package. If we force to use Anaconda's distutils instead of setuptools/_distutils, we don't get this error and we can compile C codes.

Could you update this file? I saw that setuptools seems to support MSVC 14.X versions, and probably this file wasn't updated because the code coverage is 0%, because it is used just in a very special situation.

@jaraco
Copy link
Member

jaraco commented Sep 5, 2020

I'll move this to the pypa/distutils project. I'd need someone to volunteer to help integrate the support. In the meantime, setting SETUPTOOLS_USE_DISTUTILS=stdlib will bypass the vendored copy as a workaround.

@jaraco jaraco transferred this issue from pypa/setuptools Sep 5, 2020
@andrasm62
Copy link
Author

Thank you!

I think adding the missing MSVC versions from the supported WindowsCompilers from the Python Wiki to the elif conditions will solve the probleme.

@jaraco
Copy link
Member

jaraco commented Sep 13, 2020

Thanks for providing that reference. That document indicates that Setuptools is required.

Do you know where Anaconda maintains those patches? Are they open source? Can they be incorporated here? Would you be willing to drive this effort and develop/solicit a patch to add MSVC 14 support to distutils?

@jaraco jaraco changed the title Missing MSVC 14.X support in _distutils/cygwinccompiler.py Add support for MSVC 14.X to cygwinccompiler Sep 13, 2020
@andrasm62
Copy link
Author

andrasm62 commented Sep 14, 2020

After a little research I found where the patches are: https://github.com/conda-forge/python-feedstock/tree/master/recipe/patches

The actual patch for distutils is a bit dirty I think, it uses a >= operator for the msc_ver variable.
Yes, I can do a patch.

Can you help me with the steps of doing a patch? First I need to fork the project, do the changes onto a new branch, but do I need to write or run a test also?

@jaraco
Copy link
Member

jaraco commented Dec 24, 2020

Sorry for the delayed response.

do I need to write or run a test also?

Ideally, yes. See the test_cygwincompiler for the existing tests. This project does enable running the tests with tox.

It sounds like you may be a little new to this project, so at the risk of dissuading, your best next step may be to find a mentor or partner, someone more familiar with Python development and particularly with Anaconda and Cygwin development, to assist with the effort, as I'll likely not have the bandwidth or knowledge to help effectively.

@jaraco jaraco added the help wanted Extra attention is needed label Dec 12, 2021
@isuruf
Copy link
Contributor

isuruf commented Dec 12, 2021

Fixed in #41

@jaraco jaraco closed this as completed Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants