Re: [PATCH 4/5] debian: add python 3 bindings
authorTomi Ollila <tomi.ollila@iki.fi>
Wed, 16 Jan 2013 16:01:01 +0000 (18:01 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:53:08 +0000 (09:53 -0800)
e1/34662453a7322f142405f795471ca1683e588e [new file with mode: 0644]

diff --git a/e1/34662453a7322f142405f795471ca1683e588e b/e1/34662453a7322f142405f795471ca1683e588e
new file mode 100644 (file)
index 0000000..783ac7a
--- /dev/null
@@ -0,0 +1,179 @@
+Return-Path: <tomi.ollila@iki.fi>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 31D44431FBC\r
+       for <notmuch@notmuchmail.org>; Wed, 16 Jan 2013 08:01:17 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id PMXc5hY4ORXn for <notmuch@notmuchmail.org>;\r
+       Wed, 16 Jan 2013 08:01:13 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 8B9F5431FAE\r
+       for <notmuch@notmuchmail.org>; Wed, 16 Jan 2013 08:01:13 -0800 (PST)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+       by guru.guru-group.fi (Postfix) with ESMTP id 52D4C100045;\r
+       Wed, 16 Jan 2013 18:01:02 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: david@tethera.net, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 4/5] debian: add python 3 bindings\r
+In-Reply-To: <1358340262-16304-5-git-send-email-david@tethera.net>\r
+References: <1358340262-16304-1-git-send-email-david@tethera.net>\r
+       <1358340262-16304-5-git-send-email-david@tethera.net>\r
+User-Agent: Notmuch/0.14+260~gd7a61d6 (http://notmuchmail.org) Emacs/24.2.1\r
+       (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+       $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+       !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Wed, 16 Jan 2013 18:01:01 +0200\r
+Message-ID: <m2ehhlnmma.fsf@guru.guru-group.fi>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+Cc: David Bremner <bremner@debian.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 16 Jan 2013 16:01:17 -0000\r
+\r
+On Wed, Jan 16 2013, david@tethera.net wrote:\r
+\r
+> From: David Bremner <bremner@debian.org>\r
+>\r
+> This patch is due to Jakub Wilk <jwilk@debian.org>.\r
+>\r
+> It does add a build depend on python3 for people using the "make\r
+> debian-snapshot" target.\r
+> ---\r
+>  debian/changelog              |    4 +++-\r
+>  debian/control                |   14 ++++++++++++++\r
+>  debian/python-notmuch.install |    2 +-\r
+>  debian/rules                  |    5 +++++\r
+>  4 files changed, 23 insertions(+), 2 deletions(-)\r
+>\r
+> diff --git a/debian/changelog b/debian/changelog\r
+> index f4925a1..40b7695 100644\r
+> --- a/debian/changelog\r
+> +++ b/debian/changelog\r
+> @@ -4,8 +4,10 @@ notmuch (0.15~rc1-1) experimental; urgency=low\r
+>    * Change priority to optional (Closes: #687217).\r
+>    * Remove Dm-Upload-Allowed field, as this is no longer used by\r
+>      Debian.\r
+> +  * Add python3 bindings, thanks to Jakub Wilk (Closes:\r
+> +    #683515).\r
+>  \r
+> - -- David Bremner <bremner@debian.org>  Mon, 07 Jan 2013 21:40:52 -0400\r
+> + -- David Bremner <bremner@debian.org>  Wed, 16 Jan 2013 08:25:02 -0400\r
+>  \r
+>  notmuch (0.14-1) experimental; urgency=low\r
+>  \r
+> diff --git a/debian/control b/debian/control\r
+> index 75b55a5..5bb0d05 100644\r
+> --- a/debian/control\r
+> +++ b/debian/control\r
+> @@ -14,6 +14,7 @@ Build-Depends:\r
+>   libtalloc-dev,\r
+>   libz-dev,\r
+>   python-all (>= 2.6.6-3~),\r
+> + python3-all (>= 3.1.2-7~),\r
+>   emacs23-nox | emacs23 (>=23~) | emacs23-lucid (>=23~) |\r
+>   emacs24-nox | emacs24 (>=24~) | emacs24-lucid (>=24~),\r
+>   gdb,\r
+> @@ -75,6 +76,19 @@ Description: python interface to the notmuch mail search and index library\r
+>   This package provides a Python interface to the notmuch\r
+>   functionality, directly interfacing with a shared notmuch library.\r
+>  \r
+> +Package: python3-notmuch\r
+> +Architecture: all\r
+> +Section: python\r
+> +Depends: ${misc:Depends}, ${python3:Depends}, libnotmuch3\r
+> +Description: Python 3 interface to the notmuch mail search and index library\r
+> + Notmuch is a system for indexing, searching, reading, and tagging\r
+> + large collections of email messages in maildir or mh format. It uses\r
+> + the Xapian library to provide fast, full-text search with a very\r
+> + convenient search syntax.\r
+> + .\r
+> + This package provides a Python 3 interface to the notmuch\r
+> + functionality, directly interfacing with a shared notmuch library.\r
+> +\r
+>  Package: notmuch-emacs\r
+>  Architecture: all\r
+>  Section: mail\r
+> diff --git a/debian/python-notmuch.install b/debian/python-notmuch.install\r
+> index 607c065..b2cc136 100644\r
+> --- a/debian/python-notmuch.install\r
+> +++ b/debian/python-notmuch.install\r
+> @@ -1 +1 @@\r
+> -usr/lib/python*\r
+> +usr/lib/python2*\r
+> diff --git a/debian/rules b/debian/rules\r
+> index 8e30353..45e970a 100755\r
+> --- a/debian/rules\r
+> +++ b/debian/rules\r
+> @@ -1,5 +1,7 @@\r
+>  #!/usr/bin/make -f\r
+>  \r
+> +python3_all = py3versions -s | xargs -n1 | xargs -t -I {} env {}\r
+> +\r
+\r
+This could save 1-n fork/execve pairs (depending the number of outputs\r
+py3versions provides). Also IMHO this is a bit more self-evident:\r
+\r
+python3_all = py3versions -s | tr ' ' '\n' | xargs -t -I {} env {}\r
+\r
+All of the other (drop-in) replacements are more complex, like:\r
+\r
+python3_all = exec sh -c 'for cmd in `exec py3versions -s`; do $$cmd "$$@"' 0\r
+\r
+.. but this (untested version) uses least number of forks & execves.\r
+\r
+Still, maybe least amount of time wasted is to stick with\r
+the original ;) -- but by all means, play with the options\r
+if you wish to do so, I don't think Beijing air pollution\r
+situation will be any better ATM whatever you do ;)\r
+\r
+LGTM for rest of the series (too).\r
+\r
+Tomi\r
+\r
+>  %:\r
+>      dh $@ --with python2\r
+>  \r
+> @@ -9,13 +11,16 @@ override_dh_auto_configure:\r
+>  override_dh_auto_build:\r
+>      dh_auto_build\r
+>      dh_auto_build --sourcedirectory bindings/python\r
+> +    cd bindings/python && $(python3_all) setup.py build\r
+>      $(MAKE) -C contrib/notmuch-mutt\r
+>  \r
+>  override_dh_auto_clean:\r
+>      dh_auto_clean\r
+>      dh_auto_clean --sourcedirectory bindings/python\r
+> +    cd bindings/python && $(python3_all) setup.py clean -a\r
+>      $(MAKE) -C contrib/notmuch-mutt clean\r
+>  \r
+>  override_dh_auto_install:\r
+>      dh_auto_install\r
+>      dh_auto_install --sourcedirectory bindings/python\r
+> +    cd bindings/python && $(python3_all) setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp\r
+> -- \r
+> 1.7.10.4\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r