src/eric7/eric7_post_install.py

branch
eric7
changeset 9473
3f23dbf37dbe
parent 9381
3c9192161833
child 9482
a2bc06a54d9d
equal deleted inserted replaced
9472:5798ee4a8807 9473:3f23dbf37dbe
6 6
7 """ 7 """
8 Module implementing the post install logic for 'pip install'. 8 Module implementing the post install logic for 'pip install'.
9 """ 9 """
10 10
11 import sys 11 import contextlib
12 import os 12 import os
13 import shutil 13 import shutil
14 import sys
14 import sysconfig 15 import sysconfig
15 import contextlib
16 16
17 ###################################################################### 17 ######################################################################
18 ## Post installation hooks for Windows below 18 ## Post installation hooks for Windows below
19 ###################################################################### 19 ######################################################################
20 20
120 @param targetPath path the shortcut shall point to 120 @param targetPath path the shortcut shall point to
121 @type str 121 @type str
122 @param iconPath path of the icon file 122 @param iconPath path of the icon file
123 @type str 123 @type str
124 """ 124 """
125 from pywintypes import com_error
125 from win32com.client import Dispatch 126 from win32com.client import Dispatch
126 from pywintypes import com_error
127 127
128 with contextlib.suppress(com_error): 128 with contextlib.suppress(com_error):
129 shell = Dispatch("WScript.Shell") 129 shell = Dispatch("WScript.Shell")
130 shortcut = shell.CreateShortCut(linkPath) 130 shortcut = shell.CreateShortCut(linkPath)
131 shortcut.Targetpath = targetPath 131 shortcut.Targetpath = targetPath

eric ide

mercurial