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
|
#!/usr/bin/python
# Ubuntu Testing Automation Harness
# Copyright 2012 Canonical Ltd.
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 3, as published
# by the Free Software Foundation.
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranties of
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
"""Provide installation information for distutils."""
import os
import re
from distutils.core import setup
# look/set what version we have
version = "0.0"
changelog = "debian/changelog"
if os.path.exists(changelog):
head = open(changelog).readline()
match = re.compile(".*\((.*)\).*").match(head)
if match:
version = match.group(1)
# find the maintainer
maintainer = ''
maintainer_email = ''
control = "debian/control"
if os.path.exists(control):
for line in open(control):
if line.startswith('Maintainer:'):
maintainer_info = line.split(': ', 1)[1].strip()
maintainer = maintainer_info.rsplit('<', 1)[0].strip()
maintainer_email = maintainer_info.rsplit('<', 1)[1].strip('>')
setup(
name='utah',
version=version,
packages=['utah',
'utah.client',
'utah.client.probe',
'utah.provisioning',
'utah.provisioning.baremetal'],
package_data={
'utah': ['provisioning/qemu-scripts/*']
},
maintainer=maintainer,
maintainer_email=maintainer_email,
)
|