I was looking at bug #1411545, and it turns out the problem is caused by gobject-introspection using distutils: https://git.gnome.org/browse/gobject-introspection/tree/giscanner/ccompiler.py#n74 A self-contained test case would be import distutils from distutils.unixccompiler import UnixCCompiler compiler = distutils.ccompiler.new_compiler(compiler="unix") distutils.sysconfig.customize_compiler(compiler) print(compiler.compiler) What happens is that when asking distutils for the compiler/flags to use, we get back the flags which were used when the python interpreter was built. On my fedora 26, the test above returns ['gcc', '-pthread', '-fno-strict-aliasing', '-O2', '-g', '-pipe', '-Wall', '-Werror=format-security', '-Wp,-D_FORTIFY_SOURCE=2', '-fexceptions', '-fstack-protector-strong', '--param=ssp-buffer-size=4', '-grecord-gcc-switches', '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1', '-m64', '-mtune=generic', '-D_GNU_SOURCE', '-fPIC', '-fwrapv', '-DNDEBUG', '-O2', '-g', '-pipe', '-Wall', '-Werror=format-security', '-Wp,-D_FORTIFY_SOURCE=2', '-fexceptions', '-fstack-protector-strong', '--param=ssp-buffer-size=4', '-grecord-gcc-switches', '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1', '-m64', '-mtune=generic', '-D_GNU_SOURCE', '-fPIC', '-fwrapv'] This data comes from /usr/lib64/python3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py which was generated at compile-time What this all means is that when using distutils to build some C code, redhat-rpm-config has to be installed, but this is not reflected in the rpm Requires:. Without this, the user will get build failures. I see 2 ways of avoiding this: - add a Requires: redhat-rpm-config to system-python-libs - sanitize the content of /usr/lib64/python3.6/_sysconfigdata_m_linux_x86_64-linux-gnu.py so that the flags returned do not require redhat-rpm-config.
I initially spotted that problem trying to do a clean developer build of spice-gtk on a freshly installed Fedora 26. Doing a `dnf builddep spice-gtk`, my build failed with a rather unfriendly "Error 1" with a complaint about redhat-hardened-cc1, which Christophe Fergeau traced to the problem above.
The general idea was that to build Python extension modules, the user needs python3-devel package. So I believe the requires should be there. (And honestly, I thought it was there.)
Oh, see https://bugzilla.redhat.com/show_bug.cgi?id=1217376
Pull request: https://src.fedoraproject.org/rpms/python3/pull-request/15
python3-3.6.2-19.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-33a9e5cea4
python3-3.6.2-8.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f99c2b1427
python3-3.6.2-8.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-f99c2b1427
python3-3.6.2-19.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-33a9e5cea4
python3-3.6.3-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-7a3ba3230f
python3-3.6.3-1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-7a3ba3230f
python3-3.6.2-8.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.
python3-3.6.3-2.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-a20cf0e9b8
python3-3.6.3-2.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.