Distribute/distutils specify Python version

后端 未结 1 881
半阙折子戏
半阙折子戏 2020-12-10 18:00

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条回答
  • 2020-12-10 18:22

    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)
    
    0 讨论(0)
提交回复
热议问题