~blake-rouse/maas/fix-1353597-1.6

23.1.2 by Gavin Panella
Top-of-file boilerplate.
1
#!/usr/bin/env python2.7
2370.1.1 by Jeroen Vermeulen
Remove bootresources.yaml.
2
# Copyright 2012-2014 Canonical Ltd.  This software is licensed under the
10.1.4 by Julian Edwards
Add hashbang and copyright to setup.py
3
# GNU Affero General Public License version 3 (see the file LICENSE).
4
668.1.2 by Gavin Panella
Update docstring and package metadata, including author email.
5
"""Distribute/Setuptools installer for MAAS."""
40.1.1 by Gavin Panella
Move docstrings to the top.
6
25.1.2 by Gavin Panella
Use unicode_literals everywhere.
7
from __future__ import (
467.2.2 by Gavin Panella
Update all __future__ imports.
8
    absolute_import,
25.1.2 by Gavin Panella
Use unicode_literals everywhere.
9
    print_function,
10
    unicode_literals,
11
    )
23.1.2 by Gavin Panella
Top-of-file boilerplate.
12
1640.1.9 by Gavin Panella
Alias str to None instead of unicode.
13
str = None
1640.1.1 by Gavin Panella
Alias str to unicode everywhere.
14
1501.1.6 by Jeroen Vermeulen
Glob the PXE templates into setup.py.
15
from glob import glob
33.2.11 by Gavin Panella
Sorry, read() in setup.py got the better of me.
16
from os.path import (
17
    dirname,
18
    join,
19
    )
1505.2.6 by Jeroen Vermeulen
Get setup.py to import list_snippets.
20
import sys
16.3.14 by Gavin Panella
Fix lint.
21
22
from setuptools import (
23
    find_packages,
24
    setup,
25
    )
26
1505.2.6 by Jeroen Vermeulen
Get setup.py to import list_snippets.
27
# The source tree's location in the filesystem.
28
SOURCE_DIR = dirname(__file__)
29
30
# Allow the setup code to import from the source tree.
31
sys.path.append(join(SOURCE_DIR, 'src'))
32
33
33.2.11 by Gavin Panella
Sorry, read() in setup.py got the better of me.
34
def read(filename):
35
    """Return the whitespace-stripped content of `filename`."""
1505.2.6 by Jeroen Vermeulen
Get setup.py to import list_snippets.
36
    path = join(SOURCE_DIR, filename)
33.2.11 by Gavin Panella
Sorry, read() in setup.py got the better of me.
37
    with open(path, "rb") as fin:
38
        return fin.read().strip()
