Re: Python3 cffi bindings
On Wed, Oct 14, 2020 at 10:24 PM Floris Bruynooghe wrote: > Hi Gaute, > > On Thu 08 Oct 2020 at 10:13 +0200, Gaute Hope wrote: > > I made another attempt at porting lieer to notmuch2, but I am missing the > > get_directory method still. Any plans to look at it? > > Would indeed be good to add this sometime. I'm still curious to how you > use it though to make sure we make a good API. I only found > > https://github.com/gauteh/lieer/blob/394d8c1a574fd57e63390e92a6e73363808ebac5/lieer/local.py#L280 > and it seems you only use the `.path` attribute. Is this correct or did > I miss anything? > That is correct, as well as relying on an exception if the input directory is not in the notmuch database. I also use `db.get_path()` to figure out the relative path w.r.t to the database root, for use in `path:` queries ( https://github.com/gauteh/lieer/blob/master/lieer/gmailieer.py#L315). Regards, Gaute ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: Python3 cffi bindings
On Fri, Oct 16, 2020 at 9:19 AM Gaute Hope wrote: > On Wed, Oct 14, 2020 at 10:24 PM Floris Bruynooghe wrote: > >> Hi Gaute, >> >> On Thu 08 Oct 2020 at 10:13 +0200, Gaute Hope wrote: >> > I made another attempt at porting lieer to notmuch2, but I am missing >> the >> > get_directory method still. Any plans to look at it? >> >> Would indeed be good to add this sometime. I'm still curious to how you >> use it though to make sure we make a good API. I only found >> >> https://github.com/gauteh/lieer/blob/394d8c1a574fd57e63390e92a6e73363808ebac5/lieer/local.py#L280 >> and it seems you only use the `.path` attribute. Is this correct or did >> I miss anything? >> > > That is correct, as well as relying on an exception if the input directory > is not in the notmuch database. I also use `db.get_path()` to figure out > the relative path w.r.t to the database root, for use in `path:` queries ( > https://github.com/gauteh/lieer/blob/master/lieer/gmailieer.py#L315). > > Re-read the rest of the old thread, and I think you are right that I only need to use `db.get_path()` to do what I need. So that makes this issue less critical for me I guess. -- gaute ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Dependencies should include "realpath"
Since this issue just came up related to my MacPorts port: The list of dependencies for notmuch should include "realpath". configure [1] relies on realpath to generate the value for rsti_dir. [1] https://git.notmuchmail.org/git?p=notmuch;a=blob;f=configure;h=40e8b2559e86b40985ef2c6dc142eb0104c3ddb6;hb=45193bab16c728ba892a5d45fc62ef59e2a6ef85#l1539 While Linux usually comes with realpath included, macOS does not, and I am not quite sure about BSD variants. -Ralph ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: Dependencies should include "realpath"
Ralph Seichter writes: > Since this issue just came up related to my MacPorts port: The list of > dependencies for notmuch should include "realpath". configure [1] relies > on realpath to generate the value for rsti_dir. > Do you have a suggested replacement? I guess some inline perl with "use Cwd 'realpath'" would probably work, although I haven't tested it. ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: Dependencies should include "realpath"
* David Bremner: > Do you have a suggested replacement? I guess some inline perl with "use > Cwd 'realpath'" would probably work, although I haven't tested it. At a quick glance, that particular section of "configure" is run by doc/conf.py to generate three lines of Python code and store the result as sphinx.config, correct? If so, my preferred choice would be to use Python to figure out the absolute path, e.g. like so: rsti_dir = os.path.abspath('emacs') This shows the generated result, and I assume that emacs is a directory in the source tree? I also wonder if an absolute directory path is really required for the doc-build to work. The segment of conf.py which uses the generated config file does not look convincing to me anyway. Apparently the original author did not like it either, which is why the segment is labelled as "hacky". It should probably be overhauled, and not only because it uses the statement open(rsti_dir+'/'+file) which will potentially fail, depending on the build platform. -Ralph ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org