[Python-modules-commits] [terminaltables] 02/02: Install the changelog section of the README

Carl Suster arcresu-guest at moszumanska.debian.org
Sun Jan 8 13:20:43 UTC 2017


This is an automated email from the git hooks/post-receive script.

arcresu-guest pushed a commit to branch master
in repository terminaltables.

commit a8cd4badf88d29a6fdc6067fbb63c64f5f2b4e15
Author: Carl Suster <carl at contraflo.ws>
Date:   Mon Jan 9 00:17:48 2017 +1100

    Install the changelog section of the README
    
    Previously a useless rst include directive was installed as the upstream
    changelog instead. The script to do this is a bit brittle but should
    work fine until upstream changes the way they present the changelog.
---
 debian/clean |  1 +
 debian/rules | 10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/debian/clean b/debian/clean
index 739fbc2..10ecb87 100644
--- a/debian/clean
+++ b/debian/clean
@@ -1,2 +1,3 @@
 *.egg-info/*
 .cache/
+debian/upstream-changelog
diff --git a/debian/rules b/debian/rules
index c8d4357..f41263a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,3 +17,13 @@ endif
 
 override_dh_compress:
 	dh_compress -X example1.py -X example2.py -X example3.py
+
+override_dh_installchangelogs:
+	# Trim the changelog section out of the README file. Note that this will
+	# hang if the changelog-section-{start,end} strings don't appear exactly as
+	# they are in the README file.
+	python3 -c "with open('README.rst') as r: print(''.join( \
+		['' for x in iter(r.readline, '.. changelog-section-start\n')] + \
+		[x  for x in iter(r.readline, '.. changelog-section-end\n')]))" \
+			> debian/upstream-changelog
+	dh_installchangelogs debian/upstream-changelog

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/terminaltables.git



More information about the Python-modules-commits mailing list