unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Frank LENORMAND <lenormf.ml@gmail.com>
To: Floris Bruynooghe <flub@devork.be>, notmuch@notmuchmail.org
Subject: Re: [PATCH] python-cffi: read version from notmuch version file
Date: Fri, 19 Jun 2020 15:26:13 +0300	[thread overview]
Message-ID: <159256957312.2284556.9348455868725621819@localhost.localdomain> (raw)
In-Reply-To: <20200619094627.360612-2-flub@devork.be>

On Fri Jun 19 12:46:28 2020, Floris Bruynooghe wrote:
> This keeps it in sync with the main notmuch version which is less
> confusing to users.
> ---
>  bindings/python-cffi/setup.py | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/bindings/python-cffi/setup.py b/bindings/python-cffi/setup.py
> index 37918e3d..1effcfc6 100644
> --- a/bindings/python-cffi/setup.py
> +++ b/bindings/python-cffi/setup.py
> @@ -1,9 +1,17 @@
> +import pathlib
> +
>  import setuptools
>  
>  
> +THIS_FILE = pathlib.Path(__file__).absolute()
> +PROJECT_ROOT = THIS_FILE.parent.parent.parent
> +with open(PROJECT_ROOT.joinpath('version')) as fp:
> +    VERSION = fp.read().strip()
> +
> +
>  setuptools.setup(
>      name='notmuch2',
> -    version='0.1',
> +    version=VERSION,
>      description='Pythonic bindings for the notmuch mail database using CFFI',
>      author='Floris Bruynooghe',
>      author_email='flub@devork.be',
> -- 
> 2.27.0

It seems that this strategy doesn't work well when the user runs
`pip install .` in the `bindings/python-cffi` directory.

Apparently all the files are copied to a temporary directory first:

https://travis-ci.com/github/pazz/alot/jobs/351377760#L708-L710

It doesn't happen with the original bindings, probably because the version
number is stored in `bindings/python/notmuch/version.py`, which is also
copied when `pip` runs.

Regards,
-- 
Frank LENORMAND

  parent reply	other threads:[~2020-06-19 12:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19  9:46 python-cffi: read version number from notmuch Floris Bruynooghe
2020-06-19  9:46 ` [PATCH] python-cffi: read version from notmuch version file Floris Bruynooghe
2020-06-19 10:20   ` David Bremner
2020-06-19 10:50     ` Floris Bruynooghe
2020-06-19 12:26   ` Frank LENORMAND [this message]
2020-06-22 21:45     ` Floris Bruynooghe
2020-06-23  5:24       ` Frank LENORMAND
2020-06-23  9:33         ` David Bremner
2020-06-23 10:43           ` Frank LENORMAND
2020-06-23 21:16             ` Floris Bruynooghe
2020-06-24  6:29               ` Frank LENORMAND

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=159256957312.2284556.9348455868725621819@localhost.localdomain \
    --to=lenormf.ml@gmail.com \
    --cc=flub@devork.be \
    --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).