Python distutils, how to get a compiler that is going to be used?

后端 未结 6 2071
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-02 10:41

For example, I may use python setup.py build --compiler=msvc or python setup.py build --compiler=mingw32 or just python setup.py build

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-02 11:06

    import distutils.ccompiler

    compiler_name = distutils.ccompiler.get_default_compiler()

提交回复
热议问题