-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup.py
84 lines (74 loc) · 2.16 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
#!/usr/bin/env python
#
#
# Copyright (C) Zenoss, Inc. 2013, all rights reserved.
#
# This content is made available according to terms specified in the LICENSE
# file at the top-level directory of this package.
#
#
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
# This is a hack to pull in the defaults from zpg until we have
# something better. This eliminates the necessity of importing
# zpg at the start and allows us to run the setup file without the
# dependencies installed.
filepath = os.path.abspath(__file__)
folder = os.path.dirname(filepath)
defaults_path = os.path.join(folder, 'zpg', '_defaults.py')
with open(defaults_path, 'r') as fd:
data = "".join(fd.readlines())
exec data
packages = [
'zpg',
]
requires = [
'Cheetah',
'PyYaml',
'gitpython',
'colorama',
'inflect',
'lxml',
'Mock',
'nose',
'pep8',
'argparse'
]
setup(
name="zpg",
version=defaults.get("version", "0.0.1"), # zpg.__version__
description="ZenPack Generator",
long_description=open('README.rst').read() + '\n\n' +
open('HISTORY.rst').read(),
author="Zenoss Labs",
author_email="[email protected]",
url="http://github.com/zenoss/ZenPackGenerator",
keywords="zenpack",
package_dir={'zpg': 'zpg'},
package_data={'': ['LICENSE', 'NOTICE'], 'zpg': ['Templates/*.tmpl']},
packages=packages,
requires=requires,
setup_requires=requires,
install_requires=requires,
entry_points={'console_scripts': ['zpg = zpg:generate']},
license=open('LICENSE').read(),
zip_safe=False,
classifiers=[
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Natural Language :: English",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Code Generators",
"Topic :: System :: Monitoring"
],
)