#! /usr/bin/python
from distutils.core import setup, Extension
+from Pyrex.Distutils import build_ext
from os import *
from errno import *
libconfig('mLib', '2.0.3')
libconfig('checkpath', '1.1.0')
-class SubprocessFailure (Exception):
- def __init__(me, file, rc):
- me.args = (file, rc)
- me.file = file
- me.rc = rc
- def __str__(me):
- if WIFEXITED(me.rc):
- return '%s failed (rc = %d)' % (me.file, WEXITSTATUS(me.rc))
- elif WIFSIGNALED(me.rc):
- return '%s died (signal %d)' % (me.file, WTERMSIG(me.rc))
- else:
- return '%s died inexplicably' % (me.file)
-
chk = Extension('checkpath',
- ['checkpath.c'],
+ ['checkpath.pyx'],
+ ##extra_compile_args = ['-O0'],
include_dirs = uniquify(incdirs),
library_dirs = uniquify(libdirs),
libraries = uniquify(libs))
-setup(name = 'CheckPath',
+setup(name = 'checkpath-python',
version = '1.1.0',
description = 'Checking paths for security',
author = 'Straylight/Edgeware',
- author_email = 'mdw@nsict.org',
+ author_email = 'mdw@distorted.org.uk',
license = 'GNU General Public License',
- ext_modules = [chk])
+ ext_modules = [chk],
+ cmdclass = {'build_ext': build_ext})