I just figured out what was wrong. If you use requires = []
it uses version predicates from the distutils style setup() function. If however, you use install_requires = []
with some slight changes to the list items (spaces instead of brackets for version predicates), it works fine.
python setuptools doesn't understand that 'google-api-python-client' is really the module name
-
30-06-2022 - |
Domanda
I get the following error because of the naming convention used by Google with their apiclient module:
$ sudo ./setup.py install
Traceback (most recent call last):
File "./setup.py", line 37, in <module>
scripts = [ 'bin/gsync' ],
File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 225, in __init__
_Distribution.__init__(self,attrs)
File "/usr/lib/python2.7/distutils/dist.py", line 259, in __init__
getattr(self.metadata, "set_" + key)(val)
File "/usr/lib/python2.7/distutils/dist.py", line 1220, in set_requires
distutils.versionpredicate.VersionPredicate(v)
File "/usr/lib/python2.7/distutils/versionpredicate.py", line 113, in __init__
raise ValueError("expected parenthesized list: %r" % paren)
ValueError: expected parenthesized list: '-api-python-client'
How do I instruct setuptools that this library should not considered a version predicate, essentially ignore the hyphen and include everything as the library name?
Soluzione
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow