scripts/install.py

branch
eric7-maintenance
changeset 11118
967a88a16a21
parent 11063
bb05d1db9286
parent 11092
e2aaf07ef8fd
child 11155
e1843b6efa73
equal deleted inserted replaced
11064:c2cb561a39b0 11118:967a88a16a21
1 #!/usr/bin/env python3 1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*- 2 # -*- coding: utf-8 -*-
3 3
4 # Copyright (c) 2002 - 2024 Detlev Offenbach <detlev@die-offenbachs.de> 4 # Copyright (c) 2002 - 2025 Detlev Offenbach <detlev@die-offenbachs.de>
5 # 5 #
6 # This is the install script for eric. 6 # This is the install script for eric.
7 7
8 """ 8 """
9 Installation script for the eric IDE and all eric related tools. 9 Installation script for the eric IDE and all eric related tools.
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)
1235 elif os.path.exists(os.path.join("eric7", "__version__.py")): 1236 elif os.path.exists(os.path.join("eric7", "__version__.py")):
1236 # Installing from source tree 1237 # Installing from source tree
1237 from eric7.__version__ import CopyrightShort, Version # noqa: I101 1238 from eric7.__version__ import CopyrightShort, Version # noqa: I101
1238 else: 1239 else:
1239 Version = "Unknown" 1240 Version = "Unknown"
1240 CopyrightShort = "(c) 2002 - 2024 Detlev Offenbach" 1241 CopyrightShort = "(c) 2002 - 2025 Detlev Offenbach"
1241 1242
1242 copyToFile( 1243 copyToFile(
1243 os.path.join(directories["contents"], "Info.plist"), 1244 os.path.join(directories["contents"], "Info.plist"),
1244 """<?xml version="1.0" encoding="UTF-8"?>\n""" 1245 """<?xml version="1.0" encoding="UTF-8"?>\n"""
1245 """<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"\n""" 1246 """<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"\n"""

eric ide

mercurial