def prereqToPackages(): if not detectPrereqs(): return print("%s %s" % (PACKAGE_MANAGER[detectOS()], " ".join(PACKAGES[x][detectOS()] for x in detectPrereqs())))
def compilerToPackages(): if not detectOS() in COMPILING: return print("%s %s" % (PACKAGE_MANAGER[detectOS.result], COMPILING[detectOS.result]))
cmd.finalize_options() cmd.force = True try: cmd.run() except CompileError: return False else: fullPath = os.path.join(cmd.build_lib, cmd.get_ext_filename("bitmsghash")) return os.path.isfile(fullPath) prereqs = detectPrereqs() compiler = testCompiler() if (not compiler or prereqs) and detectOS() in PACKAGE_MANAGER: print("It looks like you're using %s. " "It is highly recommended to use the package manager\n" "to install the missing dependencies." % detectOS.result) if not compiler: print("Building the bitmsghash module failed.\n" "You may be missing a C++ compiler and/or the OpenSSL headers.") if prereqs: mandatory = [x for x in prereqs if not PACKAGES[x].get("optional")] optional = [x for x in prereqs if PACKAGES[x].get("optional")] if mandatory: print("Missing mandatory dependencies: %s" % " ".join(mandatory)) if optional: print("Missing optional dependencies: %s" % " ".join(optional))