From 02e9026e646f6e72d635f253ad4b14a55879d9d1 Mon Sep 17 00:00:00 2001 From: Matthias Urlichs Date: Fri, 3 Jul 2020 08:20:16 +0200 Subject: [PATCH] Add support for debian/watch --- stdeb/util.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/stdeb/util.py b/stdeb/util.py index 49f37b68..974e388f 100644 --- a/stdeb/util.py +++ b/stdeb/util.py @@ -1346,6 +1346,14 @@ def build_dsc(debinfo, fd.write('3.0 (quilt)\n') fd.close() + # K. debian/watch + with open(os.path.join(debian_dir, 'watch'), mode='w') as fd: + fd.write(('# please also check http://pypi.debian.net/{name}/watch\n' + 'version=3\n' + 'opts=uversionmangle=s/(rc|a|b|c)/~$1/ \\\n' + 'http://pypi.debian.net/{name}/{name}-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))').\ + format(name=debinfo.module_name)) + if debian_dir_only: return