Bug 1239 - configure fails to find python distutils if python prints warning
configure fails to find python distutils if python prints warning
Status: RESOLVED FIXED
Product: unbound
Classification: Unclassified
Component: server
1.6.1
x86_64 Linux
: P5 minor
Assigned To: unbound team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-22 20:13 CET by Petr Menšík
Modified: 2017-03-23 11:24 CET (History)
2 users (show)

See Also:


Attachments
patch to test return value instead of empty output (1.29 KB, patch)
2017-03-22 20:13 CET, Petr Menšík
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Menšík 2017-03-22 20:13:54 CET
Created attachment 388 [details]
patch to test return value instead of empty output

In current Fedora rawhide, python3 now prints warning if LC_ALL=C.
It makes configure script to fail with python3.

$ LC_ALL=C python3 -c "import distutils"

Produces this output to stderr:

Python detected LC_CTYPE=C: LC_ALL & LANG coerced to C.UTF-8 (set another locale or PYTHONCOERCECLOCALE=0 to disable this locale coercion behaviour).

Because distutils detection uses not-empty output detection, it fails to pass configure on rawhide. It prevents package to compile from mockbuild.

I am attaching proposed patch that will pass distutils test even with python printing a harmless warning.
Comment 1 Wouter Wijngaards 2017-03-23 11:24:38 CET
Hi Petr,

Thank you for the patch.  I have committed it.

Best regards, Wouter