classification
Title: Spurious warning when compiling extension module
Type: behavior Stage: resolved
Components: Distutils Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: dstufft, eric.araujo, pitrou, steve.dower
Priority: normal Keywords:

Created on 2015-10-12 17:35 by pitrou, last changed 2021-02-03 18:26 by steve.dower. This issue is now closed.

Messages (5)
msg252875 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2015-10-12 17:35
I'm under Linux, but get the following warning when compiling an extension module.  This only happens with 3.5+.

$ python setup.py build_ext --inplace 
running build_ext
building 'numba._helperlib' extension
C compiler: gcc -pthread -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC

compile options: '-I/home/antoine/35/lib/python3.5/site-packages/numpy/core/include -I/home/antoine/35/include/python3.5m -c'
Warning: Can't read registry to find the necessary compiler setting
Make sure that Python modules winreg, win32api or win32con are installed.
gcc: numba/_helpermod.c
[...]
msg252941 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-10-13 17:07
This should be fixed in numpy.distutils. The warning exists in distutils.msvccompiler, which is deprecated and only remains in case people were importing it directly (the only reference in the stdlib is the test suite).
msg252943 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2015-10-13 17:37
Do you have a reference or changeset to point to, so that the Numpy developers can understand easily what the issue is?
msg252952 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-10-13 18:44
Issue #23970 added the new compiler class, but all that really changed is that the module name is now distutils._msvccompiler. You *still* shouldn't access it except through distutils.ccompiler.new_compiler(compiler='msvc'), which is how it always was.

I can't point to exactly where in numpy the issue is, but I'd guess it looks a lot like "import distutils.msvccompiler"
msg386379 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2021-02-03 18:26
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
2021-02-03 18:26:20steve.dowersetstatus: open -> closed
resolution: out of date
messages: + msg386379

stage: resolved
2015-10-13 18:44:08steve.dowersetmessages: + msg252952
2015-10-13 17:37:28pitrousetmessages: + msg252943
2015-10-13 17:07:31steve.dowersetmessages: + msg252941
2015-10-12 17:35:17pitroucreate