File size: 361 Bytes
9c6594c |
1 2 3 4 5 6 7 8 9 10 |
import os
_PACKAGE_ROOT = os.path.dirname(__file__)
_VERSION_PATH = os.path.join(os.path.dirname(_PACKAGE_ROOT), "version.info")
if not os.path.exists(_VERSION_PATH):
# relevant for `bdist_wheel`
_VERSION_PATH = os.path.join(_PACKAGE_ROOT, "version.info")
with open(_VERSION_PATH, encoding="utf-8") as fopen:
version = fopen.readlines()[0].strip()
|