Skip to content

Commit

Permalink
python: add __version__ attribute to bcc module (iovisor#1826)
Browse files Browse the repository at this point in the history
add __version__  attribute to bcc module
  • Loading branch information
andreasgerstmayr authored and yonghong-song committed Jun 14, 2018
1 parent 66d2863 commit c2fb112
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ if(NOT PYTHON_CMD)
endif()

configure_file(setup.py.in ${CMAKE_CURRENT_BINARY_DIR}/setup.py @ONLY)
configure_file(bcc/version.py.in ${CMAKE_CURRENT_BINARY_DIR}/bcc/version.py @ONLY)
if(EXISTS "/etc/debian_version")
set(PYTHON_FLAGS "${PYTHON_FLAGS} --install-layout deb")
endif()
Expand Down
1 change: 1 addition & 0 deletions src/python/bcc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from .table import Table, PerfEventArray
from .perf import Perf
from .utils import get_online_cpus, printb, _assert_is_bytes, ArgString
from .version import __version__

_probe_limit = 1000
_num_open_probes = 0
Expand Down
1 change: 1 addition & 0 deletions src/python/bcc/version.py.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '@REVISION@'

0 comments on commit c2fb112

Please sign in to comment.