From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YDBYNVcLfGHAbQEAgWs5BA (envelope-from ) for ; Fri, 29 Oct 2021 16:55:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id YK7eMFcLfGF2LAAAbx9fmQ (envelope-from ) for ; Fri, 29 Oct 2021 14:55:19 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 03F282D258 for ; Fri, 29 Oct 2021 16:55:19 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 608C81FAA2; Fri, 29 Oct 2021 10:55:14 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 2CC3A1FAA1 for ; Fri, 29 Oct 2021 10:55:05 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 68D965FC42; Fri, 29 Oct 2021 10:55:04 -0400 (EDT) Received: (nullmailer pid 563499 invoked by uid 1000); Fri, 29 Oct 2021 14:55:03 -0000 From: David Bremner To: Michael J Gruber , notmuch@notmuchmail.org Subject: [PATCH] doc/python-cffi: import from built bindings, not installed module Date: Fri, 29 Oct 2021 11:54:59 -0300 Message-Id: <20211029145459.563484-1-david@tethera.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: R4COKVZHLQBLVSQME34RYFNCJF5RPLG3 X-Message-ID-Hash: R4COKVZHLQBLVSQME34RYFNCJF5RPLG3 X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1635519319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=RF+n+fYHZhD/PjlLVzyHU7cFT/sK+9TS+PpXt1MUnls=; b=OVW1in15+cOrjLN8lo1eKxVnhAhtbFCYfd8gga4rRYCO8m1HP1cKPbrEmyQAezN6vJQxNN aBGmm5FCdw8hgGFzIfTr4L6T1lTjbPHxw1hX3c6tIHEsShcJHk4UL8auimuAEycQJULPUv p3MiAu5IhKj6Cn9uqUBbmmU0RMEodt0HDZt11uvuTKfBbjQYsV0Wapt4tYYsqqAAeANxIb WMW4vfo6ymNcr0JD3KOd0dLwby5R2PqzwfGQV72dTwke55NXRgmSE+O0su7z632VXcgk4+ bj9PEFwM8jT8d1NdmWoPbJ9xG9m8s+nh25ZyGYge5tOlILVE9R1OMhK53UqqjA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635519319; a=rsa-sha256; cv=none; b=dj10d4yIajvGA3tl30VmOnHs4XgM+zDO06eIv9HBtXYHjoaXJwIoAjjQ8P3oFzHRmiMk5L TDg2vA+XOIE5nmM+Nl3bMg/rJ0VHfBks+JrQamB7Id2u3zryrBiGlZthA6IQCsjuRotDU1 OURhV0v1JIdtoycT3MhX/pZKNa78jVThp/ExBpdWYsbCt9KCVlXHvg6s2bCUioby0vOc5V TT8ldFxOomqy+8tYUiWTCMj5TnZr8b9xXZ9pWtoOUyQXeZpfZNPEEhBcVOaGMt58Xt1OZk IeR3uuotXwSUawqjPqefR9tdtYtUxtYfCmxHgNqEhmERTe8+LbTTvL+dJAUuZg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.13 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 03F282D258 X-Spam-Score: -1.13 X-Migadu-Scanner: scn0.migadu.com X-TUID: BW1olnASlXWF Previously the python-cffi bindings either failed to build, or built for the wrong module by using the installed module. The fix requires correction the module path, building the bindings before docs, and helping python find the built libnotmuch. Based on patch / discussion from Micheal Gruber [1] [1]: id:cover.1634808719.git.git@grubix.eu --- doc/Makefile.local | 12 ++++++++---- doc/conf.py | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/Makefile.local b/doc/Makefile.local index f476d1da..730ad4fb 100644 --- a/doc/Makefile.local +++ b/doc/Makefile.local @@ -4,7 +4,7 @@ dir := doc # You can set these variables from the command line. SPHINXOPTS := -q -SPHINXBUILD = sphinx-build +SPHINXBUILD = env LD_LIBRARY_PATH=${NOTMUCH_BUILDDIR}/lib sphinx-build DOCBUILDDIR := $(dir)/_build # Internal variables. @@ -35,7 +35,7 @@ endif INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info) -.PHONY: sphinx-html sphinx-texinfo sphinx-info +.PHONY: sphinx-html sphinx-texinfo sphinx-info doc-prereqs .PHONY: install-man build-man apidocs install-apidocs @@ -46,15 +46,19 @@ ifeq ($(WITH_EMACS),1) $(DOCBUILDDIR)/.roff.stamp $(DOCBUILDDIR)/.html.stamp $(DOCBUILDDIR)/.texi.stamp : docstring.stamp endif +ifeq ($(HAVE_PYTHON3_CFFI),1) +doc-prereqs: python-cffi-bindings +endif + sphinx-html: $(DOCBUILDDIR)/.html.stamp -$(DOCBUILDDIR)/.html.stamp: $(ALL_RST_FILES) +$(DOCBUILDDIR)/.html.stamp: $(ALL_RST_FILES) doc-prereqs $(SPHINXBUILD) -b html -d $(DOCBUILDDIR)/html_doctrees $(ALLSPHINXOPTS) $(DOCBUILDDIR)/html touch $@ sphinx-texinfo: $(DOCBUILDDIR)/.texi.stamp -$(DOCBUILDDIR)/.texi.stamp: $(ALL_RST_FILES) +$(DOCBUILDDIR)/.texi.stamp: $(ALL_RST_FILES) doc-prereqs $(SPHINXBUILD) -b texinfo -d $(DOCBUILDDIR)/texinfo_doctrees $(ALLSPHINXOPTS) $(DOCBUILDDIR)/texinfo touch $@ 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