-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
105 lines (91 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
# -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (c) 2008-2011 Michael R.
# All Rights Reserved.
#
# This software is subject to the provisions of the BSD-like license at
# http://www.repoze.org/LICENSE.txt. A copy of the license should accompany
# this distribution. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL
# EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO,
# THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND
# FITNESS FOR A PARTICULAR PURPOSE
#
###############################################################################
import os
import sys
from setuptools import setup
from setuptools import find_packages
# name and version
from configme.package_info import PACKAGE_NAME
from configme.package_info import PACKAGE_VERSION_FULL
from configme.package_info import PACKAGE_DESC
from configme.package_info import PACKAGE_URL
from configme.package_info import PACKAGE_LICENSE
from configme.package_info import PACKAGE_AUTHOR
# py version detection
py_version = sys.version_info[:2]
PY3 = py_version[0] == 3
here = os.path.abspath(os.path.dirname(__file__))
try:
README = open(os.path.join(here, 'README.rst')).read()
CHANGES = open(os.path.join(here, 'CHANGES.txt')).read()
except IOError:
README = CHANGES = ''
# install requires
install_requires = [
'Jinja2',
]
# install requires: argparse is not included untill python 2.7 or 3.2
if py_version < (2, 7) or (PY3 and py_version < (3, 2)):
install_requires.append('argparse')
# testing requires
tests_require = [
]
# testing extras are used in a command
testing_extras = tests_require + [
'nose',
'coverage',
'nosexcover',
'virtualenv', # for scaffolding tests
'flake8',
'ipython',
'ipdb'
]
# documentation generation requires
docs_extras = [
'Sphinx',
]
def main():
setup(
name=PACKAGE_NAME,
version=PACKAGE_VERSION_FULL,
description=PACKAGE_DESC,
long_description=README + '\n\n' + CHANGES,
classifiers=[
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Environment :: Console",
"Topic :: System :: Systems Administration",
"License :: Repoze Public License",
],
keywords='config',
author=PACKAGE_AUTHOR,
author_email="[email protected]",
url=PACKAGE_URL,
license=PACKAGE_LICENSE,
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=install_requires,
extras_require={
'testing': testing_extras,
'docs': docs_extras,
},
tests_require=tests_require,
test_suite="configme.tests",
entry_points={'console_scripts': ['configme = configme.cli:main']}
)
if __name__ == '__main__':
main()