summaryrefslogtreecommitdiff
path: root/setuptools/_distutils/command/bdist_msi.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/_distutils/command/bdist_msi.py')
-rw-r--r--setuptools/_distutils/command/bdist_msi.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/setuptools/_distutils/command/bdist_msi.py b/setuptools/_distutils/command/bdist_msi.py
index 2f292c96..6e1e1abd 100644
--- a/setuptools/_distutils/command/bdist_msi.py
+++ b/setuptools/_distutils/command/bdist_msi.py
@@ -31,9 +31,6 @@ class PyDialog(Dialog):
default, cancel, bitmap=true)"""
super().__init__(*args)
ruler = self.h - 36
- bmwidth = 152 * ruler / 328
- # if kw.get("bitmap", True):
- # self.bitmap("Bitmap", 0, 0, bmwidth, ruler, "PythonWin")
self.line("BottomLine", 0, ruler, self.w, 0)
def title(self, title):
@@ -231,7 +228,7 @@ class bdist_msi(Command):
)
self.install_script_key = None
- def run(self):
+ def run(self): # noqa: C901
if not self.skip_build:
self.run_command('build')
@@ -318,7 +315,7 @@ class bdist_msi(Command):
if not self.keep_temp:
remove_tree(self.bdist_dir, dry_run=self.dry_run)
- def add_files(self):
+ def add_files(self): # noqa: C901
db = self.db
cab = msilib.CAB("distfiles")
rootdir = os.path.abspath(self.bdist_dir)
@@ -406,11 +403,9 @@ class bdist_msi(Command):
exe_action = "PythonExe" + ver
target_dir_prop = "TARGETDIR" + ver
exe_prop = "PYTHON" + ver
- if msilib.Win64:
- # type: msidbLocatorTypeRawValue + msidbLocatorType64bit
- Type = 2 + 16
- else:
- Type = 2
+
+ # Type: msidbLocatorTypeRawValue + msidbLocatorType64bit
+ Type = 2 + 16 * bool(msilib.Win64)
add_data(
self.db,
"RegLocator",
@@ -517,7 +512,6 @@ class bdist_msi(Command):
# see "Dialog Style Bits"
modal = 3 # visible | modal
modeless = 1 # visible
- track_disk_space = 32
# UI customization properties
add_data(
@@ -590,7 +584,9 @@ class bdist_msi(Command):
320,
80,
0x30003,
- "[ProductName] setup ended prematurely because of an error. Your system has not been modified. To install this program at a later time, please run the installation again.",
+ "[ProductName] setup ended prematurely because of an error. "
+ "Your system has not been modified. To install this program "
+ "at a later time, please run the installation again.",
)
fatal.text(
"Description2",
@@ -618,7 +614,8 @@ class bdist_msi(Command):
80,
0x30003,
"[ProductName] setup was interrupted. Your system has not been modified. "
- "To install this program at a later time, please run the installation again.",
+ "To install this program at a later time, please run the installation "
+ "again.",
)
user_exit.text(
"Description2",
@@ -683,7 +680,10 @@ class bdist_msi(Command):
330,
50,
3,
- "The following applications are using files that need to be updated by this setup. Close these applications and then click Retry to continue the installation or Cancel to exit it.",
+ "The following applications are using files that need to be updated by "
+ "this "
+ "setup. Close these applications and then click Retry to continue the "
+ "installation or Cancel to exit it.",
)
inuse.control(
"List",
@@ -720,7 +720,6 @@ class bdist_msi(Command):
None,
)
error.text("ErrorText", 50, 9, 280, 48, 3, "")
- # error.control("ErrorIcon", "Icon", 15, 9, 24, 24, 5242881, None, "py.ico", None, None)
error.pushbutton("N", 120, 72, 81, 21, 3, "No", None).event(
"EndDialog", "ErrorNo"
)
@@ -785,7 +784,8 @@ class bdist_msi(Command):
194,
30,
3,
- "Please wait while the installer finishes determining your disk space requirements.",
+ "Please wait while the installer finishes determining your disk space "
+ "requirements.",
)
c = costing.pushbutton("Return", 102, 57, 56, 17, 3, "Return", None)
c.event("EndDialog", "Exit")
@@ -802,7 +802,8 @@ class bdist_msi(Command):
320,
40,
0x30003,
- "Please wait while the Installer prepares to guide you through the installation.",
+ "Please wait while the Installer prepares to guide you through the "
+ "installation.",
)
prep.title("Welcome to the [ProductName] Installer")
c = prep.text("ActionText", 15, 110, 320, 20, 0x30003, "Pondering...")
@@ -1096,7 +1097,6 @@ class bdist_msi(Command):
# Close dialog when maintenance action scheduled
c.event("EndDialog", "Return", 'MaintenanceForm_Action<>"Change"', 20)
- # c.event("NewDialog", "SelectFeaturesDlg", 'MaintenanceForm_Action="Change"', 21)
maint.cancel("Cancel", "RepairRadioGroup").event("SpawnDialog", "CancelDlg")