-
Notifications
You must be signed in to change notification settings - Fork 22
/
setup.py
83 lines (67 loc) · 2.07 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
from __future__ import print_function
from os import path # , walk
from distutils.command.build import build
from setuptools import setup, find_packages
from setuptools.command.develop import develop
from setuptools.command.install import install
_here = path.abspath(path.dirname(__file__))
with open(path.join(_here, "VERSION"), "r") as _f:
_version = "".join(_f.readlines()).strip()
class ZenInstallCommand(install):
"""Used to disable installs."""
def run(self):
print("Installation disabled")
import sys
sys.exit(1)
class ZenBuildCommand(build):
"""Used to disable builds."""
def run(self):
print("Build disabled")
import sys
sys.exit(1)
class ZenDevelopCommand(develop):
"""Used to override the 'develop' command to provide custom pth file."""
_nspkg_tmpl = (
"import sys, types, os",
"p = os.path.join(sys.prefix, *%(pth)r)",
"m = sys.modules.setdefault(%(pkg)r, types.ModuleType(%(pkg)r))",
"mp = m.__dict__.setdefault('__path__', [])",
"(p not in mp) and mp.append(p)",
)
setup(
name="Zenoss",
version=_version,
description="Zenoss Platform",
author="Zenoss, Inc.",
author_email="dev@zenoss.com",
url="https://www.zenoss.com",
package_dir={"": "."},
packages=find_packages(
exclude=[
"bdd",
"bdd.*",
"Products.ZenUITests",
"Products.ZenUITests.*",
"Products.ZenModel.migrate.tests",
],
),
namespace_packages=["Products"],
include_package_data=True,
zip_safe=False,
install_requires=[],
python_requires=">=2.7,<3",
cmdclass={
"build": ZenBuildCommand,
"develop": ZenDevelopCommand,
"install": ZenInstallCommand,
},
entry_points={
"console_scripts": [
"configcache=Products.ZenCollector.configcache.__main__:main",
"zenjobs=Products.Jobber.bin:main",
],
"celery.commands": [
"monitor=Products.Jobber.monitor:MonitorCommand",
],
},
)