<分区>
我的 setup.py 看起来像这样:
from distutils.core import setup
setup(
[...]
install_requires=['gevent', 'ssl', 'configobj', 'simplejson', 'mechanize'],
[...]
)
在 Python 2.6(或更高版本)下,ssl 模块的安装失败:
ValueError: This extension should not be used with Python 2.6 or later (already built in), and has not been tested with Python 2.3.4 or earlier.
有没有一种标准的方法来为特定的 python 版本定义依赖关系?当然我可以用 if float(sys.version[:3]) < 2.6:
来做但也许有更好的方法。