-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·60 lines (45 loc) · 1.68 KB
/
setup.py
File metadata and controls
executable file
·60 lines (45 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/python
import sys
from distutils.core import setup, Extension
#-------------------------------------------------------------------------------
version = "0.12"
#-------------------------------------------------------------------------------
def main(argv):
long_description='''
Python binding for Kerberos V5.
'''
debug_compile_args = ['-O0', '-g']
extra_compile_args = []
for arg in argv:
if arg in ('-d', '--debug'):
print "compiling with debug"
extra_compile_args = debug_compile_args
argv.remove(arg)
krb_extension = \
Extension('krb',
sources = ['src/krb.c'],
depends = ['src/common.h'],
libraries = ['krb5'],
extra_compile_args = extra_compile_args,
)
setup(name = 'python-krb',
version = version,
description = 'Python binding for Kerberos V5',
long_description = long_description,
author = 'John Dennis',
author_email = 'jdennis@redhat.com',
maintainer = 'John Dennis',
maintainer_email = 'jdennis@redhat.com',
license = 'LGPLv2+',
platforms = 'posix',
url = '',
download_url = '',
ext_modules = [krb_extension,
],
package_dir = {'krb':'src'},
packages = ['krb'],
)
return 0
#-------------------------------------------------------------------------------
if __name__ == "__main__":
sys.exit(main(sys.argv))