分发/distutils指定Python版本 [英] Distribute/distutils specify Python version

查看:101
本文介绍了分发/distutils指定Python版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Kinda对 ...:)

Kinda followup to this... :)

我的项目是仅限Python 3的,而我的问题基本上是我如何告诉distutils/distribute/该软件包仅适用于Python 3的人?

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

推荐答案

不确定是否有一些特殊设置,但这在setup.py开头可能会有所帮助:

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)

这篇关于分发/distutils指定Python版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