Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

setup.py requires MySQL-python

I'm writing a setup.py script and want to specify a dependency onto MySQL package:

requires=['requests', 'mock', 'GitPython', 'MySQL-python']

But MySQL-python looks to be illegal for setup tool because it thinks that after - there should be a version and it throws this error:

ValueError: expected parenthesized list: '-python'

What can I do here?

Environment: Python 2.7.3; precise 32

like image 280
Stanislav Bashkyrtsev Avatar asked Nov 12 '22 09:11

Stanislav Bashkyrtsev


1 Answers

From the distutils documentation:

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'.

With that in mind you should just be able to check off MySQL-python's _mysql module:

requires=['requests', 'mock', 'GitPython', '_mysql']
like image 95
cwgem Avatar answered Nov 23 '22 09:11

cwgem