unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* python CFFI bindings integration into notmuch build/test
@ 2019-11-04  1:39 David Bremner
  2019-11-04  1:39 ` [PATCH 1/5] bindings/python-cffi: preserve environment for tests David Bremner
                   ` (6 more replies)
  0 siblings, 7 replies; 32+ messages in thread
From: David Bremner @ 2019-11-04  1:39 UTC (permalink / raw)
  To: notmuch

This series is on top of a slightly modified version [1] of

     id:20191008210312.20685-2-flub@devork.be

If you want to try out the new bindings, you can try the branch wip/cffi in the repo
https://git.notmuchmail.org/git/notmuch

One current annoyance is that the version of pytest on travis is too
old for what is specified in tox.ini.

[1]: the diff is as follows.

diff --git a/bindings/python-cffi/notdb/_build.py b/bindings/python-cffi/notdb/_build.py
index 97ad7808..6be7e5b1 100644
--- a/bindings/python-cffi/notdb/_build.py
+++ b/bindings/python-cffi/notdb/_build.py
@@ -13,6 +13,8 @@ ffibuilder.set_source(
         #error libnotmuch version not supported by notdb
     #endif
     """,
+    include_dirs=['../../lib'],
+    library_dirs=['../../lib'],
     libraries=['notmuch'],
 )
 ffibuilder.cdef(
diff --git a/bindings/python-cffi/tests/conftest.py b/bindings/python-cffi/tests/conftest.py
index 1b7bbc35..aa940947 100644
--- a/bindings/python-cffi/tests/conftest.py
+++ b/bindings/python-cffi/tests/conftest.py
@@ -5,6 +5,7 @@ import socket
 import subprocess
 import textwrap
 import time
+import os
 
 import pytest
 
@@ -32,10 +33,11 @@ def notmuch(maildir):
         """
         cfg_fname = maildir.path / 'notmuch-config'
         cmd = ['notmuch'] + list(args)
-        print('Invoking: {}'.format(' '.join(cmd)))
+        env = os.environ.copy()
+        env['NOTMUCH_CONFIG'] = str(cfg_fname)
         proc = subprocess.run(cmd,
                               timeout=5,
-                              env={'NOTMUCH_CONFIG': str(cfg_fname)})
+                              env=env)
         proc.check_returncode()
     return run

t

^ permalink raw reply related	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2020-05-22  1:06 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-04  1:39 python CFFI bindings integration into notmuch build/test David Bremner
2019-11-04  1:39 ` [PATCH 1/5] bindings/python-cffi: preserve environment for tests David Bremner
2019-11-04  1:39 ` [PATCH 2/5] configure: check for python cffi module David Bremner
2019-11-04 21:24   ` Tomi Ollila
2019-11-04  1:39 ` [PATCH 3/5] build: optionally build python-cffi bindings David Bremner
2019-11-04 21:26   ` Tomi Ollila
2019-11-05  0:32     ` David Bremner
2020-05-22  1:06     ` Daniel Kahn Gillmor
2019-11-04  1:39 ` [PATCH 4/5] tests: run python-cffi tests David Bremner
2019-11-04 16:18   ` Tomi Ollila
2019-11-04 16:57     ` David Bremner
2019-11-04 21:45   ` Tomi Ollila
2019-11-04 22:04     ` Tomi Ollila
2019-11-06  2:19     ` David Bremner
2019-11-06 20:51       ` Tomi Ollila
2019-11-09  1:36         ` David Bremner
2019-11-09 21:59           ` Tomi Ollila
2019-11-22  3:03             ` David Bremner
2019-11-26  0:52               ` David Bremner
2019-12-03 12:16                 ` David Bremner
2019-11-04  1:39 ` [PATCH 5/5] travis: add python3-{cffi,pytest,setuptools} David Bremner
2019-11-04 11:10 ` python CFFI bindings integration into notmuch build/test David Bremner
2019-11-05 20:47 ` Tomi Ollila
2019-11-06  2:22   ` David Bremner
2019-11-14 18:52     ` Floris Bruynooghe
2019-11-14 20:20       ` Tomi Ollila
2019-11-14 22:24         ` Floris Bruynooghe
2019-11-14 23:09           ` Floris Bruynooghe
2019-11-16 15:51             ` David Bremner
2019-11-17 14:40               ` Floris Bruynooghe
2019-11-17 16:09                 ` David Bremner
2019-11-16 15:43         ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).