]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
python: add __version__ to libnvme python package
authorMartin Belanger <martin.belanger@dell.com>
Mon, 11 Jul 2022 12:28:27 +0000 (08:28 -0400)
committerDaniel Wagner <dwagner@suse.de>
Tue, 12 Jul 2022 09:38:59 +0000 (11:38 +0200)
It is customary for Python packages to provide a __version__ attribute.

It's not enough just to copy the files to the build directory, we need
also to run the configure step.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
[dwagner: Added information why meson.build has to be changed]
Singed-off-by: Daniel Wagner <dwagner@suse.de>
libnvme/__init__.py
libnvme/meson.build

index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b2fe8dd3069afd341b21f470d5c62e897ebad306 100644 (file)
@@ -0,0 +1,9 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+# This file is part of libnvme.
+# Copyright (c) 2022 Dell Inc.
+#
+# Authors: Martin Belanger <Martin.Belanger@dell.com>
+
+__version__ = @PROJECT_VERSION@
+__git_version__ = @GIT_VERSION@
index 353ad93c69ffbe75b5ae220fabc8414fa76d403d..e9589fc416a04e0a6f5a5c84b2889ac29acaaa64 100644 (file)
@@ -46,7 +46,7 @@ if have_python_support
     configure_file(
         input:  '__init__.py', 
         output: '__init__.py',
-        copy: true,
+        configuration: conf,
         install_dir: python3.get_install_dir(pure: false, subdir: 'libnvme'),
     )