diff options
author | Simon McVittie <smcv@debian.org> | 2019-08-30 15:54:31 +0100 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2019-08-31 11:19:32 +0100 |
commit | 88f69c41fd100138c9b47d7d07bb351fc3c26744 (patch) | |
tree | 77287a930f4a95d02c947c022908e3bf480a22ad /debian | |
parent | 91d4020069a86d9e3711f08b9b188adbe43a6bbd (diff) |
Add a build-profile to disable Python 2 packages
We can't remove them yet (see the blocking bugs of #936371) but at least
we can start to clear a path to doing so.
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | debian/control | 13 | ||||
-rwxr-xr-x | debian/rules | 18 |
3 files changed, 28 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog index dab36c2..089805a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,9 @@ dbus-python (1.2.8-4) UNRELEASED; urgency=medium and python-all-dev. Only build for the default version of Python 2, not for all versions of Python 2 (in practice this has meant the same thing since 2.6 was de-supported in 2013). + * Add a build-profile to disable Python 2 packages. + We can't remove them yet (see the blocking bugs of #936371) but at + least we can start to clear a path to doing so. -- Simon McVittie <smcv@debian.org> Sun, 23 Jun 2019 19:19:02 +0100 diff --git a/debian/control b/debian/control index 83cea70..05b9906 100644 --- a/debian/control +++ b/debian/control @@ -14,13 +14,15 @@ Build-Depends: dbus (>= 1.8), debhelper (>= 11~), dh-python, + dh-sequence-python2 <!pkg.dbus-python.nopython2>, + dh-sequence-python3, dpkg-dev (>= 1.16.1), libdbus-1-dev (>= 1.8), libglib2.0-dev (>= 2.40), - python2-dbg, - python2-dev, - python-gi, - python-tap, + python2-dbg <!pkg.dbus-python.nopython2>, + python2-dev <!pkg.dbus-python.nopython2>, + python-gi <!pkg.dbus-python.nopython2>, + python-tap <!pkg.dbus-python.nopython2>, python3-all-dbg, python3-all-dev, python3-gi, @@ -38,6 +40,7 @@ Vcs-Browser: https://salsa.debian.org/debian/dbus-python Testsuite: autopkgtest-pkg-python Package: python-dbus +Build-Profiles: <!pkg.dbus-python.nopython2> Section: python Architecture: any Depends: @@ -69,6 +72,7 @@ Description: simple interprocess messaging system (Python interface) See the dbus description for more information about D-Bus in general. Package: python-dbus-dbg +Build-Profiles: <!pkg.dbus-python.nopython2> Section: debug Architecture: any Depends: @@ -118,6 +122,7 @@ Description: Documentation for the D-Bus Python interface python-dbus and python3-dbus packages. Package: python-dbus-tests +Build-Profiles: <!pkg.dbus-python.nopython2> Section: python Architecture: any Depends: diff --git a/debian/rules b/debian/rules index 43a3760..2e1f29a 100755 --- a/debian/rules +++ b/debian/rules @@ -4,18 +4,24 @@ # Copyright © 2006 Sjoerd Simons <sjoerd@debian.org> # Copyright © 2012 Collabora Ltd. +binaries := $(shell dh_listpackages) + export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow include /usr/share/dpkg/default.mk +ifneq ($(filter python-dbus,$(binaries)),) PYTHON2 := $(shell pyversions --default --version) +else +PYTHON2 := +endif PYTHON3 := $(shell py3versions --requested --version debian/control) PYDEFAULTVER := $(shell py3versions --default --version) FLAVOURS := $(patsubst %,%-dbg,$(PYTHON2) $(PYTHON3)) $(PYTHON2) $(PYTHON3) %: - dh $@ --with python2,python3,sphinxdoc --buildsystem=autoconf + dh $@ --with sphinxdoc --buildsystem=autoconf # The special case for 2.7-dbg is a workaround. Python 2 doesn't have the # LDVERSION sysconfig variable, which would give AX_PYTHON_DEVEL the @@ -79,6 +85,7 @@ override_dh_auto_test-indep: : override_dh_auto_install-arch: +ifneq ($(filter python-dbus,$(binaries)),) set -e; for x in $(PYTHON2); do \ PYTHON=/usr/bin/python$$x \ dh_auto_install \ @@ -107,6 +114,7 @@ override_dh_auto_install-arch: install debian/tmp-dbg/usr/lib/python$$x/dist-packages/_dbus_glib_bindings.so \ debian/tmp/usr/lib/python$$x/dist-packages/_dbus_glib_bindings_d.so; \ done +endif set -e; for x in $(PYTHON3); do \ PYTHON=/usr/bin/python$$x \ dh_auto_install \ @@ -165,9 +173,11 @@ override_dh_installexamples: dh_installexamples --remaining-packages override_dh_installdocs: +ifneq ($(filter python-dbus,$(binaries)),) dh_installdocs --link-doc=python-dbus -ppython-dbus-dbg - dh_installdocs --link-doc=python3-dbus -ppython3-dbus-dbg dh_installdocs --doc-main-package=python-dbus -ppython-dbus +endif + dh_installdocs --link-doc=python3-dbus -ppython3-dbus-dbg dh_installdocs --doc-main-package=python-dbus-doc -ppython-dbus-doc dh_installdocs --doc-main-package=python3-dbus -ppython3-dbus dh_installdocs --remaining-packages @@ -184,15 +194,19 @@ override_dh_missing: dh_missing --fail-missing override_dh_strip: +ifneq ($(filter python-dbus,$(binaries)),) dh_strip --dbg-package=python-dbus-dbg -ppython-dbus -ppython-dbus-dbg -ppython-dbus-tests +endif dh_strip --dbg-package=python3-dbus-dbg -ppython3-dbus -ppython3-dbus-dbg -ppython3-dbus-tests +ifneq ($(filter python-dbus,$(binaries)),) override_dh_python2: dh_python2 set -e; for x in $(PYTHON2) $(patsubst %,%-dbg,$(PYTHON2)); do \ dh_python2 --shebang="/usr/bin/python$$x" \ /usr/lib/$(DEB_HOST_MULTIARCH)/installed-tests/dbus-python/python$$x; \ done +endif override_dh_python3: dh_python3 |