--distutils changes the log output level with a module called distutils.log
. Since distutils is used from setup.py, command line arguments etc. are included in setuptools and cannot be controlled by the user. But changing this log level doesn't seem easy
--pip is running setup.py egg_info
with no optional arguments, in which the build runs and stops here if there is a problem. The log level cannot be changed because it is executed without arguments. egg_info seems to do something different from build, but it may be that the setup.py is badly written to stop here.
――After a lot of research, I found that the cython installation problem caused the build to run on egg_info because I forcibly tampered with the finalize_option of build_ext. The cython problem is deep-rooted ...
--setup.py install -vvv allows you to pass arguments for the install command. However, in reality, setuptools is executing the easy_install command inside, and the -vvv argument (verbose = 3) is not passed here. Therefore, the log level cannot be changed. By the way, this argument is parsed in setuptools and converted to {'verbose': 3}
. However, 3 is ʻint --If you add the global item to the setup.cfg file, setup.py will read it and add the arguments. However, if you specify
verbose = 3,
3` is treated as a string internally, and you cannot change the log level without getting caught in the if statement.
--setup.py -vvv You can actually change the log level by installing. The option specified before the command name is called global-option and is added to all setuptools commands. Therefore, this argument is also passed to easy_install, so you can change the log level. By the way, pip's global-option seems to support this, but as mentioned above, this argument is not passed to egg_info.
Recommended Posts