forked from DirectXMan12/python-gssapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·135 lines (123 loc) · 4.03 KB
/
setup.py
File metadata and controls
executable file
·135 lines (123 loc) · 4.03 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#!/usr/bin/env python
from setuptools import setup
from setuptools.extension import Extension
from Cython.Distutils import build_ext
import sys
import re
get_output = None
try:
import commands
get_output = commands.getoutput
except ImportError:
import subprocess
def _get_output(*args, **kwargs):
res = subprocess.check_output(*args, shell=True, **kwargs)
decoded = res.decode('utf-8')
return decoded.strip()
get_output = _get_output
ext_module_misc = Extension(
'gssapi.base.misc',
extra_link_args = get_output('krb5-config --libs gssapi').split(),
extra_compile_args = get_output('krb5-config --cflags gssapi').split(),
sources = [
'gssapi/base/misc.pyx',
# 'gssapi/base/cython_converters.pyx'
]
)
ext_module_creds = Extension(
'gssapi.base.creds',
extra_link_args = get_output('krb5-config --libs gssapi').split(),
extra_compile_args = get_output('krb5-config --cflags gssapi').split(),
sources = [
'gssapi/base/creds.pyx',
# 'gssapi/base/cython_converters.pyx'
]
)
ext_module_names = Extension(
'gssapi.base.names',
extra_link_args = get_output('krb5-config --libs gssapi').split(),
extra_compile_args = get_output('krb5-config --cflags gssapi').split(),
sources = [
'gssapi/base/names.pyx',
# 'gssapi/base/cython_converters.pyx'
]
)
ext_module_sec_contexts = Extension(
'gssapi.base.sec_contexts',
extra_link_args = get_output('krb5-config --libs gssapi').split(),
extra_compile_args = get_output('krb5-config --cflags gssapi').split(),
sources = [
'gssapi/base/sec_contexts.pyx',
# 'gssapi/base/cython_converters.pyx'
]
)
ext_module_types = Extension(
'gssapi.base.types',
extra_link_args = get_output('krb5-config --libs gssapi').split(),
extra_compile_args = get_output('krb5-config --cflags gssapi').split(),
sources = [
'gssapi/base/types.pyx',
# 'gssapi/base/cython_converters.pyx'
]
)
ext_module_message = Extension(
'gssapi.base.message',
extra_link_args = get_output('krb5-config --libs gssapi').split(),
extra_compile_args = get_output('krb5-config --cflags gssapi').split(),
sources = [
'gssapi/base/message.pyx',
# 'gssapi/base/cython_converters.pyx'
]
)
ext_module_cython_converters = Extension(
'gssapi.base.cython_converters',
extra_link_args = get_output('krb5-config --libs gssapi').split(),
extra_compile_args = get_output('krb5-config --cflags gssapi').split(),
sources = [
'gssapi/base/cython_converters.pyx',
# 'gssapi/base/cython_converters.pyx'
]
)
long_desc = re.sub('\.\. role:: \w+\(code\)\s*\n\s*.+', '',
re.sub(r':(python|bash|code):', '',
re.sub(r'\.\. code-block:: \w+', '::',
open('README.txt').read())))
setup(
name='PyGSSAPI',
version='1.0.0',
author='Solly Ross',
author_email='sross@redhat.com',
packages=['gssapi', 'gssapi.base', 'gssapi.tests'],
description='Python GSSAPI Wrapper',
long_description=long_desc,
license='LICENSE.txt',
url="https://github.com/directxman12/python-gssapi",
classifiers=[
'Development Status :: 4 - Beta',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Security',
'Topic :: Software Development :: Libraries :: Python Modules'
],
cmdclass = {'build_ext': build_ext},
ext_modules = [
ext_module_misc,
ext_module_creds,
ext_module_names,
ext_module_sec_contexts,
ext_module_types,
ext_module_message,
ext_module_cython_converters
],
install_requires=[
'flufl.enum >= 4.0'
],
tests_require=[
'tox'
]
)