diff --git a/.gitignore b/.gitignore index 9100250..08457f2 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ dist/* .doctrees docs/html/* .coverage +.eggs diff --git a/bin/hippolyzer-cli b/bin/hippolyzer-cli new file mode 100755 index 0000000..787878f --- /dev/null +++ b/bin/hippolyzer-cli @@ -0,0 +1,9 @@ +#!/usr/bin/env python +from hippolyzer.apps.proxy import mp_main, main + +# Have to use our own script rather than an autogenerated setuptools wrapper +# with console_scripts so we can define the __mp_main__ entrypoint +if __name__ == "__main__": + main() +elif __name__ == "__mp_main__": + mp_main() diff --git a/bin/hippolyzer-gui b/bin/hippolyzer-gui new file mode 100755 index 0000000..a3b5d2a --- /dev/null +++ b/bin/hippolyzer-gui @@ -0,0 +1,10 @@ +#!/usr/bin/env python +from hippolyzer.apps.proxy import mp_main +from hippolyzer.apps.proxy_gui import gui_main + +# Have to use our own script rather than an autogenerated setuptools wrapper +# with console_scripts so we can define the __mp_main__ entrypoint +if __name__ == "__main__": + gui_main() +elif __name__ == "__mp_main__": + mp_main() diff --git a/setup.py b/setup.py index 17a20dd..2e92059 100644 --- a/setup.py +++ b/setup.py @@ -64,12 +64,10 @@ setup( 'lib/proxy/data/LICENSE-artwork.txt', ], }, - entry_points={ - 'console_scripts': [ - "hippolyzer-gui = hippolyzer.apps.proxy_gui:gui_main", - "hippolyzer-cli = hippolyzer.apps.proxy:main", - ], - }, + scripts=[ + "bin/hippolyzer-gui", + "bin/hippolyzer-cli", + ], zip_safe=False, python_requires='>=3.8', install_requires=[