From f6b8665b7b1e61c66969bd22d666758fa0a68fd2 Mon Sep 17 00:00:00 2001 From: Martin Sundhaug <martinsundhaug@gmail.com> Date: Fri, 21 Apr 2017 17:22:19 +0200 Subject: [PATCH] Check python-lzma availability during installation --- setup.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/setup.py b/setup.py index 6673f36..14b3847 100755 --- a/setup.py +++ b/setup.py @@ -199,6 +199,16 @@ install_data_files = [] for data_dir in ["magic", "config", "plugins", "modules", "core"]: install_data_files.append("%s%s*" % (data_dir, os.path.sep)) +# Verify that the lzma-module is available +try: + import lzma +except ImportError: + try: + from backports import lzma + except: + print("Error: python LZMA-module not found, please install before proceeding") + sys.exit(-1) + # Install the module, script, and support files setup(name = MODULE_NAME, version = "2.1.2b", -- libgit2 0.26.0