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

Get version with importlib.metadata #76

Merged
merged 1 commit into from
Mar 29, 2024
Merged
Changes from all commits
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
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
Loading