]> git.cworth.org Git - notmuch/commitdiff
bindings/python-cffi: copy version file into bindings dir
authorDavid Bremner <david@tethera.net>
Tue, 30 Jun 2020 00:22:47 +0000 (21:22 -0300)
committerDavid Bremner <david@tethera.net>
Fri, 3 Jul 2020 09:38:55 +0000 (06:38 -0300)
Attempt to avoid breaking "pip install ."

As far as I can tell, we need to have a copy (not just a relative
symlink) of the version file.

Makefile.local
bindings/python-cffi/setup.py
bindings/python-cffi/version [new file with mode: 0644]

index 586cdf7538690366f12d8c43585725ffaeff6c9b..314238ef9e279f06155a1d0469a5be6129d038a5 100644 (file)
@@ -54,6 +54,7 @@ update-versions:
        sed -i -e "s/^__VERSION__[[:blank:]]*=.*$$/__VERSION__ = \'${VERSION}\'/" \
            -e "s/^SOVERSION[[:blank:]]*=.*$$/SOVERSION = \'${LIBNOTMUCH_VERSION_MAJOR}\'/" \
            ${PV_FILE}
+       cp version bindings/python-cffi
 
 # We invoke make recursively only to force ordering of our phony
 # targets in the case of parallel invocation of make (-j).
index 1effcfc6feec93a7528d95819bc445f66c42a9b6..b00608358f45e160e468f7f168d7f694f941f1d6 100644 (file)
@@ -1,14 +1,8 @@
-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:
+with open('version') as fp:
     VERSION = fp.read().strip()
 
-
 setuptools.setup(
     name='notmuch2',
     version=VERSION,
diff --git a/bindings/python-cffi/version b/bindings/python-cffi/version
new file mode 100644 (file)
index 0000000..71971d9
--- /dev/null
@@ -0,0 +1 @@
+0.30~rc2