Skip to content

Commit

Permalink
Build debian package with python3
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
richvdh committed May 18, 2020
1 parent 2de6b91 commit c73d7da
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./ ./
Expand Down
8 changes: 4 additions & 4 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@ Source: dh-virtualenv
Section: python
Priority: optional
Maintainer: Jyrki Pulliainen <[email protected]>
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:
# 1. Comment the dependency below.
# 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
Expand Down
4 changes: 2 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit c73d7da

Please sign in to comment.