SetupWizardDialog: change setup default method to 'setuptools' and fixed an issue causing an exception, if no classifiers were selected.

Wed, 10 Apr 2019 19:52:02 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 10 Apr 2019 19:52:02 +0200
changeset 6940
12ed1a714527
parent 6939
af0ca76e26fd
child 6941
f99d60d6b59b

SetupWizardDialog: change setup default method to 'setuptools' and fixed an issue causing an exception, if no classifiers were selected.

Plugins/WizardPlugins/SetupWizard/SetupWizardDialog.py file | annotate | diff | comparison | revisions
diff -r af0ca76e26fd -r 12ed1a714527 Plugins/WizardPlugins/SetupWizard/SetupWizardDialog.py
--- a/Plugins/WizardPlugins/SetupWizard/SetupWizardDialog.py	Wed Apr 10 19:50:54 2019 +0200
+++ b/Plugins/WizardPlugins/SetupWizard/SetupWizardDialog.py	Wed Apr 10 19:52:02 2019 +0200
@@ -60,6 +60,7 @@
         
         self.variantComboBox.addItem(self.tr("distutils"), "distutils.core")
         self.variantComboBox.addItem(self.tr("setuptools"), "setuptools")
+        self.variantComboBox.setCurrentIndex(1)
         
         self.__mandatoryStyleSheet = "QLineEdit {border: 2px solid;}"
         for lineEdit in [self.nameEdit, self.versionEdit,
@@ -326,6 +327,8 @@
                 classifiers.append(itm.data(0, Qt.UserRole))
             itm = self.classifiersList.itemBelow(itm)
         
+        # cleanup classifiers list - remove all invalid entries
+        classifiers = [c for c in classifiers if bool(c)]
         if classifiers:
             code += '{0}classifiers=[{1}'.format(istring, os.linesep)
             code += '{0}"{1}"{2}'.format(

eric ide

mercurial