-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
76 lines (67 loc) · 2.22 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
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# LinOTP - the open source solution for two factor authentication
# Copyright (C) 2010 - 2019 KeyIdentity GmbH
#
# This file is part of LinOTP admin clients.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public
# License, version 3, as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the
# GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
#
# E-mail: [email protected]
# Contact: www.linotp.org
# Support: www.keyidentity.com
#
from setuptools import setup, find_packages
import os
import sys
from linotpadminclientcli import __version__
# Taken from kennethreitz/requests/setup.py
package_directory = os.path.realpath(os.path.dirname(__file__))
yubico_requirements = [
'pyusb',
'yubico',
]
def get_file_contents(file_path):
"""Get the context of the file using full path name."""
content = ""
try:
full_path = os.path.join(package_directory, file_path)
content = open(full_path, 'r').read()
except:
print("### could not open file %r" % file_path, file=sys.stderr)
return content
setup(
name='LinOTPAdminClientCLI',
version=__version__,
description='LinOTP command-line client',
author='KeyIdentity GmbH',
author_email='[email protected]',
url='https://www.linotp.org',
packages=['linotpadminclientcli'],
extras_require={
'yubico': yubico_requirements,
},
data_files=[('share/man/man1', ["man/man1/linotpadm.1"])],
# data_files=[('/usr/lib/python2.6/site-packages/',['linotp2-client.pth']),
# ],
license='AGPLv3, (C) KeyIdentity GmbH',
long_description=get_file_contents('README.md'),
entry_points={
'console_scripts': [
'linotpadm = linotpadminclientcli.cli:main',
],
},
)