On the proposed ccompiler.has_flag method
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
There is an ongoing discussion that was triggered by a proposed patch to distutils.
-
The patch consists in adding a new
has_flagfunction to distutils' ccompiler, aside ofhas_functionto detect whether the compiler supports certain compilation flag. It is similar to cmake'sCHECK_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:
- About the proposed feature: https://mail.python.org/pipermail/distutils-sig/2016-August/029469.html
- 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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the proposed patch to distutils.ccompiler and the two linked distutils-sig discussion threads, since the issue does not name a repository file or test. Done means reaching a decision on the distutils change and, if accepted, adding the has_flag capability with the optional setuptools compatibility path described here.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100