From ddef29599f9e416c6e28cb8eeb3bb0bc399b62fc Mon Sep 17 00:00:00 2001 From: Bastian Germann Date: Thu, 9 May 2019 00:06:09 +0200 Subject: [PATCH] Use start script __main__.py which enables 'python -m openlp' --- run_openlp.py => openlp/__main__.py | 0 setup.py | 3 +-- tests/functional/openlp_core/ui/test_mainwindow.py | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) rename run_openlp.py => openlp/__main__.py (100%) diff --git a/run_openlp.py b/openlp/__main__.py similarity index 100% rename from run_openlp.py rename to openlp/__main__.py diff --git a/setup.py b/setup.py index 90cef4885..85b55ff9c 100644 --- a/setup.py +++ b/setup.py @@ -161,7 +161,6 @@ using a computer and a data projector.""", url='https://openlp.org/', license='GPL-3.0-or-later', packages=find_packages(exclude=['ez_setup', 'tests*']), - py_modules=['run_openlp'], include_package_data=True, zip_safe=False, python_requires='>=3.6', @@ -207,5 +206,5 @@ using a computer and a data projector.""", 'python-xlib; platform_system=="Linux"' ], test_suite='nose2.collector.collector', - entry_points={'gui_scripts': ['openlp = run_openlp:start']} + entry_points={'gui_scripts': ['openlp = openlp.__main__:start']} ) diff --git a/tests/functional/openlp_core/ui/test_mainwindow.py b/tests/functional/openlp_core/ui/test_mainwindow.py index 817e2272e..78f1757da 100644 --- a/tests/functional/openlp_core/ui/test_mainwindow.py +++ b/tests/functional/openlp_core/ui/test_mainwindow.py @@ -107,7 +107,7 @@ class TestMainWindow(TestCase, TestMixin): Test that passing a non service file does nothing. """ # GIVEN a non service file as an argument to openlp - service = 'run_openlp.py' + service = 'setup.py' # WHEN the argument is processed self.main_window.open_cmd_line_files(service)