Skip to content

[BUG] Problems when building cython with mingw64 and msc_ver == '1800' #2898

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

Closed
1 task done
jon-marks opened this issue Nov 20, 2021 · 3 comments
Closed
1 task done
Labels
bug Needs Triage Issues that need to be evaluated for severity and status. Waiting User Feedback

Comments

@jon-marks
Copy link

setuptools version

59.2.0

Python version

3.9

OS

Win 10

Additional environment information

No response

Description

Hi Folks.
Just got cython working on Windows10 using MinGW-w64 Compiler from WinLibs. There were a couple of patches I needed to make to distutils to get things to work. I thought you may want to know about this.

[aside]. On a philosophical note, I am perplexed that the larger Python community, who is so supportive of open source, resort to using MSVC for building their Windows targets. I'll get off my soapbox now.

As you will see below, my patches are a Q&D hack to get things to work without a deeper knowledge and philosophy behind setuptool's project. I'd encourage an updating of these scripts to recent versions of the tools.

See attached, as it gets formatted incorrectly by this entry form.
abc.txt

Expected behavior

N/A

How to Reproduce

N/A

Output

N/A

Code of Conduct

  • I agree to follow the PSF Code of Conduct
@jon-marks jon-marks added bug Needs Triage Issues that need to be evaluated for severity and status. labels Nov 20, 2021
@abravalheri
Copy link
Contributor

Thank you very much @jon-marks for reporting this issue 😄

This seems to be related to an old version of distutils being used... I had a quick look on pypa/distutils and it seems that some of the items described in your patch were already applied.

Since the latest version of setuptools will try to use a more modern (vendored) version of distutils by default (instead of relying on the outdated version distutils that comes in the stdlib), I believe this problem is already solved.

Would you mind to check again with the latest version of setuptools?

If the problem persists the best would be opening a new issue in pypa/distutils (the bug has to be fixed there first so we can update the vendored code here on setuptools).

@abravalheri abravalheri changed the title [BUG] [BUG] Problems when building cython with mingw64 and msc_ver == '1800' Jan 5, 2022
@imba-tjd
Copy link
Contributor

The MS_WIN64 needs to be defined in CPython. See python/cpython#19326
Or you can define it by yourself.
msc_ver() has been updated. dllwrap has been removed.
This can be closed.

@abravalheri
Copy link
Contributor

Hi @jon-marks, as imba-tjdhas previously mentioned this issue seems to be related to some changes in CPython itself (+ some of the patches have already been added to distutils). So I think I will go ahead and close this issue, but please let us know if there is still any action point from the perspective of setuptools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Needs Triage Issues that need to be evaluated for severity and status. Waiting User Feedback
Projects
None yet
Development

No branches or pull requests

3 participants