From 4f5de7f1f5c984e730a1f829a46c245ddf5f185b Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Sat, 12 Oct 2019 15:07:24 -0500 Subject: [PATCH] Bumped version number and added version option --- ctabus/__init__.py | 4 ++++ setup.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ctabus/__init__.py b/ctabus/__init__.py index 222ee1c..4d549ef 100644 --- a/ctabus/__init__.py +++ b/ctabus/__init__.py @@ -1,4 +1,5 @@ #!/usr/bin/python3 +__version__ = "2.4" from dateutil import tz from dateutil.parser import parse as date_parse from threading import Event @@ -27,6 +28,9 @@ EXIT = Event() # https://stackoverflow.com/a/5967539 parser = argparse.ArgumentParser(prog="ctabus") +parser.add_argument( + "-v", "--version", action="version", version="%(prog)s {}".format(__version__) +) parser.add_argument("-l", "--lucky", action="store_true", help="picks first result") parser.add_argument( "-p", "--periodic", metavar="SEC", type=int, help="checks periodically" diff --git a/setup.py b/setup.py index 220edfd..b8bcc4d 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open("requirements.txt") as file: setup( name="ctabus", - version="2.3.1", + version="2.4", description="Python package for tracking cta bus times", install_requires=INSTALL_REQUIRES, author="rlbr",