[TIP] Are extensions needed for coverage required?
Ned Batchelder
ned at nedbatchelder.com
Sun Jul 1 08:34:48 PDT 2012
On 7/1/2012 11:20 AM, Chris Withers wrote:
> Hi Ned,
>
> Got the following installing coverage on Mac OS X using the Python 2.7
> that ships with Enthought's Python Distribution:
>
> Getting distribution for 'coverage>=3.4'.
> no previously-included directories found matching 'test'
> In file included from
> /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:4,
> from
> /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85,
> from coverage/tracer.c:3:
> /Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error:
> stdarg.h: No such file or directory
> In file included from
> /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:4,
> from
> /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85,
> from coverage/tracer.c:3:
> /Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error:
> stdarg.h: No such file or directory
> lipo: can't figure out the architecture type of:
> /var/folders/m6/tsd59qsj7pd_lldh4mhwh6kh0000gn/T//ccEpiEId.out
> **
> ** Couldn't install with extension module, trying without it...
> ** SystemExit: error: command 'gcc-4.2' failed with exit status 1
> **
> no previously-included directories found matching 'test'
> Got coverage 3.5.2.
>
> Have you or anyone else seen this before?
> What is the extension module used for?
>
Chris: coverage.py works by setting a trace function with
sys.settrace(). That function is invoked for every line of your
program. To reduce the burden, coverage.py has a trace function written
in C. If for whatever reason you can't compile that C extension,
coverage.py will fall back to a Python implementation, which is what
happened here to you. Everything will continue to work, but it will be
slower.
--Ned.
> cheers,
>
> Chris
>
More information about the testing-in-python
mailing list