简体   繁体   中英

Printing compiler and linker commands when building C Extension with distutils

I'm trying to debug a setup.py file for a package that builds a C extension with

from distutils.core import Extension
ext = Extension(...

I'd like to see what compiler / linker commands are actually getting executed. How do I print them when running

pip install -e ./

or

python setup.py install

The problem seems to be that it wasn't rebuilding the extension, but rather using a cached version. If I run

python setup.py clean --all
python setup.py develop

it rebuilds and shows all the compile/link commands.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM