Skip to content

Commit

Permalink
Remove version file
Browse files Browse the repository at this point in the history
  • Loading branch information
kwinkunks authored Jan 26, 2024
1 parent 649aba1 commit 7e7a06c
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions src/mypackage/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
from .mypackage import *
from .cli import cli

from pkg_resources import get_distribution, DistributionNotFound
try:
VERSION = get_distribution(__name__).version
except DistributionNotFound:
try:
from ._version import version as VERSION
except ImportError:
raise ImportError(
"Failed to find (autogenerated) _version.py. "
"This might be because you are installing from GitHub's tarballs, "
"use the PyPI ones."
)
__version__ = VERSION
# It used to be conventional to define a __version__ attribute.
# However, it is now considered best practice to get version
# information from the package metadata directly, eg by using
# importlib.metadata.version (see below).
#
# If you still want to define __version__, uncomment the following:
#
# from importlib.metadata import version
# __version__ = version(__package__ or __name__)

0 comments on commit 7e7a06c

Please sign in to comment.