Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get error log of a disutils setup in Python?

I am new to Python. I have created some C/C++ extensions for Python and able to build those with the help of Python disutils setup script. But, I have to integrate this setup script to an existing build system. So, I wrote another script to call this setup script using run_setup() method.

distributionObj = run_setup("setup.py",["build_ext"])

Now, I want if any error occurs during the building of extension (Compiler, Linker or anything), I must be able to get the information along with the error string from the caller script to notify the build process.

Please provide me some suggestion.

like image 967
Debarshi Goswami Avatar asked Dec 05 '12 11:12

Debarshi Goswami


1 Answers

Setting DISTUTILS_DEBUG=1 in the environment will cause debug logging.

like image 59
merwok Avatar answered Oct 29 '22 05:10

merwok