303 ) |
303 ) |
304 |
304 |
305 # Mac OS X |
305 # Mac OS X |
306 elif sys.platform == "darwin": |
306 elif sys.platform == "darwin": |
307 major = sys.version_info.major |
307 major = sys.version_info.major |
308 pyexec = "{0}/bin/pythonw{1}".format(sys.exec_prefix, major) |
308 minor = sys.version_info.minor |
|
309 pyexec = f"{sys.exec_prefix}/bin/pythonw{major}.{minor}" |
309 if not os.path.exists(pyexec): |
310 if not os.path.exists(pyexec): |
310 pyexec = "{0}/bin/python{1}".format(sys.exec_prefix, major) |
311 pyexec = f"{sys.exec_prefix}/bin/python{major}.{minor}" |
311 wname = wfile |
312 wname = wfile |
312 wrapper = ( |
313 wrapper = ( |
313 """#!/bin/sh\n""" |
314 """#!/bin/sh\n""" |
314 """\n""" |
315 """\n""" |
315 """exec "{0}" "{1}/{2}.py" "$@"\n""".format(pyexec, pydir, wfile) |
316 """exec "{0}" "{1}/{2}.py" "$@"\n""".format(pyexec, pydir, wfile) |