diff --git a/bin/doxec b/bin/doxec index 3f2168f50ac1737b10a36e461f4ede1bd50735c3..c421d7a1495b0d57e71241f7f977f68f45deb893 100755 --- a/bin/doxec +++ b/bin/doxec @@ -15,12 +15,19 @@ if __name__ == "__main__": default="markdown", help="The syntax parser to be used for the listed files.") + parser.add_argument("--version", action="store_true", + help="Prints the version of the doxec package and exits.") + parser.add_argument("documents", metavar="DOCUMENT", nargs="+", default=[], help="A document from which the code examples should be parsed and " "executed") args = parser.parse_args() + if args.version: + print("Doxec package version: %s" % doxec.__version__) + sys.exit(0) + parser = doxec.parser[args.syntax] def monitor(op, exception): diff --git a/doxec/__init__.py b/doxec/__init__.py index 365533142424b04250be01aaa175763e17dd4a51..29eca7f14bc65c99801585ac8c1245ca199102c1 100644 --- a/doxec/__init__.py +++ b/doxec/__init__.py @@ -3,6 +3,8 @@ import abc import re import subprocess +__version__ = "0.1.1" + class TestException(Exception): """ This exception should be raised, if an operation performed tests and one diff --git a/setup.py b/setup.py index 2c7f1f5eabaaa58b00eef9f3994d5eb704265469..abd8850e4c91bb9f3d3e788f5b731fbb3229b92d 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import setup setup( name="doxec", - version= "0.1.0", + version= "0.1.1", author="Frank Sauerburger", author_email= "frank@sauerburger.com", description=("Run documentation and test whether the examples work."),