[py3porters-devel] Fwd: deheader: please build package as a Python3 application

Alexandre Detiste alexandre.detiste at gmail.com
Sat Sep 23 08:56:06 UTC 2017


Hi,

   dput, reportbug & apt-listchanges are done.

next package on the "eating it's own dog food" track is piuparts.



This one "deheader" package seams to be a really low hanging fruit,
I would like have wished to find out earlier.

Greets,

Alexandre

---------- Forwarded message ----------
From: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: 2017-09-23 10:47 GMT+02:00
Subject: deheader: please build package as a Python3 application
To: Debian Bug Tracking System <submit at bugs.debian.org>

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876518.

Package: deheader
Version: 1.6-1
Severity: normal

Hi,

The deheader program is both a Python2 & Python3-compatible program,
it's only needed to change it's shebnag to make it perfectly work.

This is purposefully supported & tested by upstream.

Can you please built it as a Python3 application from now on ?

On one of my computers it's the only thing requiring Python2;
while Python3 will always be pulled-in one way or another
(reportbug, apt-listchanges, unattended-upgrades...).

Greets,

Alexandre Detiste


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing'), (450, 'unstable'), (400, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.12.0-1-amd64 (SMP w/6 CPU cores)
Locale: LANG=fr_BE.UTF-8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8),
LANGUAGE=fr_BE:fr (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages deheader depends on:
ii  make     4.1-9.1
ii  python3  3.5.3-3 ----> this is from my own rebuilt package

Versions of packages deheader recommends:
ii  clang-3.9 [c-compiler]  1:3.9.1-16
ii  clang-4.0 [c-compiler]  1:4.0.1-5
ii  g++ [c++-compiler]      4:7.2.0-1d1
ii  g++-7 [c++-compiler]    7.2.0-5
ii  gcc [c-compiler]        4:7.2.0-1d1
ii  gcc-6 [c-compiler]      6.4.0-6
ii  gcc-7 [c-compiler]      7.2.0-5

deheader suggests no packages.

-- no debconf information
-------------- next part --------------
diff --git a/debian/control b/debian/control
index 794999f..3f219fe 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: deheader
 Section: devel
 Priority: optional
 Maintainer: Reiner Herrmann <reiner at reiner-h.de>
-Build-Depends: debhelper (>= 10), dh-python, python-all, xmlto
+Build-Depends: debhelper (>= 10), dh-python, python3-all, xmlto
 Standards-Version: 3.9.8
 Homepage: http://www.catb.org/~esr/deheader/
 Vcs-Git: https://anonscm.debian.org/git/collab-maint/deheader.git
@@ -10,7 +10,7 @@ Vcs-Browser: https://anonscm.debian.org/git/collab-maint/deheader.git
 
 Package: deheader
 Architecture: all
-Depends: ${misc:Depends}, ${python:Depends}, make
+Depends: ${misc:Depends}, ${python3:Depends}, make
 Recommends: c-compiler, c++-compiler
 Description: Find and remove unnecessary includes in C or C++ source files
  deheader analyzes C and C++ files to determine which header inclusions can be
diff --git a/debian/rules b/debian/rules
index 83739e0..d273a19 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,11 @@
 #!/usr/bin/make -f
 
 %:
-	dh $@ --with python2
+	dh $@ --with python3
+
+override_dh_install:
+	dh_install
+	sed -i '1s|^#!/usr/bin/env python|#!/usr/bin/python3|' debian/deheader/usr/bin/deheader
 
 override_dh_installchangelogs:
 	dh_installchangelogs NEWS


More information about the py3porters-devel mailing list