495 if self.descriptionFromFilesCheckBox.isChecked() |
495 if self.descriptionFromFilesCheckBox.isChecked() |
496 else self.descriptionEdit.toPlainText() |
496 else self.descriptionEdit.toPlainText() |
497 ) |
497 ) |
498 |
498 |
499 if self.descriptionContentTypeComboBox.currentData(): |
499 if self.descriptionContentTypeComboBox.currentData(): |
500 metadata[ |
500 metadata["long_description_content_type"] = ( |
501 "long_description_content_type" |
501 self.descriptionContentTypeComboBox.currentData() |
502 ] = self.descriptionContentTypeComboBox.currentData() |
502 ) |
503 |
503 |
504 if self.authorEdit.text(): |
504 if self.authorEdit.text(): |
505 metadata["author"] = self.authorEdit.text() |
505 metadata["author"] = self.authorEdit.text() |
506 metadata["author_email"] = self.authorEmailEdit.text() |
506 metadata["author_email"] = self.authorEmailEdit.text() |
507 |
507 |
589 "console_scripts": {}, |
589 "console_scripts": {}, |
590 "gui_scripts": {}, |
590 "gui_scripts": {}, |
591 } |
591 } |
592 for row in range(self.entryPointsList.topLevelItemCount()): |
592 for row in range(self.entryPointsList.topLevelItemCount()): |
593 itm = self.entryPointsList.topLevelItem(row) |
593 itm = self.entryPointsList.topLevelItem(row) |
594 entryPoints[itm.data(0, Qt.ItemDataRole.UserRole)][ |
594 entryPoints[itm.data(0, Qt.ItemDataRole.UserRole)][itm.text(1)] = ( |
595 itm.text(1) |
595 itm.text(2) |
596 ] = itm.text(2) |
596 ) |
597 for epType in list(entryPoints): |
597 for epType in list(entryPoints): |
598 if entryPoints[epType]: |
598 if entryPoints[epType]: |
599 entryPoints[epType] = SetupCfgUtilities.toString( |
599 entryPoints[epType] = SetupCfgUtilities.toString( |
600 entryPoints[epType] |
600 entryPoints[epType] |
601 ) |
601 ) |
646 if self.descriptionFromFilesCheckBox.isChecked(): |
646 if self.descriptionFromFilesCheckBox.isChecked(): |
647 project["readme"] = self.descriptionEdit.toPlainText().splitlines()[0] |
647 project["readme"] = self.descriptionEdit.toPlainText().splitlines()[0] |
648 else: |
648 else: |
649 readme = tomlkit.table() |
649 readme = tomlkit.table() |
650 readme["text"] = self.descriptionEdit.toPlainText() |
650 readme["text"] = self.descriptionEdit.toPlainText() |
651 readme[ |
651 readme["content-type"] = ( |
652 "content-type" |
652 self.descriptionContentTypeComboBox.currentData() |
653 ] = self.descriptionContentTypeComboBox.currentData() |
653 ) |
654 project["readme"] = readme |
654 project["readme"] = readme |
655 |
655 |
656 if self.authorEdit.text(): |
656 if self.authorEdit.text(): |
657 authors = tomlkit.array() |
657 authors = tomlkit.array() |
658 author = tomlkit.inline_table() |
658 author = tomlkit.inline_table() |
734 "console_scripts": {}, |
734 "console_scripts": {}, |
735 "gui_scripts": {}, |
735 "gui_scripts": {}, |
736 } |
736 } |
737 for row in range(self.entryPointsList.topLevelItemCount()): |
737 for row in range(self.entryPointsList.topLevelItemCount()): |
738 itm = self.entryPointsList.topLevelItem(row) |
738 itm = self.entryPointsList.topLevelItem(row) |
739 entryPoints[itm.data(0, Qt.ItemDataRole.UserRole)][ |
739 entryPoints[itm.data(0, Qt.ItemDataRole.UserRole)][itm.text(1)] = ( |
740 itm.text(1) |
740 itm.text(2) |
741 ] = itm.text(2) |
741 ) |
742 |
742 |
743 if entryPoints["console_scripts"]: |
743 if entryPoints["console_scripts"]: |
744 scripts = tomlkit.table() |
744 scripts = tomlkit.table() |
745 for name, function in entryPoints["console_scripts"].items(): |
745 for name, function in entryPoints["console_scripts"].items(): |
746 scripts[name] = function |
746 scripts[name] = function |