unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Michael J Gruber <git@grubix.eu>
To: notmuch@notmuchmail.org
Subject: [WIP PATCH 1/1] autodoc: fix search path for notmuch2 module
Date: Thu, 21 Oct 2021 11:51:22 +0200	[thread overview]
Message-ID: <c88d16954fdb8066856650c4765c2598eee69fb6.1634808719.git.git@grubix.eu> (raw)
In-Reply-To: <cover.1634808719.git.git@grubix.eu>

a05da455 ("doc: add new python bindings to main documentation tree.", 2020-07-11)
added the path "bindings/python-cffi/notmuch2" to the search path for
autodoc. But the notmuch2 module cannot be imported from there - the dir
"is" the module, and it resides in "bindings/python-cffi" and in
"bindings/python-cffi/build/stage", with only the latter location having
the compiled capi part.

This goes unnoticed as long as you have notmuch2 in your standard search
path, but it means autodocs finds the wrong module, not the one one we
are building the doc against.

Fix the path so that the build tree module comes first.

Signed-off-by: Michael J Gruber <git@grubix.eu>
---
 doc/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/conf.py b/doc/conf.py
index 1fbd102b..c7fd8f5a 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -25,7 +25,7 @@ for pathdir in ['.', '..']:
             version=infile.read().replace('\n','')
 
 # for autodoc
-sys.path.insert(0, os.path.join(location, '..', 'bindings', 'python-cffi', 'notmuch2'))
+sys.path.insert(0, os.path.join(location, '..', 'bindings', 'python-cffi', 'build', 'stage'))
 
 # read generated config
 for pathdir in ['.', '..']:
-- 
2.33.0.1146.g7ac282475c

  reply	other threads:[~2021-10-21  9:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21  9:51 [WIP PATCH 0/1] autodoc failed to import notmuch2 Michael J Gruber
2021-10-21  9:51 ` Michael J Gruber [this message]
2021-10-21 12:20 ` David Bremner
2021-10-21 12:36   ` Michael J Gruber
2021-10-21 13:02     ` David Bremner
2021-10-29 14:54 ` [PATCH] doc/python-cffi: import from built bindings, not installed module David Bremner
2021-12-04 13:48   ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c88d16954fdb8066856650c4765c2598eee69fb6.1634808719.git.git@grubix.eu \
    --to=git@grubix.eu \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).