Skip to content

Commit dd94e61

Browse files
committed
Add entry point to setuptools
1 parent 89f376e commit dd94e61

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

conntestd/app.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,14 @@ def post_request(resp):
4949
return resp
5050

5151

52-
if __name__ == "__main__":
52+
def main():
5353
init_db(DB_CONN)
5454
scheduler = APScheduler()
5555
scheduler.init_app(app)
5656
scheduler.start()
5757
run_speedtest()
5858
app.run('0.0.0.0', threaded=True)
59+
60+
61+
if __name__ == "__main__":
62+
main()

setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
long_description="",
2020
zip_safe=False,
2121

22+
entry_points = {'console_scripts': [
23+
'command-name = conntestd.app:main',],},
24+
2225
package_data={'/conntestd/templates':['*'],
2326
'/conntestd/static/js':['*'],
2427
'/conntestd/static/css':['*'],},

0 commit comments

Comments
 (0)