Distribute/distutils specify Python version

元气小坏坏 提交于 2019-12-28 18:08:34

问题


Kinda followup to this... :)

My project is Python 3-only and my question is basically how I tell distutils/distribute/whoever that this package is Python 3-only?


回答1:


Not sure if there's some special setting, but this in the beginning of setup.py might help:

import sys
if sys.version_info.major < 3:
    print("I'm only for 3, please upgrade")
    sys.exit(1)


来源:https://stackoverflow.com/questions/13385337/distribute-distutils-specify-python-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!