Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change ./checkin.py into an entrypoint #71

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
adds setup.py packaging for native python installing
  • Loading branch information
lockefox committed Aug 18, 2021
commit b0056e75e26a2b50319e46c05acc4052c5aca677
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include README
include LICENSE
include southwest/VERSION
1 change: 1 addition & 0 deletions southwest/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
5 changes: 5 additions & 0 deletions southwest/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
import pkgutil

from .southwest import Reservation
from .openflights import timezone_for_airport

__library_name__ = "southwest"
__version__ = pkgutil.get_data(__library_name__, "VERSION").decode("utf-8")
7 changes: 5 additions & 2 deletions checkin.py → southwest/checkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ def auto_checkin(reservation_number, first_name, last_name, verbose=False):
break


if __name__ == '__main__':

def checkin():
"""main function: for entry_point"""
arguments = docopt(__doc__, version='Southwest Checkin 3')
reservation_number = arguments['CONFIRMATION_NUMBER']
first_name = arguments['FIRST_NAME']
Expand All @@ -102,3 +102,6 @@ def auto_checkin(reservation_number, first_name, last_name, verbose=False):
except KeyboardInterrupt:
print("Ctrl+C detected, canceling checkin")
sys.exit()

if __name__ == '__main__':
checkin()