Package: pylint
Followup-For: Bug #1032687
Control: tag -1 + patch
Hello.
The attached commits provide a patch for this issue,
and a few unrelated suggestions for the packaging that do not seem to
deserve separate bugs reports.
Thanks for maintaining pylint in Debian.
>From 8d8394bd063552fb8a1b0751ad53c10f18d00754 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Fri, 21 Apr 2023 16:20:45 +0200
Subject: [PATCH 1/5] Install docs via debhelper configuration files instead of
debian/rules
Separate pylint-doc.{docs,examples} files may help transitions like acafec41.
---
debian/changelog | 11 +++++++++++
debian/pylint-doc.docs | 2 ++
debian/pylint-doc.examples | 1 +
debian/rules | 7 -------
4 files changed, 14 insertions(+), 7 deletions(-)
create mode 100644 debian/pylint-doc.docs
create mode 100644 debian/pylint-doc.examples
diff --git a/debian/changelog b/debian/changelog
index e5be6fb..cfa783a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+pylint (2.16.2-3) UNRELEASED; urgency=medium
+
+ [ Nicolas Boulenguez ]
+ * debian/rules
+ - Move docs to pylint-doc.{docs,examples}.
+ Stop duplicating README.rst into each package. This seems consistent
+ now that pylint-doc installs to /usr/share/doc/pylint/.
+ Separate files may help transitions like acafec41.
+
+ -- Sandro Tosi <[email protected]> Fri, 21 Apr 2023 01:04:13 +0200
+
pylint (2.16.2-2) unstable; urgency=medium
* debian/rules
diff --git a/debian/pylint-doc.docs b/debian/pylint-doc.docs
new file mode 100644
index 0000000..ae1887d
--- /dev/null
+++ b/debian/pylint-doc.docs
@@ -0,0 +1,2 @@
+doc/_build/html
+README.rst
diff --git a/debian/pylint-doc.examples b/debian/pylint-doc.examples
new file mode 100644
index 0000000..e39721e
--- /dev/null
+++ b/debian/pylint-doc.examples
@@ -0,0 +1 @@
+examples/*
diff --git a/debian/rules b/debian/rules
index 1158a03..a7ef26d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -27,12 +27,5 @@ override_dh_auto_build:
override_dh_compress:
dh_compress -i -X.py -X.ini -X.xml -Xtest
-override_dh_installexamples:
- dh_installexamples -ppylint-doc examples/*
-
-override_dh_installdocs:
- dh_installdocs -A README.rst
- dh_installdocs -ppylint-doc doc/_build/html
-
override_dh_missing:
dh_missing --fail-missing
--
2.39.2
>From 4a43edfccbf49d240030672298010bfccf280068 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Fri, 21 Apr 2023 16:23:59 +0200
Subject: [PATCH 2/5] Remove dh_missing override
With debhelper 13, it repeats the default.
---
debian/changelog | 1 +
debian/rules | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index cfa783a..99988e2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ pylint (2.16.2-3) UNRELEASED; urgency=medium
Stop duplicating README.rst into each package. This seems consistent
now that pylint-doc installs to /usr/share/doc/pylint/.
Separate files may help transitions like acafec41.
+ - Remove dh_missing override. With debhelper 13, it repeats the default.
-- Sandro Tosi <[email protected]> Fri, 21 Apr 2023 01:04:13 +0200
diff --git a/debian/rules b/debian/rules
index a7ef26d..8a4948c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -26,6 +26,3 @@ override_dh_auto_build:
override_dh_compress:
dh_compress -i -X.py -X.ini -X.xml -Xtest
-
-override_dh_missing:
- dh_missing --fail-missing
--
2.39.2
>From 3183fcd08f7a7d85bc1af0b9327724c911770ca4 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Fri, 21 Apr 2023 17:03:14 +0200
Subject: [PATCH 3/5] Remove emacs script on upgrade. Closes: #1032687
---
debian/changelog | 2 ++
debian/pylint.conffiles | 1 +
2 files changed, 3 insertions(+)
create mode 100644 debian/pylint.conffiles
diff --git a/debian/changelog b/debian/changelog
index 99988e2..fad9b7a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ pylint (2.16.2-3) UNRELEASED; urgency=medium
now that pylint-doc installs to /usr/share/doc/pylint/.
Separate files may help transitions like acafec41.
- Remove dh_missing override. With debhelper 13, it repeats the default.
+ * debian/pylint.conffiles
+ - let dpkg remove-on-upgrade the emacs script. Closes: #1032687.
-- Sandro Tosi <[email protected]> Fri, 21 Apr 2023 01:04:13 +0200
diff --git a/debian/pylint.conffiles b/debian/pylint.conffiles
new file mode 100644
index 0000000..df6221f
--- /dev/null
+++ b/debian/pylint.conffiles
@@ -0,0 +1 @@
+remove-on-upgrade /etc/emacs/site-start.d/50pylint.el
--
2.39.2
>From 680cf732dddee421548a9cf2740543521f197c6a Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Fri, 21 Apr 2023 17:23:58 +0200
Subject: [PATCH 4/5] Look for DEB_BUILD_OPTIONS=nodoc in debian/rules
---
debian/changelog | 1 +
debian/rules | 2 ++
2 files changed, 3 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index fad9b7a..990a77d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ pylint (2.16.2-3) UNRELEASED; urgency=medium
now that pylint-doc installs to /usr/share/doc/pylint/.
Separate files may help transitions like acafec41.
- Remove dh_missing override. With debhelper 13, it repeats the default.
+ - Respect DEB_BUILD_OPTIONS=nodoc.
* debian/pylint.conffiles
- let dpkg remove-on-upgrade the emacs script. Closes: #1032687.
diff --git a/debian/rules b/debian/rules
index 8a4948c..0b56a5d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,7 +22,9 @@ export PYBUILD_BEFORE_INSTALL=rm -rf {build_dir}/classes.dot
override_dh_auto_build:
dh_auto_build
+ ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
PATH=$(CURDIR):$$PATH $(MAKE) -C doc build-html PYTHONPATH=$(CURDIR) PYTHON=python3
+ endif
override_dh_compress:
dh_compress -i -X.py -X.ini -X.xml -Xtest
--
2.39.2
>From 3e7b5a338b9de37c96ae6f967e7543cc731e9280 Mon Sep 17 00:00:00 2001
From: Nicolas Boulenguez <[email protected]>
Date: Fri, 21 Apr 2023 17:34:16 +0200
Subject: [PATCH 5/5] Add a clean target to debian/rules
---
debian/changelog | 1 +
debian/clean | 3 +++
debian/rules | 4 ++++
3 files changed, 8 insertions(+)
create mode 100644 debian/clean
diff --git a/debian/changelog b/debian/changelog
index 990a77d..b7df39c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ pylint (2.16.2-3) UNRELEASED; urgency=medium
Separate files may help transitions like acafec41.
- Remove dh_missing override. With debhelper 13, it repeats the default.
- Respect DEB_BUILD_OPTIONS=nodoc.
+ - Add a clean target and a debian/clean file.
* debian/pylint.conffiles
- let dpkg remove-on-upgrade the emacs script. Closes: #1032687.
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..745cf04
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,3 @@
+.pybuild/
+build/
+pylint.egg-info/
diff --git a/debian/rules b/debian/rules
index 0b56a5d..8afb9c7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -26,5 +26,9 @@ override_dh_auto_build:
PATH=$(CURDIR):$$PATH $(MAKE) -C doc build-html PYTHONPATH=$(CURDIR) PYTHON=python3
endif
+override_dh_auto_clean:
+ find . -name __pycache__ -a -type d -print0 | xargs -r0 rm -fr
+ $(MAKE) -Cdoc clean
+
override_dh_compress:
dh_compress -i -X.py -X.ini -X.xml -Xtest
--
2.39.2