| 30 |
|
if os.system("pkg-config --atleast-version=%s libstatgrab" % LIBSTATGRAB): |
| 31 |
|
sys.exit("Error, need at least libstatgrab version %s." % LIBSTATGRAB) |
| 32 |
|
|
| 33 |
< |
# test for statgrab.c, and try to generate if not found |
| 34 |
< |
if not os.path.exists("statgrab.c"): |
| 35 |
< |
print "statgrab.c doesn't exist, trying to use pyrexc to generate it..." |
| 33 |
> |
# test for _statgrab.c, and try to generate if not found |
| 34 |
> |
if not os.path.exists("_statgrab.c"): |
| 35 |
> |
print "_statgrab.c doesn't exist, trying to use pyrexc to generate it..." |
| 36 |
|
if os.system("pyrexc --version >/dev/null 2>&1"): |
| 37 |
< |
sys.exit("Error, statgrab.c not present, and can't find pyrexc to generate it with.") |
| 37 |
> |
sys.exit("Error, _statgrab.c not present, and can't find pyrexc to generate it with.") |
| 38 |
|
else: |
| 39 |
< |
if os.system("pyrexc statgrab.pyx"): |
| 40 |
< |
sys.exit("Error, pyrexc failed to generate statgrab.c") |
| 39 |
> |
if os.system("pyrexc _statgrab.pyx"): |
| 40 |
> |
sys.exit("Error, pyrexc failed to generate _statgrab.c") |
| 41 |
|
|
| 42 |
|
# get cflags and libs for libstatgrab |
| 43 |
|
cflags = getstatusoutput("pkg-config --cflags libstatgrab") |
| 58 |
|
url = "http://www.i-scream.org/libstatgrab/", |
| 59 |
|
license = "GNU GPL v2 or later", |
| 60 |
|
ext_modules=[Extension( |
| 61 |
< |
"statgrab", |
| 62 |
< |
["statgrab.c"], |
| 61 |
> |
"_statgrab", |
| 62 |
> |
["_statgrab.c"], |
| 63 |
|
extra_compile_args = cflags[1].split(), |
| 64 |
|
extra_link_args = libs[1].split(), |
| 65 |
|
)], |
| 66 |
+ |
py_modules=["statgrab"], |
| 67 |
|
) |