[issue26689] Add `has_flag` method to `distutils.CCompiler`

2021-02-03 Thread Steve Dower
Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-08-19 Thread Ned Deily
Ned Deily added the comment: https://mail.python.org/pipermail/distutils-sig/2016-August/029469.html -- ___ Python tracker ___

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-08-19 Thread Ned Deily
Ned Deily added the comment: "I posted a couple of messages on distutils-sig and got little attention." OK, for future reference, the start of the discussion was here: https://mail.python.org/pipermail/distutils-sig/2016-May/029010.html It looks like the first item, the one relative to this

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-08-19 Thread Sylvain Corlay
Sylvain Corlay added the comment: Thanks Ned. I posted a couple of messages on distutils-sig and got little attention. I think that this feature is very important for detecting whether a compiler supports a certain flag like `-std=c++11` and provide a meaningful error when needed. CMake has

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-08-19 Thread Ned Deily
Ned Deily added the comment: Sylvain, have you brought this feature request up on the Distutils mailing list? The PyPA there is responsible for packaging features. One big issue with adding new features to Distutils is the backwards-compatibility tradeoff: many third-party package authors

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-08-19 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berker.peksag stage: commit review -> patch review versions: -Python 2.7 ___ Python tracker

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-08-18 Thread Sylvain Corlay
Sylvain Corlay added the comment: Any chance to get this in for 3.6? -- ___ Python tracker ___ ___

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-05-08 Thread James Tatum
James Tatum added the comment: FYI, NamedTemporaryFile doesn't work well with Windows. There are a handful of issues about it. -- nosy: +James.Tatum ___ Python tracker

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-21 Thread Sylvain Corlay
Sylvain Corlay added the comment: Hey, any blocker to getting this in? -- ___ Python tracker ___ ___

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-06 Thread SilentGhost
Changes by SilentGhost : -- status: pending -> open ___ Python tracker ___ ___

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-06 Thread SilentGhost
SilentGhost added the comment: I'm largely fine with it, bar the in-function import. It would also be good if you could verify that no other temporary files are left after the function is run. As I said earlier, issue 25544 should have priority and it should get a refreshed patch soon.

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-05 Thread Sylvain Corlay
Sylvain Corlay added the comment: Are you fine with the new state of the patch? -- ___ Python tracker ___ ___

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-04 Thread Sylvain Corlay
Sylvain Corlay added the comment: A new version of the patch using `NamedTemporaryFile` instead a the regular fdopen. -- Added file: http://bugs.python.org/file42367/has_flag.diff ___ Python tracker

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-04 Thread SilentGhost
SilentGhost added the comment: I guess it would make sense to depend on issue25544 and implement the has_flag with minrk's patch in mind. I guess his patch didn't get a second look because it didn't apply cleanly. In any case, for implementing has_flag using current best practice is what I'd

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-04 Thread Sylvain Corlay
Sylvain Corlay added the comment: @minrk submitted http://bugs.python.org/file40933/0001-cleanup-temporary-files-in-ccompiler.has_function.patch doing what you describe for `has_function`. I don't know much about the process to contribute to cpython. I would be glad to open a "PR"

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-04 Thread SilentGhost
SilentGhost added the comment: I understand that you're copying approach of has_function, but shouldn't you remove this temporary file at the end of the function? Perhaps using tempfile.NamedTemporaryFile would be a better solution (both in has_flag and has_function). Also import can be moved

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-03 Thread Sylvain Corlay
Sylvain Corlay added the comment: New version of the patch using the context manager. -- Added file: http://bugs.python.org/file42363/has_flag.diff ___ Python tracker

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-03 Thread SilentGhost
SilentGhost added the comment: I've left a comment on Rietveld -- nosy: +SilentGhost ___ Python tracker ___

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-03 Thread SilentGhost
Changes by SilentGhost : -- stage: -> patch review versions: -Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-02 Thread Sylvain Corlay
Sylvain Corlay added the comment: I attached a patch for ccompiler.py adding the new `has_flag` method. -- keywords: +patch Added file: http://bugs.python.org/file42358/has_flag.diff ___ Python tracker

[issue26689] Add `has_flag` method to `distutils.CCompiler`

2016-04-02 Thread Sylvain Corlay
New submission from Sylvain Corlay: I would be very useful to have a `has_flag` method in `distutils.CCompiler` similar to `has_function`, allowing to check if the compiler supports certain flags. Cmake has a `CHECK_CXX_COMPILER_FLAG` macro for that purpose, which checks if a simple C++ file