39
1 by Raphael Badin
Initial commit.
40
16.1.1 by Julian Edwards
Make setup.py packaging-friendly
41
__version__ = "0.1"
1 by Raphael Badin
Initial commit.
42
43
setup(
44
    name="maas",
16.1.1 by Julian Edwards
Make setup.py packaging-friendly
45
    version=__version__,
1 by Raphael Badin
Initial commit.
46
    url="https://launchpad.net/maas",
171.4.9 by Francis J. Lacoste
Remerge changes to load from site-packages.
47
    license="AGPLv3",
668.1.2 by Gavin Panella
Update docstring and package metadata, including author email.
48
    description="Metal As A Service",
634.3.10 by Gavin Panella
Load the correct README.
49
    long_description=read('README'),
1 by Raphael Badin
Initial commit.
50
288.2.2 by Gavin Panella
Change MaaS to MAAS everywhere.
51
    author="MAAS Developers",
668.1.3 by Gavin Panella
Fix the author email address.
52
    author_email="maas-devel@lists.launchpad.net",
1 by Raphael Badin
Initial commit.
53
38.2.5 by Gavin Panella
Add MANIFEST.in and find only production packages in setup.py.
54
    packages=find_packages(
55
        where=b'src',
56
        exclude=[
300.2.13 by Gavin Panella
Move the reconcile command into maastesting.
57
            b"*.testing",
58
            b"*.tests",
38.2.5 by Gavin Panella
Add MANIFEST.in and find only production packages in setup.py.
59
            b"maastesting",
300.2.13 by Gavin Panella
Move the reconcile command into maastesting.
60
            ],
38.2.5 by Gavin Panella
Add MANIFEST.in and find only production packages in setup.py.
61
        ),
37 by Gavin Panella
[r=bigjools] Distutils in Python 2.x doesn't seem to grok unicode paths.
62
    package_dir={'': b'src'},
237.1.1 by Francis J. Lacoste
Install data files.
63
    include_package_data=True,
20.1.1 by Dave Walker (Daviey)
Trivial changes to make PEP8 compliant.
64
703.1.1 by Andres Rodriguez
setup.py: Install data_files that are required by maas, rather than manually copy them on packaging
65
    data_files=[
66
        ('/etc/maas',
1499.1.1 by Jeroen Vermeulen
Move pserv.yaml from etc/ to etc/maas/ to match its /etc/maas/ install location.
67
            ['etc/maas/pserv.yaml',
2249.2.9 by Jason Hobbs
Incorporate review feedback.
68
             'etc/maas/drivers.yaml',
1093.2.2 by Julian Edwards
Add maas_cluster.conf to setup,py
69
             'etc/maas_cluster.conf',
703.1.1 by Andres Rodriguez
setup.py: Install data_files that are required by maas, rather than manually copy them on packaging
70
             'etc/txlongpoll.yaml',
1046.1.1 by Andres Rodriguez
setup.py: Set correct name for maas_local_celeryconfig.py
71
             'contrib/maas_local_celeryconfig.py',
1111.1.1 by Raphael Badin
Add maas_local_celeryconfig_cluster.
72
             'contrib/maas_local_celeryconfig_cluster.py',
703.1.1 by Andres Rodriguez
setup.py: Install data_files that are required by maas, rather than manually copy them on packaging
73
             'contrib/maas-http.conf',
1474.2.5 by Andres Rodriguez
revert o branch 1476
74
             'contrib/maas-cluster-http.conf',
703.1.1 by Andres Rodriguez
setup.py: Install data_files that are required by maas, rather than manually copy them on packaging
75
             'contrib/maas_local_settings.py']),
2202.1.1 by Andres Rodriguez
Install UEFI templates
76
        ('/etc/maas/templates/uefi',
77
            glob('etc/maas/templates/uefi/*.template')),
1502.1.2 by Jeroen Vermeulen
Add DHCP template to setup.py.
78
        ('/etc/maas/templates/dhcp',
79
            glob('etc/maas/templates/dhcp/*.template')),
1505.1.3 by Jeroen Vermeulen
Include DNS templates in setup.py.
80
        ('/etc/maas/templates/dns',
81
            glob('etc/maas/templates/dns/*.template')),
1501.2.1 by Jeroen Vermeulen
Move power templates and config into etc/maas/templates/power.
82
        ('/etc/maas/templates/power',
83
            glob('etc/maas/templates/power/*.template') +
84
            glob('etc/maas/templates/power/*.conf')),
1501.1.6 by Jeroen Vermeulen
Glob the PXE templates into setup.py.
85
        ('/etc/maas/templates/pxe', glob('etc/maas/templates/pxe/*.template')),
1505.2.11 by Jeroen Vermeulen
Rename etc/maas/templates/user-data to commissioning-user-data.
86
        ('/etc/maas/templates/commissioning-user-data',
87
            glob('etc/maas/templates/commissioning-user-data/*.template')),
88
        ('/etc/maas/templates/commissioning-user-data/snippets',
1976.1.1 by Andres Rodriguez
Install shell snippets
89
            glob('etc/maas/templates/commissioning-user-data/snippets/*.py') +
90
            glob('etc/maas/templates/commissioning-user-data/snippets/*.sh')),
703.1.1 by Andres Rodriguez
setup.py: Install data_files that are required by maas, rather than manually copy them on packaging
91
        ('/usr/share/maas',
1108.1.1 by Andres Rodriguez
Install celeryconfig.py in appropriate location
92
            ['contrib/wsgi.py',
1093.4.12 by Raphael Badin
Update setup.py
93
             'etc/celeryconfig.py',
94
             'etc/celeryconfig_cluster.py',
95
             'etc/celeryconfig_common.py']),
1504.1.1 by Andres Rodriguez
Install preseeds in /etc/maas/preseeds
96
        ('/etc/maas/preseeds',
703.1.1 by Andres Rodriguez
setup.py: Install data_files that are required by maas, rather than manually copy them on packaging
97
            ['contrib/preseeds_v2/commissioning',
98
             'contrib/preseeds_v2/enlist',
99
             'contrib/preseeds_v2/generic',
940.1.1 by Andres Rodriguez
Install enlist_userdata preseed
100
             'contrib/preseeds_v2/enlist_userdata',
1599.3.14 by Raphael Badin
Fix setup.py.
101
             'contrib/preseeds_v2/curtin',
102
             'contrib/preseeds_v2/curtin_userdata',
2433.1.1 by Blake Rouse
Add suse support.
103
             'contrib/preseeds_v2/curtin_userdata_centos',
104
             'contrib/preseeds_v2/curtin_userdata_suse',
2223.3.35 by Blake Rouse
Add windows intallation support using curtin.
105
             'contrib/preseeds_v2/curtin_userdata_windows',
2223.7.1 by Blake Rouse
Add windows preseeds.
106
             'contrib/preseeds_v2/preseed_master',
107
             'contrib/preseeds_v2/'
108
             'preseed_master_windows_amd64_generic_win2012',
109
             'contrib/preseeds_v2/'
110
             'preseed_master_windows_amd64_generic_win2012hv',
111
             'contrib/preseeds_v2/'
112
             'preseed_master_windows_amd64_generic_win2012hvr2',
113
             'contrib/preseeds_v2/'
114
             'preseed_master_windows_amd64_generic_win2012r2']),
2184.1.1 by jtv at canonical
Remove some more mentions of the ephemerals script.
115
        ('/usr/sbin', ['scripts/maas-import-pxe-files']),
2449.1.1 by diogo.matsubara at canonical
remove maas-generate-winrm-cert from setup.py
116
        ('/usr/bin', ['scripts/uec2roottar']),
703.1.1 by Andres Rodriguez
setup.py: Install data_files that are required by maas, rather than manually copy them on packaging
117
    ],
118
171.4.9 by Francis J. Lacoste
Remerge changes to load from site-packages.
119
    install_requires=[
120
        'setuptools',
121
        'Django == 1.3.1',
122
        'psycopg2',
123
        'amqplib',
224.1.7 by Raphael Badin
Add convoy.
124
        'convoy',
171.4.9 by Francis J. Lacoste
Remerge changes to load from site-packages.
125
        'django-piston',
126
        'FormEncode',
127
        'oauth',
128
        'oops',
129
        'oops-datedir-repo',
130
        'oops-twisted',
131
        'PyYAML',
132
        'South',
133
        'Twisted',
134
        'txAMQP',
274.1.1 by Gavin Panella
Update to txlongpoll 3.0.1.
135
        'txlongpoll',
171.4.9 by Francis J. Lacoste
Remerge changes to load from site-packages.
136
        ],
20.1.1 by Dave Walker (Daviey)
Trivial changes to make PEP8 compliant.
137
    classifiers=[
1 by Raphael Badin
Initial commit.
138
        'Development Status :: 4 - Beta',
139
        'Framework :: Django',
140
        'Intended Audience :: Developers',
141
        "Intended Audience :: System Administrators",
142
        'License :: OSI Approved :: GPL License',
143
        'Operating System :: OS Independent',
144
        'Programming Language :: Python',
145
        'Topic :: Internet :: WWW/HTTP',
171.4.9 by Francis J. Lacoste
Remerge changes to load from site-packages.
146
        ],
147
    extras_require=dict(
148
        doc=[
149
            'collective.recipe.sphinxbuilder',
150
            'Sphinx',
151
            ],
152
        tests=[
153
            'coverage',
154
            'django-nose',
155
            'lxml',
156
            'sst',
157
            'fixtures',
877.1.3 by Gavin Panella
Use mock.
158
            'mock',
171.4.9 by Francis J. Lacoste
Remerge changes to load from site-packages.
159
            'nose',
160
            'nose-subunit',
161
            'python-subunit',
162
            'rabbitfixture',
163
            'testresources',
546.2.1 by Raphael Badin
Add option to run js tests with alternative browsers.
164
            'testscenarios',
171.4.9 by Francis J. Lacoste
Remerge changes to load from site-packages.
165
            'testtools',
166
            ],
38.2.5 by Gavin Panella
Add MANIFEST.in and find only production packages in setup.py.
167
    )
171.4.9 by Francis J. Lacoste
Remerge changes to load from site-packages.
168
)