openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #33964
[Merge] lp:~bastian-germann/openlp/main into lp:openlp
Bastian Germann has proposed merging lp:~bastian-germann/openlp/main into lp:openlp.
Commit message:
Use start script __main__.py which enables 'python -m openlp'
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~bastian-germann/openlp/main/+merge/367156
The situation with OpenLP exporting two packages (openlp and run_openlp) is unpythonic. There is an obvious fix for that: using __main__.py. A neat side effect: It enables starting OpenLP via 'python -m openlp'.
As packages will have to be touched anyway because the start script was renamed to run_openlp.py during the current development cycle we should take the chance and do it the right way.
--
Your team OpenLP Core is requested to review the proposed merge of lp:~bastian-germann/openlp/main into lp:openlp.
=== renamed file 'run_openlp.py' => 'openlp/__main__.py'
=== modified file 'setup.py'
--- setup.py 2019-05-02 10:35:29 +0000
+++ setup.py 2019-05-08 22:28:31 +0000
@@ -161,7 +161,6 @@
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 @@
'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']}
)
=== modified file 'tests/functional/openlp_core/ui/test_mainwindow.py'
--- tests/functional/openlp_core/ui/test_mainwindow.py 2019-05-04 12:05:53 +0000
+++ tests/functional/openlp_core/ui/test_mainwindow.py 2019-05-08 22:28:31 +0000
@@ -107,7 +107,7 @@
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)
Follow ups