Skip to content

Commit

Permalink
Merge pull request #76 from eecs485staff/bugfix-version-flag
Browse files Browse the repository at this point in the history
Get version with importlib.metadata
  • Loading branch information
awdeorio authored Mar 29, 2024
2 parents 63a8f6e + ff650bc commit b9356dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions madoop/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"""
import argparse
import importlib.metadata
import logging
import pathlib
import shutil
import sys
import textwrap
import pkg_resources
from .mapreduce import mapreduce
from .exceptions import MadoopError

Expand All @@ -21,10 +21,10 @@ def main():
)

optional_args = parser.add_argument_group('optional arguments')
version = pkg_resources.get_distribution("madoop").version

optional_args.add_argument(
'--version', action='version',
version=f'Madoop {version}'
version=f'Madoop {importlib.metadata.version("madoop")}'
)
optional_args.add_argument(
'--example', action=ExampleAction, nargs=0,
Expand Down

0 comments on commit b9356dd

Please sign in to comment.