summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLzu Tao <taolzu@gmail.com>2018-12-14 04:12:22 (GMT)
committerLzu Tao <taolzu@gmail.com>2018-12-14 04:12:22 (GMT)
commite23d0fb908c6180088eb69b76ea27a486df77e2c (patch)
tree0ee7768cee5bbdf336bc7de0bcd1acc847e3b00a
parentf603fdf782442e11e641f0dec8c8f0c8a1be11a1 (diff)
downloadlz4-e23d0fb908c6180088eb69b76ea27a486df77e2c.zip
lz4-e23d0fb908c6180088eb69b76ea27a486df77e2c.tar.gz
lz4-e23d0fb908c6180088eb69b76ea27a486df77e2c.tar.bz2
meson: Remove unused sys import
-rw-r--r--contrib/meson/GetLz4LibraryVersion.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/contrib/meson/GetLz4LibraryVersion.py b/contrib/meson/GetLz4LibraryVersion.py
index 80b09c9..d8abfcb 100644
--- a/contrib/meson/GetLz4LibraryVersion.py
+++ b/contrib/meson/GetLz4LibraryVersion.py
@@ -8,10 +8,9 @@
# in the COPYING file in the root directory of this source tree).
# #############################################################################
import re
-import sys
-def find_version(filepath):
+def find_version_tuple(filepath):
version_file_data = None
with open(filepath) as fd:
version_file_data = fd.read()
@@ -32,9 +31,8 @@ def main():
parser = argparse.ArgumentParser(description='Print lz4 version from lib/lz4.h')
parser.add_argument('file', help='path to lib/lz4.h')
args = parser.parse_args()
- filepath = args.file
- version_tup = find_version(filepath)
- print('.'.join(version_tup))
+ version_tuple = find_version_tuple(args.file)
+ print('.'.join(version_tuple))
if __name__ == '__main__':