On Sat 2018-02-10 11:52:28 -0500, Daniel Kahn Gillmor wrote:
> Control: tags 875255 + patch
 […]
> I'm attaching a patch that completes the conversion.  it works for me,
> please feel free to adopt it :)

whoops, here is the patch.

        --dkg

>From ba1affa11e1d7e6379b005d94963a254824d1379 Mon Sep 17 00:00:00 2001
From: Daniel Kahn Gillmor <d...@fifthhorseman.net>
Date: Fri, 9 Feb 2018 16:02:03 -0500
Subject: [PATCH 1/1] convert to python3

Note that we are also patching publishconf.py to run with python3
---
 debian/control                                     | 38 +++++++++++-----------
 ...publishconf.py-should-be-run-with-python3.patch | 20 ++++++++++++
 debian/patches/series                              |  1 +
 debian/py3dist-overrides                           |  8 +++++
 debian/pydist-overrides                            |  8 -----
 debian/rules                                       |  2 +-
 6 files changed, 49 insertions(+), 28 deletions(-)
 create mode 100644 debian/patches/0002-publishconf.py-should-be-run-with-python3.patch
 create mode 100644 debian/py3dist-overrides
 delete mode 100644 debian/pydist-overrides

diff --git a/debian/control b/debian/control
index c638b80..0187361 100644
--- a/debian/control
+++ b/debian/control
@@ -6,20 +6,20 @@ Uploaders: Ondřej Surý <ond...@debian.org>, Vincent Cheng <vch...@debian.org>
 Build-Depends:
  debhelper (>= 9),
  dh-python,
- python-all (>= 2.6.6-3),
- python-blinker,
- python-dateutil,
- python-docutils,
- python-feedgenerator,
- python-jinja2 (>= 2.7),
- python-pygments,
- python-setuptools (>= 0.6b3),
- python-six (>= 1.4),
- python-sphinx,
- python-tz,
- python-unidecode
+ python3-all (>= 3.3~),
+ python3-blinker,
+ python3-dateutil,
+ python3-docutils,
+ python3-feedgenerator,
+ python3-jinja2 (>= 2.7),
+ python3-pygments,
+ python3-setuptools (>= 0.6b3),
+ python3-six (>= 1.4),
+ python3-sphinx,
+ python3-tz,
+ python3-unidecode
 Standards-Version: 4.0.1
-X-Python-Version: >= 2.7
+X-Python3-Version: >= 3.3
 Homepage: http://getpelican.com/
 Vcs-Svn: svn://anonscm.debian.org/python-apps/packages/pelican/trunk/
 Vcs-Browser: https://anonscm.debian.org/viewvc/python-apps/packages/pelican/trunk/
@@ -27,14 +27,14 @@ Vcs-Browser: https://anonscm.debian.org/viewvc/python-apps/packages/pelican/trun
 Package: pelican
 Architecture: all
 Depends:
- python-argparse | python (>= 2.7),
- python-markdown,
- python-pkg-resources,
+ python3 (>= 3.3~),
+ python3-markdown,
+ python3-pkg-resources,
  ${misc:Depends},
- ${python:Depends}
+ ${python3:Depends}
 Suggests:
  pandoc,
- python-bs4,
+ python3-bs4,
  pelican-doc
 Breaks:
  python-pelican (<< 3.6.0-2~)
@@ -53,7 +53,7 @@ Architecture: all
 Section: doc
 Depends:
  ${misc:Depends},
- ${python:Depends},
+ ${python3:Depends},
  ${sphinxdoc:Depends}
 Suggests:
  pelican
diff --git a/debian/patches/0002-publishconf.py-should-be-run-with-python3.patch b/debian/patches/0002-publishconf.py-should-be-run-with-python3.patch
new file mode 100644
index 0000000..e84018a
--- /dev/null
+++ b/debian/patches/0002-publishconf.py-should-be-run-with-python3.patch
@@ -0,0 +1,20 @@
+From: Daniel Kahn Gillmor <d...@fifthhorseman.net>
+Date: Fri, 9 Feb 2018 16:36:14 -0500
+Subject: publishconf.py should be run with python3
+
+This is part of the conversion of the debian pelican packaging to use
+only python3.
+---
+ pelican/tools/templates/publishconf.py.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pelican/tools/templates/publishconf.py.in b/pelican/tools/templates/publishconf.py.in
+index d1ed994..e628a7a 100755
+--- a/pelican/tools/templates/publishconf.py.in
++++ b/pelican/tools/templates/publishconf.py.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # -*- coding: utf-8 -*- #
+ from __future__ import unicode_literals
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 2eb61e0..2e81397 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 default_theme.patch
+0002-publishconf.py-should-be-run-with-python3.patch
diff --git a/debian/py3dist-overrides b/debian/py3dist-overrides
new file mode 100644
index 0000000..ce7f8b0
--- /dev/null
+++ b/debian/py3dist-overrides
@@ -0,0 +1,8 @@
+feedgenerator python3-feedgenerator (>= 1.6)
+jinja2 python3-jinja2 (>= 2.7)
+pygments python3-pygments
+docutils python3-docutils
+blinker python3-blinker
+unidecode python3-unidecode
+six python3-six (>= 1.4)
+pytz python3-tz
diff --git a/debian/pydist-overrides b/debian/pydist-overrides
deleted file mode 100644
index 7be32c3..0000000
--- a/debian/pydist-overrides
+++ /dev/null
@@ -1,8 +0,0 @@
-feedgenerator python-feedgenerator (>= 1.6)
-jinja2 python-jinja2 (>= 2.7)
-pygments python-pygments
-docutils python-docutils
-blinker python-blinker
-unidecode python-unidecode
-six python-six (>= 1.4)
-pytz python-tz
diff --git a/debian/rules b/debian/rules
index 6521d2e..0c9c46a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,7 +5,7 @@
 export PYBUILD_AFTER_INSTALL = rm -rf {destdir}/{install_dir}/pelican/tests
 
 %:
-	dh $@ --with python2,sphinxdoc  --buildsystem=pybuild
+	dh $@ --with python3,sphinxdoc  --buildsystem=pybuild
 
 override_dh_clean:
 	dh_clean
-- 
2.15.1

Reply via email to