This gives some additional access to debugging information when using
the python bindings.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
This is supposed to help build on systems like MacOS with different
conventions for naming shared libraries. We have already computed the
relevant names, so doing it again in ruby seems like a bad idea.
Because ruby generates a Makefile, we have to use recursive make.
Because mkmf.rb hardcodes the name Makefile, put our Makefile{.local}
in the parent directory.
Failing to update this string in globals.py causes failures when the
SONAME changes. In order to hopefully reduce the number of such
errors, automate the process of setting the SONAME in the python
bindings.
This should have happened in commit 6754ad9f9, but oops.
This was not caught by our test suite because it uses an installed
notmuch library of it cannot find the just built one.
Also bump the python bindings version, the NEWS version and the Debian
version.
Since the changelog is (slightly dubiously) metadata, we have to
change it to upload a release candidate.
html_static_path is a kind of source directory and it was set to
destination directory (../html) which caused infinite recursion with
Sphinx 1.2 and above.
Roll (one last?) release candidate because of Austin's
LIBNOTMUCH_VERSION changes.
Atomically bump the manually (NEWS, debian/changelog) and
automatically (everywhere else) updated places version is mentioned.
Currently it simply finds any library available, and if notmuch is
installed in the system, it would give priority to that library.
Let's implement our own helper functions to link directly to the local
library, and give priority to the local header file.
Also, add an option to properly check if there are missing symbols.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
It has never existed in Ruby (maybe JRuby). Fortunately the symbols are
loaded lazily, so nobody would notice unless they try
'query::count_messages'.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
The notmuch-addrlookup utility uses a third party library to read the
notmuch configuration file. The previously used implementation at
"github.com/kless/goconfig" vanished, so this patch switches to the
implementation at "github.com/msbranco/goconfig". As the
implementations differ at the API level, the code is updated
accordingly.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Remove the superfluous mode argument given to notmuch_database_create
fixing the creation of notmuch databases using python code.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Removes Message.{format,print}_messages.
This code adds functionality at the python level that is unlikely to
be useful for anyone. Furthermore the python bindings strive to be a
thin wrapper around libnotmuch. The code has been marked as deprecated
in 0.14 and is now removed.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Some C compilers are stricter when it comes to (tentative) definition
of a variable -- in those compilers introducing variable without 'extern'
keyword always allocates new 'storage' to the variable and linking all
these modules fails due to duplicate symbols.
This is reimplementation of Charlie Allom's patch:
id:"1336481467-66356-1-git-send-email-charlie@mediasp.com",
written originally by Ali Polatel. This version has
more accurate commit message.
This reverts commit 82b73ffd73.
Only leave the copyright changes.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
(cherry picked from commit 35cb1c95cc)
Now that notmuch_database_find_message_by_filename works on read-only
databases, remove the workaround that disabled it on read-write
databases.
This also adds a regression test for find_message_by_filename.
notmuch_database_get_directory no longer returns an error for
read-only databases, so remove ReadOnlyDatabaseError from the list of
get_directory exceptions.
This code adds functionality at the python level that is unlikely to
be useful for anyone. Furthermore the python bindings strive to be a
thin wrapper around libnotmuch, so this code will be removed in
notmuch 0.15.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
8dc8495010 introduced a bug, if the
requested header is not set the underlying notmuch function returns an
empty string that also made the expression true resulting in an
exception being raised. Partly revert the commit to fix this
issue. Testing for equality with None is correct in this case since
the restype of the function Message._get_header is c_char_p so NULL
pointers are in fact converted to None in this case.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Removes Message.format_message_{internal,as_json,as_text}.
This code adds functionality at the python level that is unlikely to
be useful for anyone. Furthermore the python bindings strive to be a
thin wrapper around libnotmuch. The code has been marked as deprecated
in 0.13 and is now removed.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Removes notmuch.py. If someone wants to step up and work on this it
can always be restored using the version control system.
notmuch.py was meant to be a python implementation of the notmuch
utility. It was never finished and hasn't been updated to changes in
the API and bindings and its features and interface haven't been kept
in sync with the notmuch utility.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
notmuch_database_get_directory now returns
NOTMUCH_STATUS_READ_ONLY_DATABASE on its own (rather than crashing) so
the workaround in Database.get_directory is no longer necessary.
The new "go" utility does not require any Makefiles to compile go
packages and programs. Remove the old Makefiles and replace the top
level Makefile with one defining some convenience targets for
compiling the notmuch bindings and the notmuch-addrlookup utility.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Use the new built in error type that replaces os.Error, adapt the code
to the fact that strings.Split has just two arguments now.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Set the LDFLAGS to -lnotmuch so the resulting go package will be
linked with libnotmuch.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>