(self)
| 1049 | return {"includes": self.get_esky_freezer_includes()} |
| 1050 | |
| 1051 | def get_esky_freezer_includes(self): |
| 1052 | # Sometimes the auto module traversal doesn't find everything, so we |
| 1053 | # explicitly add it. The auto dependency tracking especially does not work for |
| 1054 | # imports occurring in salt.modules, as they are loaded at salt runtime. |
| 1055 | # Specifying includes that don't exist doesn't appear to cause a freezing |
| 1056 | # error. |
| 1057 | freezer_includes = [ |
| 1058 | "zmq.core.*", |
| 1059 | "zmq.utils.*", |
| 1060 | "ast", |
| 1061 | "csv", |
| 1062 | "difflib", |
| 1063 | "distutils", |
| 1064 | "distutils.version", |
| 1065 | "numbers", |
| 1066 | "json", |
| 1067 | "M2Crypto", |
| 1068 | "Cookie", |
| 1069 | "asyncore", |
| 1070 | "fileinput", |
| 1071 | "sqlite3", |
| 1072 | "email", |
| 1073 | "email.mime.*", |
| 1074 | "requests", |
| 1075 | "sqlite3", |
| 1076 | ] |
| 1077 | if HAS_ZMQ and hasattr(zmq, "pyzmq_version_info"): |
| 1078 | if HAS_ZMQ and zmq.pyzmq_version_info() >= (0, 14): |
| 1079 | # We're freezing, and when freezing ZMQ needs to be installed, so this |
| 1080 | # works fine |
| 1081 | if "zmq.core.*" in freezer_includes: |
| 1082 | # For PyZMQ >= 0.14, freezing does not need 'zmq.core.*' |
| 1083 | freezer_includes.remove("zmq.core.*") |
| 1084 | |
| 1085 | if IS_WINDOWS_PLATFORM: |
| 1086 | freezer_includes.extend( |
| 1087 | [ |
| 1088 | "imp", |
| 1089 | "win32api", |
| 1090 | "win32file", |
| 1091 | "win32con", |
| 1092 | "win32com", |
| 1093 | "win32net", |
| 1094 | "win32netcon", |
| 1095 | "win32gui", |
| 1096 | "win32security", |
| 1097 | "ntsecuritycon", |
| 1098 | "pywintypes", |
| 1099 | "pythoncom", |
| 1100 | "_winreg", |
| 1101 | "wmi", |
| 1102 | "site", |
| 1103 | "psutil", |
| 1104 | "pytz", |
| 1105 | ] |
| 1106 | ) |
| 1107 | elif IS_SMARTOS_PLATFORM: |
| 1108 | # we have them as requirements in pkg/smartos/esky/requirements.txt |
no test coverage detected