提交 eee3025c 编写于 作者: K Kentaro Wada

Make script as console_scripts

上级 8b45bb5a
......@@ -913,15 +913,11 @@ def read(filename, default=None):
return default
def main(argv):
def main():
"""Standard boilerplate Qt application code."""
app = QApplication(argv)
app = QApplication(sys.argv)
app.setApplicationName(__appname__)
app.setWindowIcon(newIcon("app"))
win = MainWindow(argv[1] if len(argv) == 2 else None)
win = MainWindow(sys.argv[1] if len(sys.argv) == 2 else None)
win.show()
return app.exec_()
if __name__ == '__main__':
sys.exit(main(sys.argv))
sys.exit(app.exec_())
......@@ -57,5 +57,5 @@ setup(
'Topic :: Internet :: WWW/HTTP',
],
package_data={'labelme': ['icons/*', 'resources.qrc']},
scripts=['scripts/labelme'],
entry_points={'console_scripts': ['labelme=labelme.app:main']},
)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册