Re: [PATCH] debian: Add packaging for python3-notmuch2

Subject: Re: [PATCH] debian: Add packaging for python3-notmuch2

Date: Thu, 09 Jan 2020 12:12:55 -0500

To: Daniel Kahn Gillmor, Notmuch Mail

Cc:

From: Antoine Beaupré


On 2020-01-08 16:58:04, Daniel Kahn Gillmor wrote:
> On Mon 2019-12-23 17:17:22 -0500, Daniel Kahn Gillmor wrote:
>> Ship a new debian package for the notmuch2 CFFI-based Python interface
>> to notmuch.
>>
>> Unlike the notmuch python module, the new notmuch2 module is no longer
>> arch-independent, because it builds and ships a shared object in
>> addition to the python code.
>>
>> This patch encourages new downstream development to rely on notmuch2
>> instead of on notmuch, to get the benefits of the new module.
>>
>> I welcome any suggested improvements to this packaging, but it appears
>> to me to be sufficient to get "import notmuch2" to work and do some
>> basic tests.
>> ---
>>  debian/control | 24 +++++++++++++++++++++++-
>>  debian/rules   | 11 ++++++-----
>>  2 files changed, 29 insertions(+), 6 deletions(-)
>>
>> diff --git a/debian/control b/debian/control
>> index fb2b31c1..a1371fc8 100644
>> --- a/debian/control
>> +++ b/debian/control
>> @@ -98,6 +98,25 @@ Depends:
>>   libnotmuch5 (>= ${source:Version}),
>>   ${misc:Depends},
>>   ${python3:Depends},
>> +Description: Python 3 legacy interface to the notmuch mail search and index library
>> + Notmuch is a system for indexing, searching, reading, and tagging
>> + large collections of email messages in maildir or mh format. It uses
>> + the Xapian library to provide fast, full-text search with a very
>> + convenient search syntax.
>> + .
>> + This package provides a legacy Python 3 interface to the notmuch
>> + functionality, directly interfacing with a shared notmuch library.
>> + .
>> + New projects are encouraged to use python3-notmuch2 instead.
>> +
>> +Package: python3-notmuch2
>> +Architecture: any
>> +Section: python
>> +Depends:
>> + libnotmuch5 (>= ${source:Version}),
>> + ${misc:Depends},
>> + ${python3:Depends},
>> + ${shlibs:Depends},
>>  Description: Python 3 interface to the notmuch mail search and index library
>>   Notmuch is a system for indexing, searching, reading, and tagging
>>   large collections of email messages in maildir or mh format. It uses
>> @@ -105,7 +124,10 @@ Description: Python 3 interface to the notmuch mail search and index library
>>   convenient search syntax.
>>   .
>>   This package provides a Python 3 interface to the notmuch
>> - functionality, directly interfacing with a shared notmuch library.
>> + functionality using CFFI bindings, which interface with a shared
>> + notmuch library.
>> + .
>> + This is the preferred way to use notmuch via Python.
>>  
>>  Package: ruby-notmuch
>>  Architecture: any
>> diff --git a/debian/rules b/debian/rules
>> index bf9d0bbd..8de49d0f 100755
>> --- a/debian/rules
>> +++ b/debian/rules
>> @@ -1,7 +1,5 @@
>>  #!/usr/bin/make -f
>>  
>> -export PYBUILD_NAME=notmuch
>> -
>>  export DEB_BUILD_MAINT_OPTIONS = hardening=+all
>>  
>>  %:
>> @@ -19,17 +17,20 @@ override_dh_auto_configure:
>>  
>>  override_dh_auto_build:
>>  	dh_auto_build -- V=1
>> -	dh_auto_build --buildsystem=pybuild --sourcedirectory bindings/python
>> +	PYBUILD_NAME=notmuch dh_auto_build --buildsystem=pybuild --sourcedirectory bindings/python
>> +	PYBUILD_NAME=notmuch2 dh_auto_build --buildsystem=pybuild --sourcedirectory bindings/python-cffi
>>  	$(MAKE) -C contrib/notmuch-mutt
>>  
>>  override_dh_auto_clean:
>>  	dh_auto_clean
>> -	dh_auto_clean --buildsystem=pybuild --sourcedirectory bindings/python
>> +	PYBUILD_NAME=notmuch dh_auto_clean --buildsystem=pybuild --sourcedirectory bindings/python
>> +	PYBUILD_NAME=notmuch2 dh_auto_clean --buildsystem=pybuild --sourcedirectory bindings/python-cffi
>>  	dh_auto_clean --sourcedirectory bindings/ruby
>>  	$(MAKE) -C contrib/notmuch-mutt clean
>>  
>>  override_dh_auto_install:
>>  	dh_auto_install
>> -	dh_auto_install --buildsystem=pybuild --sourcedirectory bindings/python
>> +	PYBUILD_NAME=notmuch dh_auto_install --buildsystem=pybuild --sourcedirectory bindings/python
>> +	PYBUILD_NAME=notmuch2 dh_auto_install --buildsystem=pybuild --sourcedirectory bindings/python-cffi
>>  	$(MAKE) -C contrib/notmuch-mutt DESTDIR=$(CURDIR)/debian/tmp install
>>  	dh_auto_install --sourcedirectory bindings/ruby
>> -- 
>
> Pinging on this patch as well.  If we want the notmuch2 python module to
> be used, we need to get it in wider distribution.  having it installable
> via "apt install python3-notmuch2" would be a good start.
>
> Note that making this change means that the notmuch package will pass
> through the NEW queue, which can take longer than we might like,
> depending on the Debian FTP team's available time.  I see this as an
> argument for making this change earlier, rather than later, though, so
> that the NEW queue doesn't trip us up if we have a more urgent change we
> want to see made later.

I don't of the merits of the two python libraries or how they compare. I
think i used the former (non-CFFI) version, and it worked fine. Assuming
we do want to migrate to the new one, it does seem important that we do
this change. I also agree on the NEW transition proposal.

Is the new library radically different from the older one?

What's the plan for the old one? Deprecation in bullseye and removal in
+1 kind of thing?

a.
-- 
Every one of us is, in the cosmic perspective, precious. If a human
disagrees with you, let him live. In a hundred billion galaxies, you
will not find another.   - Carl Sagan
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: