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

On the proposed ccompiler.has_flag method #771

Open
Tracked by #215
SylvainCorlay opened this issue Sep 4, 2016 · 1 comment
Open
Tracked by #215

On the proposed ccompiler.has_flag method #771

SylvainCorlay opened this issue Sep 4, 2016 · 1 comment
Labels
Needs Triage Issues that need to be evaluated for severity and status.

Comments

@SylvainCorlay
Copy link

There is an ongoing discussion that was triggered by a proposed patch to distutils.

  • The patch consists in adding a new has_flag function to distutils' ccompiler, aside of has_function to detect whether the compiler supports certain compilation flag. It is similar to cmake's CHECK_CXX_COMPILER_FLAG.

    Detecting whether a compiler support such a flag is crucial for extension authors who need e.g. C++11 support in their code, so as to be able to output meaningful error messages when not available, or to use such a flag optionally when it improves performance. This becomes crucial since we have new flavors of the C++ programming language every 3 years (C++11/14/17).

  • This is obviously a backward compatible change since it is a new method, although it triggered a discussion on whether one should allow incremental improvements to distutils.

    Here are links to the top-most messages of two threads:

    1. About the proposed feature: https://mail.python.org/pipermail/distutils-sig/2016-August/029469.html
    2. What is the official position on distutils: https://mail.python.org/pipermail/distutils-sig/2016-August/029595.html

My proposal is the following:

  • add the patch to distutils.ccompiler. Incremental improvement is good! More reasons to adopt more recent python versions.
  • optionally add it to ccompiler via setuptools for earlier versions of python.

ping @jaraco

@jaraco
Copy link
Member

jaraco commented Sep 4, 2016

I have no objections, and my opinion is that if someone is willing to propose the changes via a pull request and address the ramifications of those changes to stability, it will be accepted.

@pganssle pganssle added the Needs Triage Issues that need to be evaluated for severity and status. label Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Triage Issues that need to be evaluated for severity and status.
Projects
None yet
Development

No branches or pull requests

3 participants