Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Commit

Permalink
Improve packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Sanchez Mateo committed Sep 20, 2017
1 parent 17a4d34 commit 8799385
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
5 changes: 5 additions & 0 deletions biredirect/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
"""
Import class
"""
from biredirect.boxstores import BoxKeysStoreRedis # noqa
from biredirect.redirector import APP # noqa
from biredirect.reportserver import ReportServer # noqa
from biredirect.settings import * # noqa
from biredirect.utils import * # noqa
18 changes: 18 additions & 0 deletions biredirect/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env python
import os
import sys

from biredirect.redirector import APP
from biredirect.settings import PORT


def main():
flask_app = APP
if os.environ.get('DEBUG'):
flask_app.debug = True

flask_app.run('0.0.0.0', port=PORT, use_reloader=False, debug=True)

# Only run if script is run directly and not by an import
if __name__ == "__main__":
sys.exit(main())
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
'requests >=2.18.3'],
entry_points={
'console_scripts': [
'spotifyconnect = biredirect.redirector'
'redirect = biredirect.__main__:main'
]
}
)

0 comments on commit 8799385

Please sign in to comment.