From c73d7dab6f1f2346cebc751ea8f90406c614833f Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Mon, 18 May 2020 17:07:07 +0100 Subject: [PATCH] Build debian package with python3 Switch to using python 3 for building the dh-virtualenv deb. Python2 is dead, and the existing build fails for Ubuntu 20.04 and debian testing (specifically, python-mock and python-sphinx no longer exist). --- Dockerfile | 4 ++-- debian/control | 8 ++++---- debian/rules | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5250c91..db932c3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,8 +11,8 @@ RUN apt-get update -qq -o Acquire::Languages=none \ && env DEBIAN_FRONTEND=noninteractive apt-get install \ -yqq --no-install-recommends -o Dpkg::Options::=--force-unsafe-io \ build-essential debhelper devscripts equivs lsb-release libparse-debianchangelog-perl \ - python python-setuptools python-pip python-dev \ - python-sphinx python-mock dh-exec dh-python python-sphinx-rtd-theme \ + python3 python3-setuptools python3-pip python3-dev \ + python3-sphinx python3-mock dh-exec dh-python python3-sphinx-rtd-theme \ && apt-get clean && rm -rf "/var/lib/apt/lists"/* WORKDIR /dpkg-build COPY ./ ./ diff --git a/debian/control b/debian/control index c28beb7..c7c6dfb 100644 --- a/debian/control +++ b/debian/control @@ -2,8 +2,8 @@ Source: dh-virtualenv Section: python Priority: optional Maintainer: Jyrki Pulliainen -Build-Depends: debhelper (>= 9), python(>= 2.6.6-3~), - python-setuptools, python-sphinx, python-mock, dh-exec, dh-python, +Build-Depends: debhelper (>= 9), python3, + python3-setuptools, python3-sphinx, python3-mock, dh-exec, dh-python, # python-sphinx-rtd-theme doesn't exist in distributions # predating Debian Jessie and Ubuntu Xenial. On these legacy # systems: @@ -11,13 +11,13 @@ Build-Depends: debhelper (>= 9), python(>= 2.6.6-3~), # 2. pip install sphinx_rtd_theme. # 3. Proceed with your build process (typically dpkg-build). # See https://github.com/spotify/dh-virtualenv/issues/230 - python-sphinx-rtd-theme + python3-sphinx-rtd-theme Standards-Version: 4.2.1 Homepage: http://www.github.com/spotify/dh-virtualenv Package: dh-virtualenv Architecture: all -Depends: ${python:Depends}, ${misc:Depends}, ${sphinxdoc:Depends}, +Depends: ${python3:Depends}, ${misc:Depends}, ${sphinxdoc:Depends}, virtualenv | python-virtualenv (>= 1.7) | python3-venv Description: wrap and build python packages using virtualenv This package provides a dh sequencer that helps you to deploy your diff --git a/debian/rules b/debian/rules index e245850..1ea2faf 100755 --- a/debian/rules +++ b/debian/rules @@ -6,7 +6,7 @@ ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) endif %: - dh $@ --buildsystem=pybuild --with python2 $(DH_ARGS) + dh $@ --buildsystem=pybuild --with python3 $(DH_ARGS) override_dh_auto_clean: rm -rf doc/_build @@ -20,7 +20,7 @@ override_dh_auto_build: ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS))) override_dh_installdocs: - python setup.py build_sphinx + python3 setup.py build_sphinx dh_installdocs doc/_build/html # Make Sphinxdocs build on Jessie and Xenial