unofficial mirror of notmuch@notmuchmail.org
 help / color / Atom feed
* [python-cffi] Version number for the `notmuch2` bindings
@ 2020-06-18 15:09 Frank LENORMAND
  2020-06-18 19:56 ` David Bremner
  0 siblings, 1 reply; 4+ messages in thread
From: Frank LENORMAND @ 2020-06-18 15:09 UTC (permalink / raw)
  To: notmuch

Hi,

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.

Which one is it?

Thanks!

[1] https://git.notmuchmail.org/git?p=notmuch;a=blob;f=bindings/python/setup.py;h=d986f0c6651ee14ef9b4607b7668b82acde7fbdc;hb=HEAD#l33
[2] https://git.notmuchmail.org/git?p=notmuch;a=blob;f=bindings/python-cffi/setup.py;h=37918e3d2cdb3b7bcf0a3e3db860bfab5bd1b0db;hb=HEAD#l6
[3] https://packages.debian.org/en/experimental/main/python3-notmuch2
[4] https://github.com/weilbith/notmuch-python-bindings/issues/1#issuecomment-646054040

Regards,
-- 
Frank LENORMAND

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [python-cffi] Version number for the `notmuch2` bindings
  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
  0 siblings, 1 reply; 4+ messages in thread
From: David Bremner @ 2020-06-18 19:56 UTC (permalink / raw)
  To: Frank LENORMAND, notmuch

Frank LENORMAND <lenormf.ml@gmail.com> writes:

> Hi,
>
> 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.
>

Since I'm (also) the Debian maintainer, I guess you know my view
already. I don't really see the need for an extra version number for the
cffi bindings. I'd be happy to provide the same kind sed hackery to keep
the two in sync as is done for the old bindings.

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [python-cffi] Version number for the `notmuch2` bindings
  2020-06-18 19:56 ` David Bremner
@ 2020-06-19  9:27   ` Floris Bruynooghe
  2020-06-19  9:35     ` Frank LENORMAND
  0 siblings, 1 reply; 4+ messages in thread
From: Floris Bruynooghe @ 2020-06-19  9:27 UTC (permalink / raw)
  To: David Bremner, Frank LENORMAND, notmuch

On Thu 18 Jun 2020 at 16:56 -0300, David Bremner wrote:

> Frank LENORMAND <lenormf.ml@gmail.com> writes:
>
>> Hi,
>>
>> 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?

Cheers,
Floris

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [python-cffi] Version number for the `notmuch2` bindings
  2020-06-19  9:27   ` Floris Bruynooghe
@ 2020-06-19  9:35     ` Frank LENORMAND
  0 siblings, 0 replies; 4+ messages in thread
From: Frank LENORMAND @ 2020-06-19  9:35 UTC (permalink / raw)
  To: David Bremner, Floris Bruynooghe, notmuch

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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