Return the macOS system version as a tuple The return value is safe to use to compare two version numbers.
()
| 116 | |
| 117 | _SYSTEM_VERSION_TUPLE = None |
| 118 | def _get_system_version_tuple(): |
| 119 | """ |
| 120 | Return the macOS system version as a tuple |
| 121 | |
| 122 | The return value is safe to use to compare |
| 123 | two version numbers. |
| 124 | """ |
| 125 | global _SYSTEM_VERSION_TUPLE |
| 126 | if _SYSTEM_VERSION_TUPLE is None: |
| 127 | osx_version = _get_system_version() |
| 128 | if osx_version: |
| 129 | try: |
| 130 | _SYSTEM_VERSION_TUPLE = tuple(int(i) for i in osx_version.split('.')) |
| 131 | except ValueError: |
| 132 | _SYSTEM_VERSION_TUPLE = () |
| 133 | |
| 134 | return _SYSTEM_VERSION_TUPLE |
| 135 | |
| 136 | |
| 137 | def _remove_original_values(_config_vars): |
no test coverage detected
searching dependent graphs…