unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [PATCH 2/2] bindings/python-cffi: update version from global version.
Date: Thu, 25 Jun 2020 08:00:45 -0300	[thread overview]
Message-ID: <20200625110045.208558-3-david@tethera.net> (raw)
In-Reply-To: <20200625110045.208558-1-david@tethera.net>

Copy machinery from the older python bindings
---
 Makefile.global                          | 1 +
 Makefile.local                           | 2 +-
 bindings/python-cffi/notmuch2/version.py | 3 +++
 bindings/python-cffi/setup.py            | 9 ++++++++-
 bindings/python/setup.py                 | 2 +-
 5 files changed, 14 insertions(+), 3 deletions(-)
 create mode 100644 bindings/python-cffi/notmuch2/version.py

diff --git a/Makefile.global b/Makefile.global
index 0aee5876..26d9491f 100644
--- a/Makefile.global
+++ b/Makefile.global
@@ -47,6 +47,7 @@ SHA256_FILE=$(TAR_FILE).sha256.asc
 DETACHED_SIG_FILE=$(TAR_FILE).asc
 
 PV_FILE=bindings/python/notmuch/version.py
+PV_FILE2=bindings/python-cffi/notmuch2/version.py
 
 # Smash together user's values with our extra values
 STD_CFLAGS := -std=gnu99
diff --git a/Makefile.local b/Makefile.local
index 586cdf75..4b9dd0be 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -53,7 +53,7 @@ dist: $(TAR_FILE)
 update-versions:
 	sed -i -e "s/^__VERSION__[[:blank:]]*=.*$$/__VERSION__ = \'${VERSION}\'/" \
 	    -e "s/^SOVERSION[[:blank:]]*=.*$$/SOVERSION = \'${LIBNOTMUCH_VERSION_MAJOR}\'/" \
-	    ${PV_FILE}
+	    ${PV_FILE} ${PV_FILE2}
 
 # We invoke make recursively only to force ordering of our phony
 # targets in the case of parallel invocation of make (-j).
diff --git a/bindings/python-cffi/notmuch2/version.py b/bindings/python-cffi/notmuch2/version.py
new file mode 100644
index 00000000..a5447027
--- /dev/null
+++ b/bindings/python-cffi/notmuch2/version.py
@@ -0,0 +1,3 @@
+# this file should be kept in sync with ../../../version
+__VERSION__ = '0.30~rc2'
+SOVERSION = '5'
diff --git a/bindings/python-cffi/setup.py b/bindings/python-cffi/setup.py
index 37918e3d..03649649 100644
--- a/bindings/python-cffi/setup.py
+++ b/bindings/python-cffi/setup.py
@@ -1,9 +1,16 @@
 import setuptools
+import os
 
+# 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'
 
 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',
diff --git a/bindings/python/setup.py b/bindings/python/setup.py
index d986f0c6..d4c5c844 100644
--- a/bindings/python/setup.py
+++ b/bindings/python/setup.py
@@ -24,7 +24,7 @@ from distutils.core import setup
 
 # get the notmuch version number without importing the notmuch module
 version_file = os.path.join(os.path.dirname(__file__),
-                            'notmuch', 'version.py')
+                            'notmuch2', 'version.py')
 exec(compile(open(version_file).read(), version_file, 'exec'))
 assert '__VERSION__' in globals(), \
     'Failed to read the notmuch binding version number'
-- 
2.27.0

  parent reply	other threads:[~2020-06-30 12:28 UTC|newest]

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 ` David Bremner [this message]
2020-06-25 13:34   ` [PATCH 2/2] bindings/python-cffi: update version from global version David Bremner
2020-06-29 21:02     ` Floris Bruynooghe
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=20200625110045.208558-3-david@tethera.net \
    --to=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
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).