X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/checkpath-python/blobdiff_plain/65ca3a6f365cd9c771ba9eee35c76a5495fea23b..936ed0193fc78a444885ab2f8e813a55e3163871:/setup.py diff --git a/setup.py b/setup.py index 5ae8c34..2100e81 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ #! /usr/bin/python from distutils.core import setup, Extension +from Pyrex.Distutils import build_ext from os import * from errno import * @@ -40,28 +41,17 @@ def uniquify(l): 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})