chiark / gitweb /
Debianization.
[checkpath-python] / setup.py
index 5ae8c34768dcc99ba296da1bd6aafb92373d66e7..2100e81dbd2eb3808a624a1601c65f5bf6e9f8aa 100644 (file)
--- 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})