← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad-buildd:py3-library-package into launchpad-buildd:master

 

Colin Watson has proposed merging ~cjwatson/launchpad-buildd:py3-library-package into launchpad-buildd:master with ~cjwatson/launchpad-buildd:check-implicit-pointer-functions-wrapper as a prerequisite.

Commit message:
Add a python3-lpbuildd binary package

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/383502

This isn't used yet, but provides a basis for a full port on Ubuntu >= 18.04.

We now run tests on both Python 2 and 3 automatically.

The /usr/lib/launchpad-buildd/buildd-slave.tac symlink is now shipped by launchpad-buildd rather than python-lpbuildd; it's only used when running an actual builder rather than just using the libraries for testing, and it would have caused python-lpbuildd and python3-lpbuildd to conflict if we continued to ship it in the library packages.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad-buildd:py3-library-package into launchpad-buildd:master.
diff --git a/Makefile b/Makefile
index 602f134..28f8bf1 100644
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,8 @@ realclean:
 
 .PHONY: all clean deb
 
-PYTHON=python
 check:
-	PYTHONPATH=$(CURDIR):$(PYTHONPATH) $(PYTHON) -m testtools.run \
+	PYTHONPATH=$(CURDIR):$(PYTHONPATH) python -m testtools.run \
+		discover -v
+	PYTHONPATH=$(CURDIR):$(PYTHONPATH) python3 -m testtools.run \
 		discover -v
diff --git a/debian/changelog b/debian/changelog
index d667d1d..2c746b4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -22,6 +22,7 @@ launchpad-buildd (190) UNRELEASED; urgency=medium
   * Convert translation templates builds to the VCS mixin, thereby adding
     git support.
   * Add a proper wrapper for check-implicit-pointer-functions.
+  * Add a python3-lpbuildd binary package.
 
  -- Colin Watson <cjwatson@xxxxxxxxxx>  Tue, 28 Apr 2020 10:19:27 +0100
 
diff --git a/debian/control b/debian/control
index ca19e1d..273fd20 100644
--- a/debian/control
+++ b/debian/control
@@ -30,6 +30,24 @@ Build-Depends: apt-utils,
 # build-time pybuild fails if it's not available.
                python-ws4py,
                python-zope.interface,
+               python3 (>= 3.3),
+               python3-apt,
+               python3-debian,
+               python3-fixtures,
+               python3-netaddr,
+               python3-pylxd,
+               python3-requests,
+               python3-responses,
+               python3-setuptools,
+               python3-six,
+               python3-systemfixtures,
+               python3-testtools,
+               python3-twisted,
+               python3-txfixtures,
+# We don't use the bits of pylxd that require this at run-time, but at
+# build-time pybuild fails if it's not available.
+               python3-ws4py,
+               python3-zope.interface,
 Vcs-Git: https://git.launchpad.net/launchpad-buildd
 Vcs-Browser: https://git.launchpad.net/launchpad-buildd
 
@@ -55,6 +73,8 @@ Depends: adduser,
          schroot,
          sudo,
          ${misc:Depends},
+Breaks: python-lpbuildd (<< 190)
+Replaces: python-lpbuildd (<< 190)
 Description: Launchpad buildd slave
  This is the launchpad buildd slave package. It contains everything needed to
  get a launchpad buildd going apart from the database manipulation required to
@@ -76,5 +96,20 @@ Depends: apt-utils,
          ${python:Depends},
 Breaks: launchpad-buildd (<< 88)
 Replaces: launchpad-buildd (<< 88)
-Description: Python libraries for a Launchpad buildd slave
- This contains the Python libraries that control the Launchpad buildd slave.
+Description: Python 2 libraries for a Launchpad buildd slave
+ This contains the Python 2 libraries that control the Launchpad buildd slave.
+
+Package: python3-lpbuildd
+Section: python
+Architecture: all
+Depends: apt-utils,
+         procps,
+         python3-apt,
+         python3-netaddr,
+         python3-pylxd,
+# Work around missing dependency in python3-pbr.
+         python3-setuptools,
+         ${misc:Depends},
+         ${python3:Depends},
+Description: Python 3 libraries for a Launchpad buildd slave
+ This contains the Python 3 libraries that control the Launchpad buildd slave.
diff --git a/debian/python-lpbuildd.links b/debian/launchpad-buildd.links
similarity index 100%
rename from debian/python-lpbuildd.links
rename to debian/launchpad-buildd.links
diff --git a/debian/rules b/debian/rules
index 8468ec0..07aee67 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,7 +10,7 @@ export PYBUILD_NAME := lpbuildd
 export LIBDIR := $(shell python -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())')
 
 %:
-	dh $@ --with=python2 --buildsystem=pybuild
+	dh $@ --with=python2,python3 --buildsystem=pybuild
 
 override_dh_auto_build:
 	dh_auto_build
diff --git a/system-dependencies.txt b/system-dependencies.txt
index 7828cd8..81c8627 100644
--- a/system-dependencies.txt
+++ b/system-dependencies.txt
@@ -20,3 +20,17 @@ python-testtools
 python-twisted
 python-txfixtures
 python-zope.interface
+python3-apt
+python3-debian
+python3-fixtures
+python3-netaddr
+python3-pylxd
+python3-requests
+python3-responses
+python3-setuptools
+python3-six
+python3-systemfixtures
+python3-testtools
+python3-twisted
+python3-txfixtures
+python3-zope.interface