rle*_*827 4 python python-wheel
我如何从中制造万向轮setup.py?我宁愿不要--universal每次都传递该选项,也不要setup.cfg仅为此选项创建文件。
我知道/sf/answers/2457856901/中的解决方法,但是有没有一种干净的方法可以在不setup.cfg临时创建文件的情况下进行此操作?
setup.py setup()支持将options参数传递给任何命令的参数。它是命令名称和命令选项的词典。您可以通过提供strtobool接受的任何真实值来指示它构建万向轮,例如
setup(options={'bdist_wheel':{'universal':'1'})
要么
setup(options={'bdist_wheel':{'universal':True})
另请参见https://github.com/python/cpython/blob/master/Lib/distutils/dist.py#L247