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
|
#!/usr/bin/env python
# Copyright 2015 Canonical Ltd. All rights reserved.
#
# This file is part of launchpad-buildd.
#
# launchpad-buildd is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, version 3 of the License.
#
# launchpad-buildd is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with launchpad-buildd. If not, see <http://www.gnu.org/licenses/>.
import re
from textwrap import dedent
from setuptools import (
find_packages,
setup,
)
changelog_heading = re.compile(r'\w[-+0-9a-z.]* \(([^\(\) \t]+)\)')
with open('debian/changelog') as changelog:
line = changelog.readline()
match = changelog_heading.match(line)
if match is None:
raise ValueError(
"Failed to parse first line of debian/changelog: '%s'" % line)
version = match.group(1)
setup(
name='launchpad-buildd',
version=version,
description='Launchpad buildd slave',
long_description=dedent("""
The Launchpad buildd slave libraries. The PyPI version of this
package will not produce a complete installation on its own, and is
mostly useful for testing other pieces of software against
launchpad-buildd; for a real Launchpad buildd slave, install the
launchpad-buildd package from ppa:launchpad/ubuntu/ppa.
""").strip(),
url='https://launchpad.net/launchpad-buildd',
packages=find_packages(),
package_data={
'lpbuildd': [
'tests/buildd-slave-test.conf',
],
},
maintainer='Launchpad Developers',
maintainer_email='launchpad-dev@lists.launchpad.net',
license='Affero GPL v3',
install_requires=[
'bzr',
# XXX cjwatson 2015-11-04: This does in fact require python-apt, but
# that's normally shipped as a system package and specifying it here
# causes problems for Launchpad's build system.
#'python-apt',
'python-debian',
'Twisted',
'zope.interface',
],
data_files=[
('', ['buildd-slave.tac', 'template-buildd-slave.conf']),
],
test_suite='lpbuildd.tests',
tests_require=[
'fixtures',
'testtools',
'txfixtures',
],
)
|