From: Frank LENORMAND <lenormf.ml@gmail.com>
To: David Bremner <david@tethera.net>,
Floris Bruynooghe <flub@devork.be>,
notmuch@notmuchmail.org
Subject: Re: [python-cffi] Version number for the `notmuch2` bindings
Date: Fri, 19 Jun 2020 12:35:17 +0300 [thread overview]
Message-ID: <159255931749.2284556.2077282078602585790@localhost.localdomain> (raw)
In-Reply-To: <87r1ubcsmb.fsf@powell.devork.be>
On Fri Jun 19 12:27:56 2020, Floris Bruynooghe wrote:
> On Thu 18 Jun 2020 at 16:56 -0300, David Bremner wrote:
> > Frank LENORMAND <lenormf.ml@gmail.com> writes:
> >> The original Python bindings follow the entire repository's version
> >> number[1]. The new Python bindings use `0.1`[2].
> >>
> >> The Debian package[3] follows the same version number as well, but
> >> it's starting to confuse maintainers of packages for other environments
> >> (e.g. Pypi[4]), who use `0.1` because that's what's in the code.
> >
> > Floris might have some good reason in mind for the divergence. I will
> > say it's a pain in Debian to have different binary packages (.deb's)
> > built from the same source with different version numbers. So I'd need
> > to be convinced.
>
> There is no good reason, it was overlooked when merging the cffi
> bindings into notmuch proper.
>
> Is there any reason we can not directly read the toplevel version file
> from inside setup.py instead of having to add sed hackery?
Good to know!
The `notmuch` bindings use the following snippet:
```
[…]
25 # get the notmuch version number without importing the notmuch module
26 version_file = os.path.join(os.path.dirname(__file__),
27 'notmuch', 'version.py')
28 exec(compile(open(version_file).read(), version_file, 'exec'))
29 assert '__VERSION__' in globals(), \
30 'Failed to read the notmuch binding version number'
31
32 setup(name='notmuch',
33 version=__VERSION__,
[…]
```
I reckon copying/pasting the above in to the `notmuch2` bindings `setup.py`
file will work.
Regards,
--
Frank LENORMAND
prev parent reply other threads:[~2020-06-19 9:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-18 15:09 [python-cffi] Version number for the `notmuch2` bindings Frank LENORMAND
2020-06-18 19:56 ` David Bremner
2020-06-19 9:27 ` Floris Bruynooghe
2020-06-19 9:35 ` Frank LENORMAND [this message]
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=159255931749.2284556.2077282078602585790@localhost.localdomain \
--to=lenormf.ml@gmail.com \
--cc=david@tethera.net \
--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).