我正在编写一个 setup.py
脚本并想指定对 MySQL 包的依赖:
requires=['requests', 'mock', 'GitPython', 'MySQL-python']
但是 MySQL-python
看起来对于设置工具来说是非法的,因为它认为在 -
之后应该有一个版本并且它抛出这个错误:
ValueError: expected parenthesized list: '-python'
我可以在这里做什么?
环境:Python 2.7.3;精确 32
最佳答案
To specify that any version of a module or package is required, the string should consist entirely of the module or package name. Examples include 'mymodule' and 'xml.parsers.expat'.
考虑到这一点,您应该能够检查 MySQL-python 的 _mysql
模块:
requires=['requests', 'mock', 'GitPython', '_mysql']
关于python - setup.py 需要 MySQL-python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15345268/