Commit 9f1f3927 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

[cmd] Try to improve package publication and access to __version__ variable

parent 2db83592
......@@ -32,6 +32,7 @@ from functools import wraps
# Custom imports
import cadbiom.commons as cm
import importlib_metadata
LOGGER = cm.logger()
parser = None
......@@ -374,6 +375,11 @@ def main():
)
# Default log level: debug
parser.add_argument("-vv", "--verbose", nargs="?", default="info")
parser.add_argument(
"-V", "--version", action="version",
version="%(prog)s " + importlib_metadata.version('cadbiom_cmd')
)
# Subparsers and ability to get the current subcommand name
subparsers = parser.add_subparsers(title="subcommands", dest="subcommand")
......
[metadata]
name = cadbiom_cmd
# version = attr: cadbiom_cmd.__version__
version = attr: cadbiom_cmd.__version__
description = Command line tools using the Cadbiom software
description-file = README.md
long_description_content_type = text/markdown
......
......@@ -28,9 +28,4 @@
# Standard imports
from setuptools import setup
__PACKAGE_VERSION__ = "2.0.0"
setup(
version=__PACKAGE_VERSION__,
)
setup()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment