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
|
# Copyright 2014 Canonical Ltd. This software is licensed under the
# GNU General Public License version 3 (see the file LICENSE).
import ast
import os.path
import re
from setuptools import setup, find_packages
long_description = """Mojo is a continuous integration and continuous delivery
system for Juju-based services."""
ROOT = os.path.dirname(__file__)
PACKAGE_NAME = "mojo"
VERSION = None
with open(os.path.join(ROOT, PACKAGE_NAME, "__init__.py")) as f:
for line in f:
if line.startswith("__version__ = "):
VERSION = ast.literal_eval(line[len("__version__ = ") :].strip())
break
if VERSION is None:
raise EnvironmentError("failed to read version")
install_requires = [
"argcomplete",
"distro-info",
"jinja2",
"jujuclient >= 0.0.7",
"juju-deployer >= 0.6.4",
"python-codetree >= 1.1.0",
]
extras_require = {"tests": ["nose", "coverage", "argcomplete", "pyyaml", "jinja2", "juju-deployer",]}
if not os.path.exists('/etc/lsb-release') or (
re.search(r'(?m)^\s*DISTRIB_CODENAME\s*=\s*trusty\s*$', open('/etc/lsb-release', 'r').read(), re.MULTILINE) is None
):
install_requires.append('pylxd')
extras_require['tests'].append('pylxd')
setup(
name="mojo",
version=VERSION,
description="A deployment workflow system for Juju",
long_description=long_description,
maintainer="Mojo Maintainers",
maintainer_email="mojo-maintainers@lists.canonical.com",
url="http://launchpad.net/mojo",
# see requirements.txt for additional requirements including those not availble in pypi
install_requires=install_requires,
extras_require=extras_require,
packages=find_packages(),
classifiers=[
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python",
"Topic :: Internet",
"Topic :: Software Development :: Libraries :: Python Modules",
"Intended Audience :: Developers",
],
test_suite="mojo.tests",
entry_points={
"console_scripts": [
"juju-check = mojo.juju.check:main",
"juju-parse-status = mojo.juju.parse_status:main",
"mojo = mojo.__main__:main",
"mojo-project-new = mojo.project_new:main",
"mojo-project-destroy = mojo.project_destroy:main",
"mojo-admin = mojo.cli:admin",
"mojo-info = mojo.info:main",
]
},
include_package_data=True,
)
|