mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This changes the shebangs for the update_checkout executable files to specifically call Python 3. The code is already compatible and functional with python3, so this removes any implied backward compatibility, and removes any ambiguity based on the user's current environment, especially since some systems, like macOS, still link 'python' to Python 2. This also removes the now unnecessary 'from __future__' imports.
16 lines
480 B
Python
Executable File
16 lines
480 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
|
|
import update_checkout
|
|
|
|
if __name__ == '__main__':
|
|
# This line was added in dfe3af81b2 to address an importing issue on
|
|
# Windows. It causes this script to break badly when used with
|
|
# Python 3.8 on macOS. Disabling for all Python 3 until someone
|
|
# can help sort out what's really needed for Windows:
|
|
if sys.version_info.major < 3:
|
|
sys.modules[__name__] = sys.modules['update_checkout']
|
|
|
|
update_checkout.main()
|