From: Shivani Bhardwaj Date: Tue, 18 Dec 2018 10:31:40 +0000 (+0530) Subject: Fix the broken sys import of distutils X-Git-Tag: 1.1.0rc1~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8aa6d2de0eed57c74d425ae38ce463ce10019da6;p=thirdparty%2Fsuricata-update.git Fix the broken sys import of distutils Newer distutils versions allow to list and work with `sys` as it is imported in the `__init__.py` however, the older versions of disutils does not contain anything other than the version and revision strings. The current installation procedure relied on the former method which is only adapted in the new versions so make it compatible to the older versions by importing `sys` from `distutils.core`. Closes redmine ticket #2747 --- diff --git a/setup.py b/setup.py index 14a4b0e..3c5c661 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,7 @@ import os.path import subprocess import distutils from distutils.core import setup +from distutils.core import sys from suricata.update.version import version @@ -45,7 +46,7 @@ args = { ], } -if any("pip" in arg for arg in distutils.sys.argv): +if any("pip" in arg for arg in sys.argv): args["install_requires"] = ["pyyaml", ] setup(**args)