File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1+ import os .path
12
3+ import distutils .errors
24from distutils .core import setup
35from distutils .extension import Extension
46from distutils .log import warn
810 cmdclass = dict (build_ext = build_ext )
911 line_profiler_source = '_line_profiler.pyx'
1012except ImportError , e :
11- warn ("Could not import Cython. Using pre-generated C file if available." )
1213 cmdclass = {}
1314 line_profiler_source = '_line_profiler.c'
15+ if not os .path .exists (line_profiler_source ):
16+ raise distutils .errors .DistutilsError ("""\
17+ You need cython to build the line_profiler from a mercurial checkout, or
18+ alternatively use a release tarball from PyPI to build it without cython.""" )
19+ else :
20+ warn ("Could not import Cython. Using pre-generated C file if available." )
1421
1522long_description = """\
1623 line_profiler will profile the time individual lines of code take to execute.
You can’t perform that action at this time.
0 commit comments