← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad-buildd/build-sdist into lp:launchpad-buildd

 

Colin Watson has proposed merging lp:~cjwatson/launchpad-buildd/build-sdist into lp:launchpad-buildd.

Commit message:
Add Python packaging files so that Launchpad's test suite can incorporate this as a Python dependency rather than requiring python-lpbuildd to be installed on the test system.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/build-sdist/+merge/276654

Add Python packaging files so that Launchpad's test suite can incorporate this as a Python dependency rather than requiring python-lpbuildd to be installed on the test system.  The latter is cumbersome for two reasons: firstly, we have to ask sysadmins to upgrade buildbots manually rather than being able to control the versions in use for ourselves; secondly, we have to have special buildout configuration to add /usr/lib/launchpad-buildd to sys.path.  Treating it as a Python dependency instead will let us fix both problems.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad-buildd/build-sdist into lp:launchpad-buildd.
=== modified file '.bzrignore'
--- .bzrignore	2011-11-11 02:04:22 +0000
+++ .bzrignore	2015-11-04 14:15:18 +0000
@@ -1,4 +1,6 @@
+*.egg-info
 *.pyc
+dist
 debian/files
 debian/launchpad-buildd
 debian/python-lpbuildd

=== added file 'MANIFEST.in'
--- MANIFEST.in	1970-01-01 00:00:00 +0000
+++ MANIFEST.in	2015-11-04 14:15:18 +0000
@@ -0,0 +1,24 @@
+include LICENSE
+include Makefile
+include buildd-genconfig
+include buildd-slave.tac
+include buildlivefs
+include buildrecipe
+include buildsnap
+include debian/changelog
+include generate-translation-templates
+include mount-chroot
+include override-sources-list
+include remove-build
+include sbuild-package
+include sbuildrc
+include scan-for-processes
+include slave-prep
+include sudo-wrapper
+include template-buildd-slave.conf
+include test_buildd_generatetranslationtemplates
+include test_buildd_recipe
+include umount-chroot
+include unpack-chroot
+include update-debian-chroot
+recursive-include lpbuildd/tests *.diff *.tar.gz buildd-slave-test.conf buildlog buildlog.long

=== modified file 'debian/changelog'
--- debian/changelog	2015-11-04 13:35:36 +0000
+++ debian/changelog	2015-11-04 14:15:18 +0000
@@ -5,6 +5,9 @@
     sbuild's UTF-8 section markers, and this seems to be the simplest way to
     fix that while preserving source compatibility with earlier versions of
     Twisted.
+  * Add Python packaging files so that Launchpad's test suite can
+    incorporate this as a Python dependency rather than requiring
+    python-lpbuildd to be installed on the test system.
 
  -- Colin Watson <cjwatson@xxxxxxxxxx>  Wed, 04 Nov 2015 11:49:27 +0000
 

=== added file 'setup.py'
--- setup.py	1970-01-01 00:00:00 +0000
+++ setup.py	2015-11-04 14:15:18 +0000
@@ -0,0 +1,77 @@
+#!/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@xxxxxxxxxxxxxxxxxxx',
+    license='Affero GPL v3',
+    install_requires=[
+        'bzr',
+        'fixtures',
+        # 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',
+        'testtools',
+        'Twisted',
+        'txfixtures',
+        'zope.interface',
+        ],
+    data_files=[
+        ('', ['buildd-slave.tac', 'template-buildd-slave.conf']),
+        ],
+    test_suite='lpbuildd.tests',
+    )


Follow ups