python - error: each element of 'ext_modules' option must be an Extension instance or 2-tuple -
i trying use setuptools in python create egg package, weird error:
error: each element of 'ext_modules' option must extension instance or 2-tuple
how can fix this?
assuming have setuptools installed, edit setup.py of egg package target , replace import setup, extension
in order them setuptools.
from setuptools import setup, extension, command
rational: setuptools redefines extension
it's possible not recognize object have in ext_modules argument valid extension object. hence error message.
ext_modules 1 of arguments of setup() method describe extension of module, , it's specified in setup.py.
setup(name='foo', version='1.0', ext_modules=[extension('foo', ['foo.c'])], )
Comments
Post a Comment