From 0c0810c405e4464f14e3e83845dc089ad80c0bea Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Wed, 29 Feb 2012 17:20:03 -0800 Subject: [PATCH] python: New method to retrieve OVS version at runtime. Version information is typically fairly useful when debugging Open vSwitch. This patch adds a new version.py module which python code can use to report its version to callers. Signed-off-by: Ethan Jackson --- python/automake.mk | 8 ++++++++ python/ovs/.gitignore | 1 + 2 files changed, 9 insertions(+) create mode 100644 python/ovs/.gitignore diff --git a/python/automake.mk b/python/automake.mk index 089ef3653..83c4c3e62 100644 --- a/python/automake.mk +++ b/python/automake.mk @@ -28,6 +28,7 @@ ovs_pyfiles = \ python/ovs/socket_util.py \ python/ovs/stream.py \ python/ovs/timeval.py \ + python/ovs/version.py \ python/ovs/vlog.py \ python/ovs/util.py EXTRA_DIST += $(ovs_pyfiles) python/ovs/dirs.py $(ovstest_pyfiles) @@ -54,3 +55,10 @@ install-data-local: ovs-install-data-local UNINSTALL_LOCAL += ovs-uninstall-local ovs-uninstall-local: rm -f $(DESTDIR)$(pkgdatadir)/python/ovs/dirs.py + +ALL_LOCAL += $(srcdir)/python/ovs/version.py +$(srcdir)/python/ovs/version.py: config.status + $(ro_shell) > $@.tmp + echo 'VERSION = "$(VERSION)"' >> $@.tmp + echo 'BUILDNR = "$(BUILDNR)"' >> $@.tmp + mv $@.tmp $@ diff --git a/python/ovs/.gitignore b/python/ovs/.gitignore new file mode 100644 index 000000000..985278646 --- /dev/null +++ b/python/ovs/.gitignore @@ -0,0 +1 @@ +version.py -- 2.47.0