-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
70 lines (60 loc) · 2.28 KB
/
setup.py
File metadata and controls
70 lines (60 loc) · 2.28 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
# -*- coding: utf-8 -*-
# Setup.py inspired by Django setup.py script
# https://github.com/django/django/blob/master/setup.py
import os
from setuptools import find_packages, setup
from distutils.sysconfig import get_python_lib
import pip
if tuple(map(int, pip.__version__.split('.'))) >= (10, 0, 0):
from pip._internal.download import PipSession
from pip._internal.req import parse_requirements
else:
from pip.download import PipSession
from pip.req import parse_requirements
from ldap_expire_notify import meta
REQUIRED_PYTHON = (3, 5)
EXCLUDE_FROM_PACKAGES = []
def graceful_read(fname):
try:
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()
except Exception:
return ''
install_requires_g = parse_requirements("requirements.txt", session=PipSession())
install_requires = [str(ir.req) for ir in install_requires_g]
tests_require_g = parse_requirements("requirements-tests.txt", session=PipSession())
tests_require = [str(ir.req) for ir in tests_require_g]
docs_require_g = parse_requirements("requirements-docs.txt", session=PipSession())
docs_require = [str(ir.req) for ir in docs_require_g]
setup(
name='ldap-expire-notify',
version=meta.version,
python_requires='>={}.{}'.format(*REQUIRED_PYTHON),
author=meta.author,
author_email=meta.author_email,
description=meta.description,
long_description=graceful_read('README.rst'),
license='Apache',
packages=find_packages(exclude=EXCLUDE_FROM_PACKAGES),
entry_points={'console_scripts': [
'ldap-expire-notify = ldap_expire_notify.cli:main',
'ldap-expire-check-channels = ldap_expire_notify.cli:check_channels',
]},
install_requires=install_requires,
extras_require={
'tests': tests_require,
'docs': docs_require,
},
zip_safe=False,
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3 :: Only',
]
)