Issue 9912: Fail when vsvarsall.bat produces stderr (original) (raw)

Issue9912

Created on 2010-09-21 15:24 by flub, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
msvc9.diff flub,2010-09-21 15:24 review
msvc9_log.diff flub,2010-09-21 22:18 Log stderr rather then fail review
Messages (11)
msg117067 - (view) Author: Floris Bruynooghe (flub) Date: 2010-09-21 15:24
It would have saved me a lot of time if msvc9compiler would fail if executing the vsvarsall.bat file produced any output. The attached patch does this and fails when I try to compile from within a cygwin environment. I've also tested this from the normal windows command prompt and there buiding does succeed with this patch applied.
msg117082 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-09-21 16:49
A non-empty stderr does not mean that a command failed. For example, the Microsoft compiler "cl.exe" prints the version string to stderr.
msg117112 - (view) Author: Floris Bruynooghe (flub) Date: 2010-09-21 21:58
I'm aware of that but my limited testing showed that in this case that doesn't happen. However if this is considered too brittle to just plain fail as soon as there's stderr, how about using distutils' log facility to log the stderr at a reasonable level (warning?)? That way at least you'll be able to see something useful when you get a failure at a strange looking and far less meaningful traceback a few lines lower.
msg117115 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2010-09-21 22:01
yes, displaying the stderr content is a good idea.
msg117116 - (view) Author: Floris Bruynooghe (flub) Date: 2010-09-21 22:18
msvc9_log.diff does log stderr at warning level when it occurs.
msg119384 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-10-22 14:26
I’d replace “created stderr” with “printed on stderr”, but otherwise msvc9_log.diff looks good. distutils is feature-frozen, but I think any changes that help debugging are good. Tarek, do you agree?
msg119385 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2010-10-22 14:31
Éric Araujo wrote: > > Éric Araujo <merwok@netwok.org> added the comment: > > I’d replace “created stderr” with “printed on stderr”, but otherwise msvc9_log.diff looks good. > > distutils is feature-frozen, but I think any changes that help debugging are good. Tarek, do you agree? I hear you saying that a lot. Could you provide a reference to where this was decided ?
msg119386 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-10-22 14:35
Sure: http://tarekziade.wordpress.com/2010/03/03/the-fate-of-distutils-pycon-summit-packaging-sprint-detailed-report/ This resulted in the revert of pervasive changes in 3.2: #9088
msg221638 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-26 19:47
The patch is two extra lines that look fine to me, can somebody do a commit review please?
msg227790 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-09-29 10:11
Ping.
msg386293 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-02-03 18:16
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 you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools
History
Date User Action Args
2022-04-11 14:57:06 admin set github: 54121
2021-02-03 18:16:15 steve.dower set status: open -> closednosy: + steve.dowermessages: + resolution: out of datestage: patch review -> resolved
2019-04-26 20:37:45 BreamoreBoy set nosy: - BreamoreBoy
2014-09-29 10:11:42 BreamoreBoy set messages: +
2014-06-26 19:47:12 BreamoreBoy set versions: + Python 3.4, Python 3.5, - 3rd party, Python 3.2nosy: + dstufft, BreamoreBoymessages: + components: - Distutils2
2010-10-22 14:35:26 eric.araujo set messages: +
2010-10-22 14:31:43 lemburg set nosy: + lemburgmessages: +
2010-10-22 14:27:09 eric.araujo set nosy:amaury.forgeotdarc, flub, tarek, eric.araujostage: needs patch -> patch reviewcomponents: + Distutils2versions: + 3rd party, - Python 3.3
2010-10-22 14:26:26 eric.araujo set messages: +
2010-09-21 22🔞17 flub set files: + msvc9_log.diffmessages: +
2010-09-21 22:01:43 amaury.forgeotdarc set messages: + stage: needs patch
2010-09-21 21:58:58 flub set messages: +
2010-09-21 16:49:31 amaury.forgeotdarc set nosy: + amaury.forgeotdarcmessages: +
2010-09-21 15:24:35 flub create