Content-Length: 282201 | pFad | http://github.com/scienxlab/python-package-template/commit/7e7a06cc8c20931987a8dec6bef80e52c56991ec

BF Remove version file · scienxlab/python-package-template@7e7a06c · GitHub
Skip to content

Commit 7e7a06c

Browse files
authored
Remove version file
1 parent 649aba1 commit 7e7a06c

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

src/mypackage/__init__.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
from .mypackage import *
22
from .cli import cli
33

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

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/scienxlab/python-package-template/commit/7e7a06cc8c20931987a8dec6bef80e52c56991ec

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy