Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
sys.exit(0)
elif cmd=="--version":
print "0.1"
sys.exit(0)
else:
pkg_names.append(sys.argv[i])
# Fix search path
PKG_CONFIG_PATH = os.getenv("PKG_CONFIG_PATH", "").strip()
if not PKG_CONFIG_PATH:
PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/lib/pkgconfig"
PKG_CONFIG_PATH = PKG_CONFIG_PATH.replace(";", ":")
# Parse files
for pkg_name in pkg_names:
pkg = Pkg(pkg_name)
if not pkg.parse(PKG_CONFIG_PATH):
sys.exit(1)
pkg_dict[pkg_name] = pkg
if exist_check:
sys.exit(0)
# Calculate priority based on dependency
for pkg_name in pkg_dict.keys():
pkg = pkg_dict[pkg_name]
pkg.priority = calculate_pkg_priority(pkg, pkg_dict, 1)
# Sort package based on dependency
pkg_names = sorted(pkg_names, key=lambda pkg_name: pkg_dict[pkg_name].priority, reverse=True)
# Get the options