summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--poezio/__main__.py14
-rwxr-xr-xsetup.py2
2 files changed, 9 insertions, 7 deletions
diff --git a/poezio/__main__.py b/poezio/__main__.py
index d924d7fc..f9eefb1b 100644
--- a/poezio/__main__.py
+++ b/poezio/__main__.py
@@ -1,7 +1,9 @@
-from poezio.poezio import test_curses, main
+def run():
+ from poezio.poezio import test_curses, main
-if test_curses():
- main()
-else:
- import sys
- sys.exit(1)
+ if test_curses():
+ main()
+ else:
+ import sys
+ sys.exit(1)
+ return 0
diff --git a/setup.py b/setup.py
index c421ff0f..fbd211a5 100755
--- a/setup.py
+++ b/setup.py
@@ -96,7 +96,7 @@ setup(name="poezio",
'poezio_themes': 'data/themes'},
package_data={'poezio': ['default_config.cfg']},
scripts=['scripts/poezio_gpg_export'],
- entry_points={'console_scripts': ['poezio = poezio.__main__']},
+ entry_points={'console_scripts': ['poezio = poezio.__main__:run']},
data_files=([('share/man/man1/', ['data/poezio.1']),
('share/poezio/', ['README.rst', 'COPYING', 'CHANGELOG'])]
+ find_doc('share/doc/poezio/source', 'source')