diff --git a/.gitignore b/.gitignore index 0331bbb..7f88f42 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,10 @@ *.exe *.out *.app + +# Editor turds +.*.swp +*~ + +# Generated +getdate.c diff --git a/PyKAdminErrors.h b/PyKAdminErrors.h index 52f0f0d..c5dffd7 100644 --- a/PyKAdminErrors.h +++ b/PyKAdminErrors.h @@ -1,6 +1,6 @@ -#include +#include #include #include #include diff --git a/PyKAdminObject.h b/PyKAdminObject.h index 523a8fa..1361406 100644 --- a/PyKAdminObject.h +++ b/PyKAdminObject.h @@ -1,5 +1,5 @@ -#include +#include #include #include #include diff --git a/PyKAdminPolicyObject.h b/PyKAdminPolicyObject.h index ff8b468..31d09e6 100644 --- a/PyKAdminPolicyObject.h +++ b/PyKAdminPolicyObject.h @@ -1,5 +1,5 @@ -#include +#include #include #include #include diff --git a/PyKAdminPrincipalObject.h b/PyKAdminPrincipalObject.h index 849f197..02153d6 100644 --- a/PyKAdminPrincipalObject.h +++ b/PyKAdminPrincipalObject.h @@ -1,6 +1,6 @@ -#include +#include #include #include #include diff --git a/build.bash b/build.bash deleted file mode 100755 index 360f45b..0000000 --- a/build.bash +++ /dev/null @@ -1,2 +0,0 @@ -clear -python setup.py build_ext --inplace diff --git a/getdate.y b/getdate.y index fec14ac..13073dc 100644 --- a/getdate.y +++ b/getdate.y @@ -13,7 +13,7 @@ /* SUPPRESS 287 on yaccpar_sccsid *//* Unusd static variable */ /* SUPPRESS 288 on yyerrlab *//* Label unused */ -#include "autoconf.h" +//#include "autoconf.h" #include #include diff --git a/kadmin.c b/kadmin.c index 5c630f3..0df19b7 100644 --- a/kadmin.c +++ b/kadmin.c @@ -4,7 +4,7 @@ */ -#include +#include #include #include diff --git a/setup.bash b/setup.bash deleted file mode 100644 index 7b01fdd..0000000 --- a/setup.bash +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -bison -y -o getdate.c getdate.y - -python setup.py build_ext --inplace - diff --git a/setup.py b/setup.py index d79df23..dab150e 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,42 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + from distutils.core import setup, Extension +from distutils.util import execute, newer +from distutils.spawn import spawn + + +if newer('getdate.y', 'getdate.c'): + execute(spawn, (['bison', '-y', '-o', 'getdate.c', 'getdate.y'],)) -setup( - ext_modules=[ - Extension("kadmin", - libraries = ["krb5", "kadm5clnt"], - library_dirs = ["/usr/lib64/"], - include_dirs = ["/usr/include/et/"], - sources = ["./kadmin.c", "./PyKAdminErrors.c", "./PyKAdminObject.c", "./PyKAdminPrincipalObject.c", "getdate.c"], - - ) - ] - ) - #/usr/lib64/libkadm5clnt_mit.so +setup(name='kadmin', + description='Python module for kerberos admin (kadm5)', + url='https://github.com/russjancewicz/python-kadmin', + author='Russell Jancewicz', + author_email='russell.jancewicz@gmail.com', + ext_modules=[ + Extension( + "kadmin", + libraries=["krb5", "kadm5clnt"], + sources=[ + "./kadmin.c", + "./PyKAdminErrors.c", + "./PyKAdminObject.c", + "./PyKAdminPrincipalObject.c", + "getdate.c" + ] + ) + ], + classifiers=[ + "Development Status :: 4 - Beta", + "Environment :: Console", + "Intended Audience :: System Administrators", + "Intended Audience :: Developers", + "Operating System :: POSIX", + "Programming Language :: C", + "Programming Language :: Python", + "Programming Language :: YACC", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: System :: Systems Administration :: Authentication/Directory", + ] + )