forked from apple/ccs-pykerberos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
138 lines (103 loc) · 2.96 KB
/
setup.py
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
136
137
138
##
# Copyright (c) 2006-2018 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##
from os.path import dirname, join as joinpath
from setuptools import setup, Extension
from io import open
try:
from subprocess import getoutput
except ImportError:
from commands import getoutput
#
# Options
#
project_name = "kerberos"
version_string = "1.3.1"
description = "Kerberos high-level interface"
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
long_description_content_type = "text/markdown"
url = "https://github.com/apple/ccs-pykerberos"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Systems Administration :: Authentication/Directory",
]
author = "Apple Inc."
author_email = "[email protected]"
license = "Apache License, Version 2.0"
platforms = ["all"]
#
# Entry points
#
entry_points = {
"console_scripts": [],
}
#
# Dependencies
#
setup_requirements = []
install_requirements = []
extras_requirements = {}
extra_link_args = getoutput("krb5-config --libs gssapi").split()
extra_compile_args = getoutput("krb5-config --cflags gssapi").split()
#
# Set up Extension modules that need to be built
#
extensions = [
Extension(
"kerberos",
extra_link_args=extra_link_args,
extra_compile_args=extra_compile_args,
sources=[
"src/base64.c",
"src/kerberos.c",
"src/kerberosbasic.c",
"src/kerberosgss.c",
"src/kerberospw.c",
],
),
]
#
# Run setup
#
def doSetup():
setup(
name=project_name,
version=version_string,
description=description,
long_description=long_description,
long_description_content_type=long_description_content_type,
url=url,
classifiers=classifiers,
author=author,
author_email=author_email,
license=license,
platforms=platforms,
ext_modules=extensions,
setup_requires=setup_requirements,
install_requires=install_requirements,
extras_require=extras_requirements,
)
#
# Main
#
if __name__ == "__main__":
doSetup()