Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@
*.exe
*.out
*.app

# Editor turds
.*.swp
*~

# Generated
getdate.c
2 changes: 1 addition & 1 deletion PyKAdminErrors.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


#include <python2.6/Python.h>
#include <Python.h>
#include <kadm5/admin.h>
#include <krb5/krb5.h>
#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion PyKAdminObject.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#include <python2.6/Python.h>
#include <Python.h>
#include <kadm5/admin.h>
#include <krb5/krb5.h>
#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion PyKAdminPolicyObject.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#include <python2.6/Python.h>
#include <Python.h>
#include <kadm5/admin.h>
#include <krb5/krb5.h>
#include <stdio.h>
Expand Down
2 changes: 1 addition & 1 deletion PyKAdminPrincipalObject.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


#include <python2.6/Python.h>
#include <Python.h>
#include <kadm5/admin.h>
#include <krb5/krb5.h>
#include <stdio.h>
Expand Down
2 changes: 0 additions & 2 deletions build.bash

This file was deleted.

2 changes: 1 addition & 1 deletion getdate.y
Original file line number Diff line number Diff line change
Expand Up @@ -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 <string.h>
#include <stdlib.h>

Expand Down
2 changes: 1 addition & 1 deletion kadmin.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/


#include <python2.6/Python.h>
#include <Python.h>
#include <kadm5/admin.h>
#include <krb5/krb5.h>

Expand Down
6 changes: 0 additions & 6 deletions setup.bash

This file was deleted.

52 changes: 40 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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",
]
)