-
Notifications
You must be signed in to change notification settings - Fork 23
/
setup.py
58 lines (46 loc) · 1.77 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
from setuptools import setup
import os.path
import codecs
def read(rel_path):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, rel_path), 'r') as fp:
return fp.read()
def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
requirements_filename = os.path.join(
os.path.dirname(os.path.abspath(__file__)), 'requirements.txt')
with open(requirements_filename) as fd:
install_requires = [i.strip() for i in fd.readlines()]
requirements_dev_filename = os.path.join(
os.path.dirname(os.path.abspath(__file__)), 'tests/requirements.txt')
with open(requirements_dev_filename) as fd:
tests_require = [i.strip() for i in fd.readlines()]
long_description_filename = os.path.join(
os.path.dirname(os.path.abspath(__file__)), 'README.md')
with open(long_description_filename) as fd:
long_description = fd.read()
setup(
name='duo_universal',
version=get_version("duo_universal/version.py"),
packages=['duo_universal'],
package_data={'duo_universal': ['ca_certs.pem']},
url='https://github.com/duosecurity/duo_universal_python',
license='BSD',
author='Duo Security, Inc.',
author_email='support@duosecurity.com',
description='Duo Web SDK for two-factor authentication',
long_description=long_description,
long_description_content_type='text/markdown',
python_requires='>=3',
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: BSD License'
],
install_requires=install_requires,
tests_require=tests_require
)