unofficial mirror of notmuch@notmuchmail.org
 help / color / Atom feed
From: Floris Bruynooghe <flub@devork.be>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: [PATCH 2/2] bindings/python-cffi: update version from global version.
Date: Mon, 29 Jun 2020 23:02:36 +0200
Message-ID: <87wo3py49f.fsf@powell.devork.be> (raw)
In-Reply-To: <87zh8rmfqj.fsf@tethera.net>

On Thu 25 Jun 2020 at 10:34 -0300, David Bremner wrote:

> David Bremner <david@tethera.net> writes:
>
>> Copy machinery from the older python bindings
>
>>  
>> +# get the notmuch version number without importing the notmuch module
>> +version_file = os.path.join(os.path.dirname(__file__),
>> +                            'notmuch2', 'version.py')
>> +exec(compile(open(version_file).read(), version_file, 'exec'))
>> +assert '__VERSION__' in globals(), \
>> +    'Failed to read the notmuch binding version number'
>
> I wrote a cover letter for this, but that seems to have gotten lost. My
> main point was I'm not sure why this is better than Floris's version,
> since they both read a file when setup.py is run. I don't understand (or
> use) pip, so someone else will have to figure this out. If the
> constraint is that the version has to be hardcoded in setup.py then (as
> much as that sounds like a design mistake), we can apply similar sed
> hackery directly to setup.py. Perhaps someone can remember why we didn't
> do that for the old python bindings.

For some reason this is the only mail in this thread I have, so I don't
actually know the patch.

I think it can be simpler though, is it possible to copy the toplevel
version file into bindings/python-cffi/version in the part of the build
that would otherwise do the sed magic?  Then setup.py only needs to look
for the version file in the same directory as itself instead of finding
the toplevel of the repo.

  reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200625110045.208558-1-david@tethera.net>
2020-06-25 11:00 ` [PATCH 1/2] Revert "python-cffi: read version from notmuch version file" David Bremner
2020-06-25 11:00 ` [PATCH 2/2] bindings/python-cffi: update version from global version David Bremner
2020-06-25 13:34   ` David Bremner
2020-06-29 21:02     ` Floris Bruynooghe [this message]
2020-06-30  0:22       ` [PATCH] bindings/python-cffi: copy version file into bindings dir David Bremner
2020-07-03 11:37         ` 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=87wo3py49f.fsf@powell.devork.be \
    --to=flub@devork.be \
    --cc=david@tethera.net \
    --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

unofficial mirror of notmuch@notmuchmail.org

Archives are clonable:
	git clone --mirror https://yhetil.org/notmuch/0 notmuch/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 notmuch notmuch/ https://yhetil.org/notmuch \
		notmuch@notmuchmail.org
	public-inbox-index notmuch

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.mail.notmuch.general
	nntp://news.gmane.io/gmane.mail.notmuch.general


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git