2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-27 15:18:06 +00:00

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 <ethan@nicira.com>
This commit is contained in:
Ethan Jackson
2012-02-29 17:20:03 -08:00
parent 79982e900b
commit 4fb7d81426
2 changed files with 9 additions and 0 deletions

View File

@@ -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
PYFILES = $(ovs_pyfiles) python/ovs/dirs.py $(ovstest_pyfiles)
@@ -56,3 +57,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 $@

1
python/ovs/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
version.py